wpseo_set_ignore

Function used to remove the admin notices for several purposes, dies on exit.

Description

wpseo_set_ignore(); 

Usage

  1. if ( !function_exists( 'wpseo_set_ignore' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/admin/ajax.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpseo_set_ignore(); 
  7.  

Defined (1)

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

/admin/ajax.php  
  1. function wpseo_set_ignore() { 
  2. if ( ! current_user_can( 'manage_options' ) ) { 
  3. die( '-1' ); 
  4.  
  5. check_ajax_referer( 'wpseo-ignore' ); 
  6.  
  7. $ignore_key = sanitize_text_field( filter_input( INPUT_POST, 'option' ) ); 
  8.  
  9. $options = get_option( 'wpseo' ); 
  10. $options[ 'ignore_' . $ignore_key ] = true; 
  11. update_option( 'wpseo', $options ); 
  12.  
  13. die( '1' );