query_vars

query_vars

Hook Type: filter
See hook in action
See hook in
Displaying hooks found in version: wordpress-5.2.2

apply_filters('query_vars') is found 1 times:

  • /wp-includes/class-wp.php line 287
    		 * @since 1.5.0
    		 *
    		 * @param string[] $public_query_vars The array of whitelisted query variable names.
    		 */
    		$this->public_query_vars = apply_filters( 'query_vars', $this->public_query_vars );
    
    		foreach ( get_post_types( array(), 'objects' ) as $post_type => $t ) {
    			if ( is_post_type_viewable( $t ) && $t->query_var ) {
    				$post_type_query_vars[ $t->query_var ] = $post_type;
    			}
    		}
    

See this hook used in plugins: