comment_on_password_protected

ACTION wp-includes\comment.php (ligne 3721) github
Fires when a comment is attempted on a password-protected post.

Paramètres

Entrée :
$comment_post_id
Sortie :
@param int $comment_post_id Post ID.

Utilisation

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

function ma_fonction_personnalisee($comment_post_id) {
    // Votre code ici
    error_log('Hook comment_on_password_protected déclenché');
}

Actualités

Chargement des actualités...