check_is_user_spammed
Filters whether the user has been marked as a spammer.
Использование
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.
Список изменений
| С версии 3.7.0 | Введена. |
Где вызывается хук
check_is_user_spammed
wp-includes/user.php 565
$spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user );