Make WordPress Core

Changeset 49711


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

Upgrade/Install: Display "You are using a development version" message in the admin footer 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.

Props afragen.
Reviewed by azaozz, SergeyBiryukov.
Merges [49708] 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

    r49241 r49711  
    247247    if ( ! isset( $cur->response ) ) {
    248248        $cur->response = '';
     249    }
     250
     251    $is_development_version = preg_match( '/alpha|beta|RC/', $cur->version );
     252
     253    if ( $is_development_version && 'latest' === $cur->response ) {
     254        $cur->response = 'development';
    249255    }
    250256
Note: See TracChangeset for help on using the changeset viewer.