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