WP_Tax_Query::get_sql()publicWP 3.1.0

Generates SQL clauses to be appended to a main query.

Метод класса: WP_Tax_Query{}

Хуков нет.


Строку[]. Array containing JOIN and WHERE SQL clauses to append to the main query.


$WP_Tax_Query = new WP_Tax_Query();
$WP_Tax_Query->get_sql( $primary_table, $primary_id_column );
$primary_table(строка) (обязательный)
Database table where the object being filtered is stored (eg wp_users).
$primary_id_column(строка) (обязательный)
ID column for the filtered object in $primary_table.

Список изменений

С версии 3.1.0 Введена.

Код WP_Tax_Query::get_sql() WP 6.4.3

public function get_sql( $primary_table, $primary_id_column ) {
	$this->primary_table     = $primary_table;
	$this->primary_id_column = $primary_id_column;

	return $this->get_sql_clauses();