get_meta_sql

過濾鉤子
apply_filters_ref_array( 'get_meta_sql', array( $sql, $this->queries, $type, $primary_table, $primary_id_column, $context )
引數
  • (string[]) $sql Array containing the query's JOIN and WHERE clauses.
    Required:
  • (array) $queries Array of meta queries.
    Required:
  • (string) $type Type of meta. Possible values include but are not limited to 'post', 'comment', 'blog', 'term', and 'user'.
    Required:
  • (string) $primary_table Primary table.
    Required:
  • (string) $primary_id_column Primary column ID.
    Required:
  • (object) $context The main query object that corresponds to the type, for example a `WP_Query`, `WP_User_Query`, or `WP_Site_Query`.
    Required:
定義位置
相關勾子
get_date_sqlget_tagsget_comment_linkget_avatar_urlget_comment_id
相關方法
get_meta_sqlget_tax_sqlget_meta_keys_get_meta_tableget_tagsget_comments
引入
3.1.0
棄用
-

get_meta_sql: 這個函式返回用於從資料庫中檢索後設資料的SQL程式碼。它需要幾個引數,包括要檢索的後設資料的型別和與之相關的物件的型別。

過濾元查詢的生成的SQL。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters_ref_array( 'get_meta_sql', array( $sql, $this->queries, $type, $primary_table, $primary_id_column, $context ) );
return apply_filters_ref_array( 'get_meta_sql', array( $sql, $this->queries, $type, $primary_table, $primary_id_column, $context ) );
return apply_filters_ref_array( 'get_meta_sql', array( $sql, $this->queries, $type, $primary_table, $primary_id_column, $context ) );

常見問題

FAQs
檢視更多 >