Fires before a post is restored from the Trash.
$post_id, $previous_status
Sortie :
@param int $post_id Post ID. @param string $previous_status The status of the post at the point where it was trashed.
// Ajouter une fonction au hook action 'untrash_post'
add_action('untrash_post', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($post_id, $previous_status) {
// Votre code ici
error_log('Hook untrash_post déclenché');
}
Chargement des actualités...