mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
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. Explicitly make the version variables global.
Props nbachiyski. Fixes #23685. Built from https://develop.svn.wordpress.org/trunk@26008 git-svn-id: http://core.svn.wordpress.org/trunk@25939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ca85591c3c
commit
92ba8748aa
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The WordPress version string
|
* The WordPress version string
|
||||||
*
|
*
|
||||||
|
@ -20,6 +20,13 @@ define( 'WPINC', 'wp-includes' );
|
|||||||
// Include files required for initialization.
|
// Include files required for initialization.
|
||||||
require( ABSPATH . WPINC . '/load.php' );
|
require( ABSPATH . WPINC . '/load.php' );
|
||||||
require( ABSPATH . WPINC . '/default-constants.php' );
|
require( ABSPATH . WPINC . '/default-constants.php' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These can't be directly globalized in version.php. When updating,
|
||||||
|
* we're including version.php from another install and don't want
|
||||||
|
* these values to be overridden if already set.
|
||||||
|
*/
|
||||||
|
global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version;
|
||||||
require( ABSPATH . WPINC . '/version.php' );
|
require( ABSPATH . WPINC . '/version.php' );
|
||||||
|
|
||||||
// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
|
// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
|
||||||
|
Loading…
Reference in New Issue
Block a user