get_tax_sql( array $tax_query, string $primary_table, string $primary_id_column )
Given a taxonomy query, generates SQL to be appended to a main query.
Description Description
See also See also
Parameters Parameters
- $tax_query
-
(array) (Required) A compact tax query
- $primary_table
-
(string) (Required)
- $primary_id_column
-
(string) (Required)
Return Return
(array)
Source Source
File: wp-includes/taxonomy.php
function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) { $tax_query_obj = new WP_Tax_Query( $tax_query ); return $tax_query_obj->get_sql( $primary_table, $primary_id_column ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Get SQL query part for taxonomy
Output would be something like: