You appear to be a bot. Output may be restricted
Description
Usage
_cleanup_query_vars();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/includes/utils.php
Lines:
1 to 23 of 23
function _cleanup_query_vars() { // Clean out globals to stop them polluting wp and wp_query. foreach ( $GLOBALS['wp']->public_query_vars as $v ) { unset( $GLOBALS[ $v ] ); } foreach ( $GLOBALS['wp']->private_query_vars as $v ) { unset( $GLOBALS[ $v ] ); } foreach ( get_taxonomies( array(), 'objects' ) as $t ) { if ( $t->publicly_queryable && ! empty( $t->query_var ) ) { $GLOBALS['wp']->add_query_var( $t->query_var ); } } foreach ( get_post_types( array(), 'objects' ) as $t ) { if ( is_post_type_viewable( $t ) && ! empty( $t->query_var ) ) { $GLOBALS['wp']->add_query_var( $t->query_var ); } } }