Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




is_user_spammy [ WordPress Function ]

is_user_spammy ( $username = 0 )
Parameters:
  • (string) $username
Uses:
Returns:
  • (bool)
Defined at:



Check to see whether a user is marked as a spammer, based on username

Source


<?php
function is_user_spammy$username ) {
    if ( 
$username == ) {
        
$user_id get_current_user_id();
    } else {
        
$user_id get_user_id_from_string$username );
    }
    
$u = new WP_User$user_id );

    return ( isset( 
$u->spam ) && $u->spam == );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics