posts_orderby
apply_filters_ref_array( ‘posts_orderby’, string $orderby , WP_Query $this )
过滤器::过滤查询的ORDER BY子句。
Filter Hook: Filters the ORDER BY clause of the query.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$orderby | (string) | 查询的ORDER BY子句。 |
$this | (WP_Query) | WP_查询实例(通过引用传递)。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
1.5.1 | wp-includes/class-wp-query.php:2723 | 1 | 0 |
笔记(Notes)
有助于在前端自定义排名职位,
posts_orderby 为WP2原创文章,链接:https://www.wp2.cn/hook/posts_orderby/