pre_untrash_post

FILTER wp-includes\post.php (ligne 4117) github
Filters whether a post untrashing should take place.

Paramètres

Entrée :
null, $post, $previous_status
Sortie :
@param bool|null $untrash         Whether to go forward with untrashing.
@param WP_Post   $post            Post object.
@param string    $previous_status The status of the post at the point where it was trashed.

Utilisation

// Modifier la valeur avec le filtre 'pre_untrash_post'
add_filter('pre_untrash_post', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...