Make WordPress Core

Changeset 49736


Ignore:
Timestamp:
12/03/2020 02:04:32 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Check $wp_version global for displaying "You are using a development version" message in the admin footer.

This brings some consistency with the same check in core_upgrade_preamble() and avoids a PHP warning if $cur->version is not set.

Additionally, remove the check for $cur->url property, unused since [8595].

Follow-up to [49708], [49709].

Props pbiron, afragen, audrasjb.
Fixes #51892.

File:
1 edited

Legend:

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

    r49708 r49736  
    241241    }
    242242
    243     if ( ! isset( $cur->url ) ) {
    244         $cur->url = '';
    245     }
    246 
    247243    if ( ! isset( $cur->response ) ) {
    248244        $cur->response = '';
    249245    }
    250246
    251     $is_development_version = preg_match( '/alpha|beta|RC/', $cur->version );
     247    // Include an unmodified $wp_version.
     248    require ABSPATH . WPINC . '/version.php';
     249
     250    $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version );
    252251
    253252    if ( $is_development_version && 'latest' === $cur->response ) {
Note: See TracChangeset for help on using the changeset viewer.