wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_comment_trashable › WordPress Filter Hooks

Since4.7.0
Deprecatedn/a
apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 )
Parameters: (2)
  • (bool) $supports_trash Whether the comment supports trashing.
    Required: Yes
  • (WP_Comment) $comment The comment object being considered for trashing support.
    Required: Yes
Defined at:
Codex:

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

Return false to disable trash support for the comment.





Source

$supports_trash = apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 ), $comment );