get_approved_comments()
get_approved_comments( int $post_id, array $args = array() )
检索已批准的post$post_id评论。
Retrieve the approved comments for post $post_id.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$post_id | (int) | 必需 | 邮件的ID。 |
$args | (array) | 可选 | 有关接受的参数的信息,请参见WPúu Comment戋u Query::戋u construct()。 |
返回(Return)
(int|array)$comments批准的注释,或者如果$count参数为true,则为注释数。
源码(Source)
current_user_can_for_blog() 函数的代码位于 wp-includes/capabilities.php
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.1.0 | wp-includes/comment.php:162 | 0 | 2 |
笔记(Notes)
例子
get_approved_comments() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_approved_comments/