terms_clauses

過濾鉤子
apply_filters( 'terms_clauses', compact( $pieces )
引數
  • (string[]) $clauses { Associative array of the clauses for the query. @type string $fields The SELECT clause of the query. @type string $join The JOIN clause of the query. @type string $where The WHERE clause of the query. @type string $distinct The DISTINCT clause of the query. @type string $orderby The ORDER BY clause of the query. @type string $order The ORDER clause of the query. @type string $limits The LIMIT clause of the query. }
    Required:
  • (string[]) $taxonomies An array of taxonomy names.
    Required:
  • (array) $args An array of term query arguments.
    Required:
定義位置
相關勾子
sites_clausesnetworks_clauseslist_terms_exclusionscategory_css_classterm_name
相關方法
post_classget_post_classwp_terms_checklist_prime_term_cachesterm_existspostbox_classes
引入
3.1.0
棄用
-

terms_clauses – 這個過濾器允許開發者修改術語查詢中使用的條款。terms_clauses過濾器適用於術語查詢的子句,可用於修改查詢的WHERE、ORDER BY、LIMIT和OFFSET子句。

過濾術語查詢的SQL條款。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );
$clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );
$clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );

常見問題

FAQs
檢視更多 >