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



rest_comment_trashable › WordPress过滤钩子

Since4.7.0
已弃用n/a
apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 )
参数: (2)
  • (bool) $supports_trash Whether the comment supports trashing.
    Required: Yes
  • (WP_Comment) $comment The comment object being considered for trashing support.
    Required: Yes
定义在:
文档:

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

Return false to disable trash support for the comment.





源码

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