get_default_comment_status

过滤钩子


apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type )
参数
  • (string)
    $status
    Default status for the given post type,
    either ‘open’ or ‘closed’.
    Required:
  • (string)
    $post_type
    Post type. Default is `post`.
    Required:
  • (string)
    $comment_type
    Type of comment. Default is `comment`.
    Required:
定义位置
  • wp-includes/comment.php
    , line 309
引入
4.3.0
弃用

Filters the default comment status for the given post type.

return apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type );