apply_filters_ref_array( ‘terms_pre_query’, array|null $terms, WP_Term_Query $query )

Filters the terms array before the query takes place.

Description

Return a non-null value to bypass WordPress’ default term queries.

Parameters

$termsarray|null
Return an array of term data to short-circuit WP’s term query, or null to allow WP queries to run normally.
$queryWP_Term_Query
The WP_Term_Query instance, passed by reference.

Source

$this->terms = apply_filters_ref_array( 'terms_pre_query', array( $this->terms, &$this ) );

Changelog

VersionDescription
5.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.