Explicitly globalize some missing query globals in wp-settings.php
When WordPress is loaded in a function (e.g. unit tests) the variables initialized at the top level aren't globals, but we expect them to be. Fixes #26867 git-svn-id: https://develop.svn.wordpress.org/trunk@26996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9aba880b53
commit
5eba2a13d8
@ -248,7 +248,7 @@ do_action( 'sanitize_comment_cookies' );
|
||||
* @global object $wp_the_query
|
||||
* @since 2.0.0
|
||||
*/
|
||||
$wp_the_query = new WP_Query();
|
||||
$GLOBALS['wp_the_query'] = new WP_Query();
|
||||
|
||||
/**
|
||||
* Holds the reference to @see $wp_the_query
|
||||
@ -256,7 +256,7 @@ $wp_the_query = new WP_Query();
|
||||
* @global object $wp_query
|
||||
* @since 1.5.0
|
||||
*/
|
||||
$wp_query = $wp_the_query;
|
||||
$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
|
||||
|
||||
/**
|
||||
* Holds the WordPress Rewrite object for creating pretty URLs
|
||||
@ -270,7 +270,7 @@ $GLOBALS['wp_rewrite'] = new WP_Rewrite();
|
||||
* @global object $wp
|
||||
* @since 2.0.0
|
||||
*/
|
||||
$wp = new WP();
|
||||
$GLOBALS['wp'] = new WP();
|
||||
|
||||
/**
|
||||
* WordPress Widget Factory Object
|
||||
|
Loading…
Reference in New Issue
Block a user