views/noticias/wp-content/themes/supermag/acmethemes/admin-notice/class-admin-notice-handler.php
/**

	 * Get Started Notice

	 * Active callback of wp_loaded

	 * return void

	 */
Get Started Notice
Active callback of wp_loaded
return void
Get Started Notice Active callback of wp_loaded return void
public static function hide_notices() {
		if ( isset( $_GET['at-gsm-hide-notice'] ) && isset( $_GET['at_gsm_admin_notice_nonce'] ) ) { 
			if ( ! wp_verify_nonce( wp_unslash( $_GET['at_gsm_admin_notice_nonce'] ), 'at_gsm_hide_notices_nonce' ) ) { 
				wp_die( __( 'Action failed. Please refresh the page and retry.', 'supermag' ) ); 
			}
			if ( ! current_user_can( 'manage_options' ) ) {
				wp_die( __( 'Cheatin&#8217; huh?', 'supermag' ) ); 
			}
			$notice_type = sanitize_text_field( wp_unslash( $_GET['at-gsm-hide-notice'] ) );
			update_option( 'supermag_admin_notice_' . $notice_type, 1 );
			if ( 'welcome' === $_GET['at-gsm-hide-notice'] ) {
				update_option( 'supermag_admin_notice_' . $notice_type, 1 );
			} else { 
				delete_option( 'supermag_admin_notice_' . $notice_type );
			}
		}
	}
public static function hide_notices ( ) { if ( isset ( $ _GET [ 'at-gsm-hide-notice' ] ) && isset ( $ _GET [ 'at_gsm_admin_notice_nonce' ] ) ) { if ( ! wp_verify_nonce ( wp_unslash ( $ _GET [ 'at_gsm_admin_notice_nonce' ] ) , 'at_gsm_hide_notices_nonce' ) ) { wp_die ( __ ( 'Action failed. Please refresh the page and retry.' , 'supermag' ) ) ; } if ( ! current_user_can ( 'manage_options' ) ) { wp_die ( __ ( 'Cheatin&#8217; huh?' , 'supermag' ) ) ; } $ notice_type = sanitize_text_field ( wp_unslash ( $ _GET [ 'at-gsm-hide-notice' ] ) ) ; update_option ( 'supermag_admin_notice_' . $ notice_type , 1 ) ; if ( 'welcome' === $ _GET [ 'at-gsm-hide-notice' ] ) { update_option ( 'supermag_admin_notice_' . $ notice_type , 1 ) ; } else { delete_option ( 'supermag_admin_notice_' . $ notice_type ) ; } } }
Get Started Notice
 Active callback of wp_loaded
 return void
Get Started Notice Active callback of wp_loaded return void
// WPCS: input var ok. // phpcs:ignore WordPress.VIP.ValidatedSanitizedInput.InputNotSanitized // WPCS: xss ok. // WPCS: xss ok. /*Update to Hide.*/ // Show.