mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 23:41:38 +01:00
Ensure that the Update API's are always using a non-modified $wp_version. Props nacin. Fixes #14384
git-svn-id: http://svn.automattic.com/wordpress/trunk@17619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
197e081e19
commit
619d4d2dba
@ -23,7 +23,8 @@ function wp_version_check() {
|
|||||||
if ( defined('WP_INSTALLING') )
|
if ( defined('WP_INSTALLING') )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
global $wp_version, $wpdb, $wp_local_package;
|
global $wpdb, $wp_local_package;
|
||||||
|
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
|
||||||
$php_version = phpversion();
|
$php_version = phpversion();
|
||||||
|
|
||||||
$current = get_site_transient( 'update_core' );
|
$current = get_site_transient( 'update_core' );
|
||||||
@ -119,7 +120,7 @@ function wp_version_check() {
|
|||||||
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
|
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
|
||||||
*/
|
*/
|
||||||
function wp_update_plugins() {
|
function wp_update_plugins() {
|
||||||
global $wp_version;
|
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
|
||||||
|
|
||||||
if ( defined('WP_INSTALLING') )
|
if ( defined('WP_INSTALLING') )
|
||||||
return false;
|
return false;
|
||||||
@ -203,8 +204,8 @@ function wp_update_plugins() {
|
|||||||
*
|
*
|
||||||
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
|
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
|
||||||
*/
|
*/
|
||||||
function wp_update_themes( ) {
|
function wp_update_themes() {
|
||||||
global $wp_version;
|
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
|
||||||
|
|
||||||
if ( defined( 'WP_INSTALLING' ) )
|
if ( defined( 'WP_INSTALLING' ) )
|
||||||
return false;
|
return false;
|
||||||
@ -290,7 +291,7 @@ function wp_update_themes( ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _maybe_update_core() {
|
function _maybe_update_core() {
|
||||||
global $wp_version;
|
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
|
||||||
|
|
||||||
$current = get_site_transient( 'update_core' );
|
$current = get_site_transient( 'update_core' );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user