check_is_user_spammed
Filters whether the user has been marked as a spammer.
Usage
add_filter( 'check_is_user_spammed', 'wp_kama_check_is_user_spammed_filter', 10, 2 ); /** * Function for `check_is_user_spammed` filter-hook. * * @param bool $spammed Whether the user is considered a spammer. * @param WP_User $user User to check against. * * @return bool */ function wp_kama_check_is_user_spammed_filter( $spammed, $user ){ // filter... return $spammed; }
- $spammed(true|false)
- Whether the user is considered a spammer.
- $user(WP_User)
- User to check against.
Changelog
Since 3.7.0 | Introduced. |
Where the hook is called
check_is_user_spammed
wp-includes/user.php 533
$spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user );