WordPress at Your Fingertips
filter is not described

rest_comment_trashable filter-hook . WP 4.7.0

Filters whether a comment can be trashed via the REST API.

Return false to disable trash support for the comment.


add_filter( 'rest_comment_trashable', 'filter_function_name_5102', 10, 2 );
function filter_function_name_5102( $supports_trash, $comment ){
	// filter...

	return $supports_trash;
Whether the comment supports trashing.
The comment object being considered for trashing support.


Since 4.7.0 Introduced.

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 967
$supports_trash = apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 ), $comment );

Where in WP core the hook is used WordPress

Usage not found.