WordPress at a glance
filter is not described

terms_pre_query filter-hook . WP 5.3.0

Filter the terms array before the query takes place.

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

Usage

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

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

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

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

Где вызывается хук

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

Где используется хук в ядре WP

Использование не найдено.