mh_newsdesk_lite_hide_notice

The MH Newsdesk lite mh newsdesk lite hide notice function.

Description

mh_newsdesk_lite_hide_notice(); 

Usage

  1. if ( !function_exists( 'mh_newsdesk_lite_hide_notice' ) ) { 
  2. require_once '/admin/admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = mh_newsdesk_lite_hide_notice(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/admin/admin.php  
  1. function mh_newsdesk_lite_hide_notice() { 
  2. if (isset($_GET['mh-newsdesk-lite-hide-notice']) && isset($_GET['_mh_newsdesk_lite_notice_nonce'])) { 
  3. if (!wp_verify_nonce($_GET['_mh_newsdesk_lite_notice_nonce'], 'mh_newsdesk_lite_hide_notices_nonce')) { 
  4. wp_die(__('Action failed. Please refresh the page and retry.', 'mh-newsdesk-lite')); 
  5. if (!current_user_can('edit_theme_options')) { 
  6. wp_die(__('You do not have the necessary permission to perform this action.', 'mh-newsdesk-lite')); 
  7. $hide_notice = sanitize_text_field($_GET['mh-newsdesk-lite-hide-notice']); 
  8. update_option('mh_newsdesk_lite_notice_' . $hide_notice, 1);