wp_check_comment_disallowed_list

FUNCTION wp-includes\comment.php (ligne 1335) github
Filters a comment's approval status before it is set.

Paramètres

Entrée :
$author, $email, $url, $comment, $user_ip, $user_agent
Sortie :
@param int|string|WP_Error $approved    The approval status. Accepts 1, 0, 'spam', 'trash',
@param array               $commentdata Comment data.
@param string $author     The author of the comment.
@param string $email      The email of the comment.
@param string $url        The url used in the comment.
@param string $comment    The comment content.
@param string $user_ip    The comment author's IP address.
@param string $user_agent The author's browser user agent.
@return bool True if the comment contains disallowed content, false otherwise.

Utilisation

// Utilisation de la fonction wp_check_comment_disallowed_list
$result = wp_check_comment_disallowed_list($author, $email, $url, $comment, $user_ip, $user_agent);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...