query_vars

query_vars

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('query_vars') is found 1 times:

  • /wp-includes/class-wp.php line 311
    		 * @since 1.5.0
    		 *
    		 * @param string[] $public_query_vars The array of allowed 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: