mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@49709 git-svn-id: http://core.svn.wordpress.org/trunk@49432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
95f28a3fd2
commit
ce3334571d
@ -229,8 +229,12 @@ function dismissed_updates() {
|
||||
function core_upgrade_preamble() {
|
||||
global $required_php_version, $required_mysql_version;
|
||||
|
||||
$wp_version = get_bloginfo( 'version' );
|
||||
$updates = get_core_updates();
|
||||
$updates = get_core_updates();
|
||||
|
||||
// Include an unmodified $wp_version.
|
||||
require ABSPATH . WPINC . '/version.php';
|
||||
|
||||
$is_development_version = preg_match( '/alpha|beta|RC/', $wp_version );
|
||||
|
||||
if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
|
||||
echo '<h2 class="response">';
|
||||
@ -245,7 +249,7 @@ function core_upgrade_preamble() {
|
||||
__( 'https://wordpress.org/support/article/updating-wordpress/' )
|
||||
);
|
||||
echo '</p></div>';
|
||||
} elseif ( isset( $updates[0] ) && 'development' === $updates[0]->response ) {
|
||||
} elseif ( $is_development_version ) {
|
||||
echo '<h2 class="response">' . __( 'You are using a development version of WordPress.' ) . '</h2>';
|
||||
} else {
|
||||
echo '<h2 class="response">' . __( 'You have the latest version of WordPress.' ) . '</h2>';
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.7-alpha-49708';
|
||||
$wp_version = '5.7-alpha-49709';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user