wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
wp_authenticate_spam_check › WordPress Function
Depuis3.7.0
Dépréciéen/a
› wp_authenticate_spam_check ( $user )
Paramètres: |
|
Retourne: |
|
Défini(e) dans: |
|
Codex: |
For Multisite blogs, checks if the authenticated user has been marked as a spammer, or if the user's primary blog has been marked as spam.
Fonctions en relation: wp_authenticate_cookie, wp_authenticate, wp_authenticate_username_password, wp_auth_check, wp_authenticate_email_password
Source
function wp_authenticate_spam_check( $user ) { if ( $user instanceof WP_User && is_multisite() ) { /** * Filters whether the user has been marked as a spammer. * * @since 3.7.0 * * @param bool $spammed Whether the user is considered a spammer. * @param WP_User $user User to check against. */ $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user ); if ( $spammed ) { return new WP_Error( 'spammer_account', __( '<strong>Error:</strong> Your account has been marked as a spammer.' ) ); } } return $user; }