pre_comment_author_name

FILTER wp-includes\comment.php (ligne 631) github
Filters the comment author's name cookie before it is set. When this filter hook is evaluated in wp_filter_comment(), the comment author's name string is passed.

Paramètres

Entrée :
$_COOKIE[ 'comment_author_' . COOKIEHASH ]
Sortie :
@param string $author_cookie The comment author name cookie.

Utilisation

// Modifier la valeur avec le filtre 'pre_comment_author_name'
add_filter('pre_comment_author_name', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($_COOKIE[ 'comment_author_' . COOKIEHASH ]) {
    // Modifier la valeur
    return $_COOKIE[ 'comment_author_' . COOKIEHASH ];
}

Actualités

Chargement des actualités...