Make WordPress Core


Ignore:
Timestamp:
11/30/2020 01:40:02 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Display "You are using a development version" message on WordPress Updates screen for Beta or RC versions.

This ensures that the message is displayed when the WP_AUTO_UPDATE_CORE constant is set to beta or rc and the user is on a development version.

Follow-up to [49245], [49254], [49292], [49638], [49708].

Props afragen, audrasjb, azaozz, SergeyBiryukov.
Fixes #51822.

File:
1 edited

Legend:

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

    r49681 r49709  
    230230    global $required_php_version, $required_mysql_version;
    231231
    232     $wp_version = get_bloginfo( 'version' );
    233     $updates    = get_core_updates();
     232    $updates = get_core_updates();
     233
     234    // Include an unmodified $wp_version.
     235    require ABSPATH . WPINC . '/version.php';
     236
     237    $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version );
    234238
    235239    if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
     
    246250        );
    247251        echo '</p></div>';
    248     } elseif ( isset( $updates[0] ) && 'development' === $updates[0]->response ) {
     252    } elseif ( $is_development_version ) {
    249253        echo '<h2 class="response">' . __( 'You are using a development version of WordPress.' ) . '</h2>';
    250254    } else {
Note: See TracChangeset for help on using the changeset viewer.