edit_comment

ACTION wp-includes\comment.php (ligne 2752) github
Fires immediately after a comment is updated in the database. The hook also fires immediately before comment status transition hooks are fired.

Paramètres

Entrée :
$comment_id, $data
Sortie :
@param int   $comment_id The comment ID.
@param array $data       Comment data.

Utilisation

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

function ma_fonction_personnalisee($comment_id, $data) {
    // Votre code ici
    error_log('Hook edit_comment déclenché');
}

Actualités

Chargement des actualités...