pre_comment_user_ip

FILTER wp-includes\comment.php (ligne 2233) github
Filters the comment author's IP address before it is set.

Paramètres

Entrée :
$commentdata['comment_author_IP']
Sortie :
@param string $comment_author_ip The comment author's IP address.

Utilisation

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

function ma_fonction_filtre($commentdata['comment_author_IP']) {
    // Modifier la valeur
    return $commentdata['comment_author_IP'];
}

Actualités

Chargement des actualités...