Updates: Avoid stomping global $wp_version in wp_version_check() and related.

fixes #34868.


git-svn-id: https://develop.svn.wordpress.org/trunk@35779 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2015-12-06 17:38:35 +00:00
parent ee8215e442
commit 57d7375d46

View File

@ -26,7 +26,7 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
return; return;
} }
global $wp_version, $wpdb, $wp_local_package; global $wpdb, $wp_local_package;
// include an unmodified $wp_version // include an unmodified $wp_version
include( ABSPATH . WPINC . '/version.php' ); include( ABSPATH . WPINC . '/version.php' );
$php_version = phpversion(); $php_version = phpversion();
@ -192,7 +192,6 @@ function wp_update_plugins( $extra_stats = array() ) {
return; return;
} }
global $wp_version;
// include an unmodified $wp_version // include an unmodified $wp_version
include( ABSPATH . WPINC . '/version.php' ); include( ABSPATH . WPINC . '/version.php' );
@ -348,7 +347,7 @@ function wp_update_themes( $extra_stats = array() ) {
if ( wp_installing() ) { if ( wp_installing() ) {
return; return;
} }
global $wp_version;
// include an unmodified $wp_version // include an unmodified $wp_version
include( ABSPATH . WPINC . '/version.php' ); include( ABSPATH . WPINC . '/version.php' );
@ -586,8 +585,8 @@ function wp_get_update_data() {
* @global string $wp_version * @global string $wp_version
*/ */
function _maybe_update_core() { function _maybe_update_core() {
global $wp_version; // include an unmodified $wp_version
include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version include( ABSPATH . WPINC . '/version.php' );
$current = get_site_transient( 'update_core' ); $current = get_site_transient( 'update_core' );