Filters whether an attachment deletion should take place.
null, $post, $force_delete
Sortie :
@param WP_Post|false|null $delete Whether to go forward with deletion. @param WP_Post $post Post object. @param bool $force_delete Whether to bypass the Trash.
// Modifier la valeur avec le filtre 'pre_delete_attachment'
add_filter('pre_delete_attachment', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(null) {
// Modifier la valeur
return null;
}
Chargement des actualités...