WordPress.org

Make WordPress Core

Ticket #51742: 51742.13.diff

File 51742.13.diff, 1.9 KB (added by audrasjb, 14 months ago)

Add "only" to Core auto-updates status string when sites are set to auto-update to minors versions only and adding a heading in case we are running a development version of WordPress. Also adds a class to the enable|disable link for better CSS/JS targeting

  • src/wp-admin/update-core.php

    diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
    index 5a4a8d369f..17e487f2eb 100644
    a b function list_core_update( $update ) { 
    6262        $show_buttons  = true;
    6363
    6464        if ( 'development' === $update->response ) {
    65                 $message = __( 'You are using a development version of WordPress. You can update to the latest nightly build manually:' );
     65                $message = __( 'You can update to the latest nightly build manually:' );
    6666        } else {
    6767                if ( $current ) {
    6868                        /* translators: %s: WordPress version. */
    function core_upgrade_preamble() { 
    278278                }
    279279        }
    280280
     281        echo '<h2>' . __( 'You are using a development version of WordPress' ) . '</h2>';
    281282        echo '<ul class="core-updates">';
    282283        foreach ( (array) $updates as $update ) {
    283284                echo '<li>';
    function core_auto_updates_settings() { 
    401402                        if ( $can_set_update_option ) {
    402403                                echo '<br>';
    403404                                printf(
    404                                         '<a href="%s">%s</a>',
     405                                        '<a href="%s" class="core-auto-update-settings-link core-auto-update-settings-link-disable">%s</a>',
    405406                                        wp_nonce_url( add_query_arg( 'value', 'disable', $action_url ), 'core-major-auto-updates-nonce' ),
    406407                                        __( 'Switch to automatic updates for maintenance and security releases only.' )
    407408                                );
    408409                        }
    409410                } elseif ( $upgrade_minor ) {
    410                         _e( 'This site is automatically kept up to date with maintenance and security releases of WordPress.' );
     411                        _e( 'This site is only automatically kept up to date with maintenance and security releases of WordPress.' );
    411412
    412413                        if ( $can_set_update_option ) {
    413414                                echo '<br>';
    414415                                printf(
    415                                         '<a href="%s">%s</a>',
     416                                        '<a href="%s" class="core-auto-update-settings-link core-auto-update-settings-link-enable">%s</a>',
    416417                                        wp_nonce_url( add_query_arg( 'value', 'enable', $action_url ), 'core-major-auto-updates-nonce' ),
    417418                                        __( 'Enable automatic updates for all new versions of WordPress.' )
    418419                                );