WordPress at Your Fingertips
filter is not described

terms_pre_query filter-hook . WP 5.3.0

Filters the terms array before the query takes place.

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


add_filter( 'terms_pre_query', 'filter_function_name_4566', 10, 2 );
function filter_function_name_4566( $terms, $query ){
	// filter...

	return $terms;
Return an array of term data to short-circuit WP's term query, or null to allow WP queries to run normally.
The WP_Term_Query instance, passed by reference.


Since 5.3.0 Introduced.

Where the hook is called

wp-includes/class-wp-term-query.php 733
$this->terms = apply_filters_ref_array( 'terms_pre_query', array( $this->terms, &$this ) );

Where in WP core the hook is used WordPress

Usage not found.