Changeset 26006 for trunk/tests/phpunit/includes/utils.php
- Timestamp:
- 11/04/2013 10:46:44 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/utils.php
r25254 r26006 364 364 unset( $GLOBALS['wp_taxonomies'][$taxonomy_name] ); 365 365 } 366 367 function _cleanup_query_vars() { 368 // clean out globals to stop them polluting wp and wp_query 369 foreach ( $GLOBALS['wp']->public_query_vars as $v ) 370 unset( $GLOBALS[$v] ); 371 372 foreach ( $GLOBALS['wp']->private_query_vars as $v ) 373 unset( $GLOBALS[$v] ); 374 375 foreach ( get_taxonomies( array() , 'objects' ) as $t ) { 376 if ( ! empty( $t->query_var ) ) 377 $GLOBALS['wp']->add_query_var( $t->query_var ); 378 } 379 380 foreach ( get_post_types( array() , 'objects' ) as $t ) { 381 if ( ! empty( $t->query_var ) ) 382 $GLOBALS['wp']->add_query_var( $t->query_var ); 383 } 384 }
Note: See TracChangeset
for help on using the changeset viewer.