wpseek.com
A WordPress-centric search engine for devs and theme authors



get_tax_sql › WordPress Function

Since3.1.0
Deprecatedn/a
get_tax_sql ( $tax_query, $primary_table, $primary_id_column )
Parameters: (3)
  • (array) $tax_query A compact tax query
    Required: Yes
  • (string) $primary_table
    Required: Yes
  • (string) $primary_id_column
    Required: Yes
See:
  • WP_Tax_Query
Returns:
  • (string[])
Defined at:
Codex:

Given a taxonomy query, generates SQL to be appended to a main query.



Source

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 );
}