WordPress开发者和主题制作者的搜索引擎



rest_comment_trashable ›

Since4.7.0
已弃用n/a
apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 )
参数: (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
定义在:
文档:

Filters whether a comment can be trashed.

Return false to disable trash support for the post.





源码

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