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