get_default_comment_status()
get_default_comment_status( string $post_type = ‘post’, string $comment_type = ‘comment’ )
获取文章类型的默认注释状态。
Gets the default comment status for a post type.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$post_type | (string) | 可选 | 岗位类型。 |
$comment_type | (string) | 可选 | 注释类型。 |
返回(Return)
(string)预期返回值为“open”或“closed”。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.3.0 | wp-includes/comment.php:276 | 4 | 4 |
get_default_comment_status() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_default_comment_status/