Make WordPress Core

Ticket #51774: 51774.7.diff

File 51774.7.diff, 1.8 KB (added by afragen, 4 years ago)

update variable name

  • wp-admin/update-core.php

    diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
    index 3beb87b6ed..5cd6c433eb 100644
    a b function list_core_update( $update ) { 
    3838        static $first_pass = true;
    3939
    4040        $wp_version     = get_bloginfo( 'version' );
    41         $version_string = sprintf( '%s&ndash;<strong>%s</strong>', $update->current, $update->locale );
     41        $version_string = sprintf( '%s&ndash;%s', $update->current, get_locale() );
    4242
    4343        if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) {
    4444                $version_string = $update->current;
    function list_core_update( $update ) { 
    5555                $current = true;
    5656        }
    5757
    58         $submit        = __( 'Update Now' );
    59         $form_action   = 'update-core.php?action=do-core-upgrade';
    60         $php_version   = phpversion();
    61         $mysql_version = $wpdb->db_version();
    62         $show_buttons  = true;
     58        $is_development_version = preg_match( '/alpha|beta|RC/', $version_string );
     59        $submit                 = $is_development_version ? __( 'Update to latest nightly' ) : __( 'Update Now' );
     60        $form_action            = 'update-core.php?action=do-core-upgrade';
     61        $php_version            = phpversion();
     62        $mysql_version          = $wpdb->db_version();
     63        $show_buttons           = true;
    6364
    6465        if ( 'development' === $update->response ) {
    6566                $message = __( 'You can update to the latest nightly build manually:' );
    6667        } else {
    6768                if ( $current ) {
     69                        $message = '';
    6870                        /* translators: %s: WordPress version. */
    69                         $message     = sprintf( __( 'If you need to re-install version %s, you can do so here:' ), $version_string );
    70                         $submit      = __( 'Re-install Now' );
     71                        $submit      = sprintf( __( 'Re-install version %s' ), $version_string );
    7172                        $form_action = 'update-core.php?action=do-core-reinstall';
    7273                } else {
    7374                        $php_compat = version_compare( $php_version, $update->php_version, '>=' );