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

Built from https://develop.svn.wordpress.org/trunk@26996


git-svn-id: http://core.svn.wordpress.org/trunk@26873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Nikolay Bachiyski 2014-01-22 08:25:12 +00:00
parent 335add2573
commit 80af25060b

View File

@ -248,7 +248,7 @@ do_action( 'sanitize_comment_cookies' );
* @global object $wp_the_query * @global object $wp_the_query
* @since 2.0.0 * @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 * Holds the reference to @see $wp_the_query
@ -256,7 +256,7 @@ $wp_the_query = new WP_Query();
* @global object $wp_query * @global object $wp_query
* @since 1.5.0 * @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 * Holds the WordPress Rewrite object for creating pretty URLs
@ -270,7 +270,7 @@ $GLOBALS['wp_rewrite'] = new WP_Rewrite();
* @global object $wp * @global object $wp
* @since 2.0.0 * @since 2.0.0
*/ */
$wp = new WP(); $GLOBALS['wp'] = new WP();
/** /**
* WordPress Widget Factory Object * WordPress Widget Factory Object