Make WordPress Core

Ticket #51774: 51774.5.diff

File 51774.5.diff, 1.7 KB (added by afragen, 4 years ago)

update variable to coincide with patch in #51822

  • wp-admin/update-core.php

    diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
    index 5a4a8d369f..43aef8c7ec 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 ) { 
    5454        if ( ! isset( $update->response ) || 'latest' === $update->response ) {
    5555                $current = true;
    5656        }
    57 
    58         $submit        = __( 'Update Now' );
     57        preg_match( '/(alpha|beta|RC)(\d+)/', $version_string, $development );
     58        $submit        = ! empty( $development ) ? __( 'Update to latest nightly' ) : __( 'Update Now' );
    5959        $form_action   = 'update-core.php?action=do-core-upgrade';
    6060        $php_version   = phpversion();
    6161        $mysql_version = $wpdb->db_version();
    function list_core_update( $update ) { 
    6565                $message = __( 'You are using a development version of WordPress. You can update to the latest nightly build manually:' );
    6666        } else {
    6767                if ( $current ) {
     68                        $message = '';
    6869                        /* 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' );
     70                        $submit      = sprintf( __( 'Re-install version %s' ), $version_string );
    7171                        $form_action = 'update-core.php?action=do-core-reinstall';
    7272                } else {
    7373                        $php_compat = version_compare( $php_version, $update->php_version, '>=' );