wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_{$adjacent}_post_where › WordPress过滤钩子

Since6.9.0
已弃用n/a
› apply_filters( "get_{$adjacent}_post_where", $where_prepared, $in_same_term, $excluded_terms, $taxonomy, $post )
参数: (5)
  • () where The `WHERE` clause in the SQL.
    Required: Yes
  • () in_same_term Whether post should be in the same taxonomy term.
    Required: Yes
  • () excluded_terms Array of excluded term IDs. Empty string if none were provided.
    Required: Yes
  • () taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true.
    Required: Yes
  • () post WP_Post object.
    Required: Yes
定义在:
文档:

Filters the WHERE clause in the SQL for an adjacent post query.

The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency, 'next' or 'previous'. Possible hook names include: - `get_next_post_where` - `get_previous_post_where`




源码

$where = apply_filters( "get_{$adjacent}_post_where", $where_prepared, $in_same_term, $excluded_terms, $taxonomy, $post );