Make WordPress Core

Changeset 49743


Ignore:
Timestamp:
12/03/2020 08:21:14 PM (3 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.
Reviewed by azaozz, SergeyBiryukov.
Merges [49736] to the 5.6 branch.
Fixes #51892.

Location:
branches/5.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.6

  • branches/5.6/src/wp-admin/includes/update.php

    r49711 r49743  
    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.