trash_post_comments

ACTION wp-includes\post.php (ligne 4210) github
Fires before comments are sent to the Trash.

Paramètres

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

Utilisation

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

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

Actualités

Chargement des actualités...