check_is_user_spammed

Filters whether the user has been marked as a spammer.

Description

apply_filters( 'check_is_user_spammed', (bool) $is_user_spammy, (WP_User) $user ); 

Parameters (2)

0. $is_user_spammy (bool) => is_user_spammy( $user )
Whether the user is considered a spammer.
1. $user (WP_User)
User to check against.

Usage

To run the hook, copy the example below.
  1. $is_user_spammy = apply_filters( 'check_is_user_spammed', $is_user_spammy, $user ); 
  2.  
  3. if ( !empty( $is_user_spammy ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the check_is_user_spammed callback 
  2. function filter_check_is_user_spammed( $is_user_spammy, $user ) { 
  3. // make filter magic happen here... 
  4. return $is_user_spammy
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'check_is_user_spammed', 'filter_check_is_user_spammed', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'check_is_user_spammed', 'filter_check_is_user_spammed', 10, 2 ); 

Defined (1)

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

/wp-includes/user.php  
  1. $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user );