wppaste
WordPress

apply_filters( 'terms_clauses', string[] $clauses, string[] $taxonomies, array $args )

Since
3.1.0
Filters the terms query SQL clauses.

Parameters

$clausesstring[]
{ Associative array of the clauses for the query. @type string $fields The SELECT clause of the query. @type string $join The JOIN clause of the query. @type string $where The WHERE clause of the query. @type string $distinct The DISTINCT clause of the query. @type string $orderby The ORDER BY clause of the query. @type string $order The ORDER clause of the query. @type string $limits The LIMIT clause of the query.}
  • $fieldsstring

    The SELECT clause of the query.
  • $joinstring

    The JOIN clause of the query.
  • $wherestring

    The WHERE clause of the query.
  • $distinctstring

    The DISTINCT clause of the query.
  • $orderbystring

    The ORDER BY clause of the query.
  • $orderstring

    The ORDER clause of the query.
  • $limitsstring

    The LIMIT clause of the query.
$taxonomiesstring[]
An array of taxonomy names.
$argsarray
An array of term query arguments.

Fired at · 1

  • wp-includes/class-wp-term-query.php:728WP_Term_Query::get_terms()

Source

		 *     @type string $order    The ORDER clause of the query.		 *     @type string $limits   The LIMIT clause of the query.		 * }		 * @param string[] $taxonomies An array of taxonomy names.		 * @param array    $args       An array of term query arguments.		 */		$clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args ); 		$fields   = $clauses['fields'] ?? '';		$join     = $clauses['join'] ?? '';		$where    = $clauses['where'] ?? '';		$distinct = $clauses['distinct'] ?? '';		$orderby  = $clauses['orderby'] ?? '';

History

Introduced in 3.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.0.4 tag, 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.