AtD_process_unignore_update

Called when a POST occurs, used to save AtD ignored phrases.

Description

AtD_process_unignore_update(); 

Usage

  1. if ( !function_exists( 'AtD_process_unignore_update' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/after-the-deadline/config-unignore.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = AtD_process_unignore_update(); 
  7.  

Defined (1)

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

/modules/after-the-deadline/config-unignore.php  
  1. function AtD_process_unignore_update() { 
  2.  
  3. if ( ! AtD_is_allowed() ) 
  4. return; 
  5.  
  6. if ( ! isset( $_POST['AtD_ignored_phrases'] ) ) 
  7. return; 
  8.  
  9. $user = wp_get_current_user(); 
  10.  
  11. if ( ! $user || $user->ID == 0 ) 
  12. return; 
  13.  
  14. $ignores = array_filter( array_map( 'strip_tags', explode( ', ', $_POST['AtD_ignored_phrases'] ) ) ); 
  15. AtD_update_setting( $user->ID, 'AtD_ignored_phrases', join( ', ', $ignores ) );