wp_count_comments

FILTER wp-includes\comment.php (ligne 1363) github
Fires before the comment is tested for disallowed characters or words.
traduction française
Se déclenche avant que le commentaire ne soit testé pour détecter les caractères ou les mots interdits.

Paramètres

Entrée :
$post_id = 0
Sortie :
@param string $author     Comment author.
@param string $email      Comment author's email.
@param string $url        Comment author's URL.
@param string $comment    Comment content.
@param string $user_ip    Comment author's IP address.
@param string $user_agent Comment author's browser user agent.
@param string $author     Comment author.
@param string $email      Comment author's email.
@param string $url        Comment author's URL.
@param string $comment    Comment content.
@param string $user_ip    Comment author's IP address.
@param string $user_agent Comment author's browser user agent.
@param int $post_id Optional. Restrict the comment counts to the given post. Default 0, which indicates that
@return stdClass {

Utilisation

Filtrer le décompte des commentaires

Filtre pour modifier le décompte.

database
add_filter('wp_count_comments', 'custom_comment_count', 10, 2);
function custom_comment_count($counts, $post_id) {
    return $counts;
}

Actualités

Chargement des actualités...