WordPress.org

Make WordPress Core

Changeset 17619


Ignore:
Timestamp:
04/07/2011 10:04:45 AM (7 years ago)
Author:
dd32
Message:

Ensure that the Update API's are always using a non-modified $wp_version. Props nacin. Fixes #14384

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/update.php

    r17618 r17619  
    2424        return;
    2525
    26     global $wp_version, $wpdb, $wp_local_package;
     26    global $wpdb, $wp_local_package;
     27    include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
    2728    $php_version = phpversion();
    2829
     
    120121 */
    121122function wp_update_plugins() {
    122     global $wp_version;
     123    include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
    123124
    124125    if ( defined('WP_INSTALLING') )
     
    204205 * @return mixed Returns null if update is unsupported. Returns false if check is too soon.
    205206 */
    206 function wp_update_themes( ) {
    207     global $wp_version;
     207function wp_update_themes() {
     208    include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
    208209
    209210    if ( defined( 'WP_INSTALLING' ) )
     
    291292
    292293function _maybe_update_core() {
    293     global $wp_version;
     294    include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
    294295
    295296    $current = get_site_transient( 'update_core' );
Note: See TracChangeset for help on using the changeset viewer.