Filter hook 'query_vars'

in WP Core File wp-includes/class-wp.php at line 311

Description

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.

Occurrences

Filename Line Number
wp-includes/class-wp.php 311

Parameters

Type Name Description
string[] $public_query_vars The array of allowed query variable names.

PHP Doc

/**
		 * 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.
		 *
		 * @since 1.5.0
		 *
		 * @param string[] $public_query_vars The array of allowed query variable names.
		 */