Fires immediately after a comment is inserted into the database.
$comment_id, $commentdata['comment_approved'], $commentdata
Sortie :
@param int $comment_id The comment ID. @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam. @param array $commentdata Comment data.
// Ajouter une fonction au hook action 'comment_post'
add_action('comment_post', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($comment_id, $commentdata['comment_approved'], $commentdata) {
// Votre code ici
error_log('Hook comment_post déclenché');
}
Chargement des actualités...