WordPress at a glance
filter is not described

rest_(post_type)_trashable filter-hook . WP 4.7.0

Filters whether a post is trashable.

The dynamic portion of the hook name, $this->post_type, refers to the post type slug.

Pass false to disable trash support for the post.


add_filter( 'rest_(post_type)_trashable', 'filter_function_name_3523', 10, 2 );
function filter_function_name_3523( $supports_trash, $post ){
	// filter...

	return $supports_trash;
Whether the post type support trashing.
The Post object being considered for trashing support.


Since 4.7.0 Introduced.

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 819
$supports_trash = apply_filters( "rest_{$this->post_type}_trashable", $supports_trash, $post );

Where the hook is used (in WP core)

Usage not found!