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
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post );
$join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post );
$join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post );

常見問題

FAQs
檢視更多 >