Wordpress 钩子:get_adjacent_post_where
文章目录
在SQL中过滤相邻帖子查询的WHERE子句。
原型
apply_filters( "get_{$adjacent}_post_where", string $where, bool $in_same_term, array $excluded_terms, string $taxonomy, WP_Post $post )
描述
钩子名称的动态部分$ adjacent指的是邻接类型,“next”或“previous”。
参数
$where
(string)
SQL中的WHERE子句。
$in_same_term
(bool)
帖子是否应该在同一个分类学术语中。
$excluded_terms
(array)
排除的术语ID数组。
$taxonomy
(string)
分类。用于标识$ in_same_term为true时使用的术语。
$post
(WP_Post)
WP_Post对象。
源文件
路径:wp-includes/link-template.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/get_adjacent_post_where/
文章作者 iBllex
上次更新 2019-02-14