wppaste
WordPress

WP_Tax_Query::get_sql_clauses(): string[]

Since
4.1.0
Source
wp-includes/class-wp-tax-query.php:269
Generates SQL clauses to be appended to a main query.

Description

Called by the public WP_Tax_Query::get_sql(), this method is abstracted out to maintain parity with the other Query classes.

Return

string[]
Array containing JOIN and WHERE SQL clauses to append to the main query.
  • $joinstring

    SQL fragment to append to the main JOIN clause.
  • $wherestring

    SQL fragment to append to the main WHERE clause.

Uses · 1

Used by · 1

Source

	protected function get_sql_clauses() {		/*		 * $queries are passed by reference to get_sql_for_query() for recursion.		 * To keep $this->queries unaltered, pass a copy.		 */		$queries = $this->queries;		$sql     = $this->get_sql_for_query( $queries ); 		if ( ! empty( $sql['where'] ) ) {			$sql['where'] = ' AND ' . $sql['where'];		} 		return $sql;	}

History

Introduced in 4.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/class-wp-tax-query.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.