WordPress at a glance
filter is not described

query_vars filter-hook . WP 1.5.0

Filters the query variables allowed before processing.

Allows (publicly allowed) query vars to be added, removed, or changed prior to executing the query. Needed to allow custom rewrite rules using your own arguments to work, or any other custom query variables you want to be publicly available.

Usage

add_filter( 'query_vars', 'filter_function_name_823' );
function filter_function_name_823( $public_query_vars ){
	// filter...

	return $public_query_vars;
}
$public_query_vars(string[])
The array of allowed query variable names.

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

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

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

WP::parse_request()
query_vars
WC_REST_Posts_Controller::get_allowed_query_vars()
query_vars
wp-includes/class-wp.php 288
$this->public_query_vars = apply_filters( 'query_vars', $this->public_query_vars );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-posts-controller.php 555
$valid_vars = apply_filters( 'query_vars', $wp->public_query_vars );

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

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