Fires immediately before a comment is marked as Spam.
$comment->comment_ID, $comment
Sortie :
@param int $comment_id The comment ID. @param WP_Comment $comment The comment to be marked as spam.
// Ajouter une fonction au hook action 'spam_comment'
add_action('spam_comment', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($comment->comment_ID, $comment) {
// Votre code ici
error_log('Hook spam_comment déclenché');
}
Chargement des actualités...