Filters the query variables allowed before processing.
Description
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.
Parameters
$public_query_vars
string[]- The array of allowed query variable names.
Source
$this->public_query_vars = apply_filters( 'query_vars', $this->public_query_vars );
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.