On this page
apply_filters( 'rest_comment_trashable', bool $supports_trash, WP_Comment $comment )
Filters whether a comment can be trashed via the REST API.
Description
Return false to disable trash support for the comment.
Parameters
$supports_trashbool-
Whether the comment supports trashing.
$commentWP_Comment-
The comment object being considered for trashing support.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php. View all references
$supports_trash = apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 ), $comment );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Comments_Controller::delete_item() wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Deletes a comment. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_comment_trashable