Fires after a comment is created or updated via the REST API.
$comment, $request, true
Sortie :
@param WP_Comment $comment Inserted or updated comment object. @param WP_REST_Request $request Request object. @param bool $creating True when creating a comment, false
// Ajouter une fonction au hook action 'rest_insert_comment'
add_action('rest_insert_comment', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($comment, $request, true) {
// Votre code ici
error_log('Hook rest_insert_comment déclenché');
}
Chargement des actualités...