Moves a post or page to the Trash If Trash is disabled, the post or page is permanently deleted.
$post_id = 0
Sortie :
@param int $post_id Optional. Post ID. Default is the ID of the global `$post` @return WP_Post|false|null Post data on success, false or null on failure.
// Utilisation de la fonction wp_trash_post
$result = wp_trash_post($post_id = 0);
if ($result) {
// Votre logique ici
}
Chargement des actualités...