get_{$adjacent}_post_join
apply_filters( “get_{$adjacent}_post_join”, string $join , bool $in_same_term , array $excluded_terms , string $taxonomy , WP_Post $post )
过滤器::为相邻的post查询筛选SQL中的JOIN子句。
Filter Hook: Filters the JOIN clause in the SQL for an adjacent post query.
说明(Description)
钩子名称的动态部分,$adjacent是指邻接类型,“next”或“previous”。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$join | (string) | SQL中的JOIN子句。 |
$in_same_term | (bool) | post是否应该在同一个分类术语中。 |
$excluded_terms | (array) | 排除的术语ID数组。 |
$taxonomy | (string) | 分类学。用于标识当$in_same_term为true时使用的术语。 |
$post | (WP_Post) | WP_Post对象。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.4.0 | wp-includes/link-template.php:1822 | 1 | 0 |
get_{$adjacent}_post_join 为WP2原创文章,链接:https://www.wp2.cn/hook/get_adjacent_post_join/