WP_Tax_Query::find_compatible_table_alias

Advertisement

Summery Summery

Identify an existing table alias that is compatible with the current query clause.

Syntax Syntax

WP_Tax_Query::find_compatible_table_alias( array $clause, array $parent_query )

Description Description

We avoid unnecessary table joins by allowing each clause to look for an existing table alias that is compatible with the query that it needs to perform.

An existing alias is compatible if (a) it is a sibling of $clause (ie, it’s under the scope of the same relation), and (b) the combination of operator and relation between the clauses allows for a shared table join. In the case of WP_Tax_Query, this only applies to ‘IN’ clauses that are connected by the relation ‘OR’.

Parameters Parameters

$clause

(array) (Required) Query clause.

$parent_query

(array) (Required) Parent query of $clause.

Return Return

(string|false) Table alias if found, otherwise false.

Source Source

File: wp-includes/class-wp-tax-query.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.