get_{$adjacent}_post_join

过滤钩子
apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post )
参数
  • (string) $join The JOIN clause in the SQL.
    Required:
  • (bool) $in_same_term Whether post should be in a same taxonomy term.
    Required:
  • (int[]|string) $excluded_terms Array of excluded term IDs. Empty string if none were provided.
    Required:
  • (string) $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true.
    Required:
  • (WP_Post) $post WP_Post object.
    Required:
定义位置
相关勾子
get_adjacent_post_sortget_adjacent_post_whereadjacent_post_linkget_delete_post_linkget_edit_post_link
相关方法
get_adjacent_post_linkget_adjacent_postget_adjacent_post_rel_linkadjacent_post_linkget_delete_post_linkget_adjacent_image_link
引入
4.4.0
弃用
-

get_{$adjacent}_post_join: 此函数用于检索查询中连接表的SQL语句,以获得相邻文章。

为相邻的post查询过滤SQL中的JOIN子句。

钩子名称的动态部分$adjacent指的是邻接类型,“next”或“previous”。

可能的挂钩名称包括:

  • get_next_post_join
  • get_previous_post_join
$join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2026-01-29 13:09:46

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: