Changeset 26006
- Timestamp:
- 11/04/2013 10:46:44 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp.php
r25991 r26006 606 606 $this->handle_404(); 607 607 $this->register_globals(); 608 608 609 609 /** 610 610 * Fires once the WordPress environment has been set up. -
trunk/tests/phpunit/includes/testcase.php
r26005 r26006 187 187 $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; 188 188 $GLOBALS['wp'] = new WP(); 189 190 // clean out globals to stop them polluting wp and wp_query 191 foreach ($GLOBALS['wp']->public_query_vars as $v) { 192 unset($GLOBALS[$v]); 193 } 194 foreach ($GLOBALS['wp']->private_query_vars as $v) { 195 unset($GLOBALS[$v]); 196 } 189 _cleanup_query_vars(); 197 190 198 191 $GLOBALS['wp']->main($parts['query']); -
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.