posts_pre_query

posts_pre_query钩子是Wordpress钩子,过滤器::在查询发生之前过滤posts数组。

apply_filters_ref_array( ‘posts_pre_query’, array|null $posts, WP_Query $this )

说明(Description)

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


参数(Parameters)

参数类型说明
$posts(array | null)将post数据数组返回到short-circuit WP的查询,或返回null以允许WP运行其正常查询。
$this(WP_Query)WP_查询实例(通过引用传递)。

源码(Source)

//暂无
更新版本源码位置使用被使用
4.6.0wp-includes/class-wp-query.php:294410
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索