mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-02-23 09:12:51 +00:00
Upgrade/Install: Display version number on the "Update now" button on WordPress Updates screen.
Additionally, adjust the "Update to latest nightly" button to include the major version number of the nightly build. This makes the button labels more accurate and provides more clear understanding of what the update will be. Follow-up to [49984]. Props afragen, pbiron, SergeyBiryukov. Fixes #52513. git-svn-id: https://develop.svn.wordpress.org/trunk@50506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fa05e5e733
commit
3d8a5fd839
@ -55,15 +55,23 @@ function list_core_update( $update ) {
|
||||
$current = true;
|
||||
}
|
||||
|
||||
$is_development_version = preg_match( '/alpha|beta|RC/', $version_string );
|
||||
|
||||
$message = '';
|
||||
$submit = $is_development_version ? __( 'Update to latest nightly' ) : __( 'Update now' );
|
||||
$form_action = 'update-core.php?action=do-core-upgrade';
|
||||
$php_version = phpversion();
|
||||
$mysql_version = $wpdb->db_version();
|
||||
$show_buttons = true;
|
||||
|
||||
// Nightly build versions have two hyphens and a commit number.
|
||||
if ( preg_match( '/-\w+-\d+/', $update->current ) ) {
|
||||
// Retrieve the major version number.
|
||||
preg_match( '/^\d+.\d+/', $update->current, $update_major );
|
||||
/* translators: %s: WordPress version. */
|
||||
$submit = sprintf( __( 'Update to latest %s nightly' ), $update_major[0] );
|
||||
} else {
|
||||
/* translators: %s: WordPress version. */
|
||||
$submit = sprintf( __( 'Update to version %s' ), $version_string );
|
||||
}
|
||||
|
||||
if ( 'development' === $update->response ) {
|
||||
$message = __( 'You can update to the latest nightly build manually:' );
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user