WordPress at Your Fingertips
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.


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

	return $public_query_vars;
The array of allowed query variable names.


Since 1.5.0 Introduced.

Where the hook is called

wp-includes/class-wp.php 288
$this->public_query_vars = apply_filters( 'query_vars', $this->public_query_vars );

Where in WP core the hook is used WordPress

Usage not found.