Filter whether an item is trashable. Return false to disable trash support for the item.
$supports_trash, $post
Sortie :
@param boolean $supports_trash Whether the item type support trashing. @param WP_Post $post The Post object being considered for trashing support.
// Modifier la valeur avec le filtre 'woocommerce_rest_{$this->post_type}_trashable'
add_filter('woocommerce_rest_{$this->post_type}_trashable', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($supports_trash) {
// Modifier la valeur
return $supports_trash;
}
Chargement des actualités...