A WordPress-centric search engine for devs and theme authors



rest_comment_trashable ›

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

Filters whether a comment can be trashed.

Return false to disable trash support for the post.





Source

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