Advertisements

get_tax_sql

Definition:
function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) {}

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

Parameters

  • array $tax_query: A compact tax query
  • string $primary_table
  • string $primary_id_column

Source code

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

}

9677

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: