过滤器::筛选用于在comments_template()中查询注释的参数。
apply_filters( ‘comments_template_query_args’, array $comment_args )
说明(Description)
另见函数 WP_Comment_Query::__construct()()
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$comment_args | (array) | WP_Comment_Query参数的数组order by’(string | array)要排序的字段。 |
‘order'(string) Order of results. Accepts ‘ASC’ or ‘DESC’. | ‘status’(string) Comment status. | “include_unapproved”(数组)结果中将包含其未经批准的评论的ID或电子邮件地址数组。 |
‘post_id'(int) ID of the post. | ‘no_found_rows’(bool) Whether to refrain from querying for found rows. | “update_comment_meta_cache”(bool)是否对comment meta的缓存进行初始化。 |
‘hierarchical'(bool|string) Whether to query for comments hierarchically. | ‘offset’(int) Comment offset. | “number”(int)要提取的注释数。 |
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.5.0 | wp-includes/comment-template.php:1461 | 1 | 0 |