Filters whether a post deletion should take place.
null, $post, $force_delete
Sortie :
@param WP_Post|false|null $check Whether to go forward with deletion. Anything other than null will short-circuit deletion. @param WP_Post $post Post object. @param bool $force_delete Whether to bypass the Trash.
// Modifier la valeur avec le filtre 'pre_delete_post'
add_filter('pre_delete_post', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(null) {
// Modifier la valeur
return null;
}
Chargement des actualités...