spammed_comment

ACTION wp-includes\comment.php (ligne 1760) github
Fires immediately after a comment is marked as Spam.

Paramètres

Entrée :
$comment->comment_ID, $comment
Sortie :
@param int        $comment_id The comment ID.
@param WP_Comment $comment    The comment marked as spam.

Utilisation

// Ajouter une fonction au hook action 'spammed_comment'
add_action('spammed_comment', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($comment->comment_ID, $comment) {
    // Votre code ici
    error_log('Hook spammed_comment déclenché');
}

Actualités

Chargement des actualités...