comments_pre_query

过滤钩子:在查询发生之前过滤注释数据。

apply_filters_ref_array( ‘comments_pre_query’, array|int|null $comment_data , WP_Comment_Query $this )

说明(Description)

返回非空值以绕过WordPress的默认注释查询。


参数(Parameters)

参数类型说明
$comment_data(array | int | null)将注释数据数组返回到short-circuit WP的注释查询,如果设置了$this->query_vars[‘count’],则注释计数为整数,或者为空以允许WP运行其正常查询。
$this(WP_Comment_Query)WP_Comment_查询实例,通过引用传递。
更新版本源码位置使用被使用
5.3.0wp-includes/class-wp-comment-query.php:40110
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索