Make WordPress Core

Changeset 48092


Ignore:
Timestamp:
06/19/2020 04:49:58 PM (6 years ago)
Author:
azaozz
Message:

Plugins and Themes Auto-Updates:

  • Fix displaying of errors on the Themes screen.
  • Correct the classes used for the error messages, and use notice-alt as notices are mostly shown on a white background.

Props afercia, azaozz.
Fixes #50405.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/updates.js

    r47894 r48092  
    27202720
    27212721            // Clear any previous errors.
    2722             $parent.find( '.notice.error' ).addClass( 'hidden' );
     2722            $parent.find( '.notice.notice-error' ).addClass( 'hidden' );
    27232723
    27242724            // Show loading status.
     
    27532753                        }
    27542754
    2755                         $parent.find( '.notice.error' ).removeClass( 'hidden' ).find( 'p' ).text( errorMessage );
     2755                        $parent.find( '.notice.notice-error' ).removeClass( 'hidden' ).find( 'p' ).text( errorMessage );
    27562756                        wp.a11y.speak( errorMessage, 'polite' );
    27572757                        return;
     
    28092809                } )
    28102810                .fail( function() {
    2811                     $parent.find( '.notice.error' )
     2811                    $parent.find( '.notice.notice-error' )
    28122812                        .removeClass( 'hidden' )
    28132813                        .find( 'p' )
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r48077 r48092  
    776776        echo apply_filters( 'theme_auto_update_setting_html', $html, $stylesheet, $theme );
    777777
    778         echo '<div class="auto-updates-error inline notice error hidden"><p></p></div>';
     778        echo '<div class="notice notice-error notice-alt inline hidden"><p></p></div>';
    779779    }
    780780
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r48078 r48092  
    10971097                    echo apply_filters( 'plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data );
    10981098
    1099                     echo '<div class="inline notice error hidden"><p></p></div>';
     1099                    echo '<div class="notice notice-error notice-alt inline hidden"><p></p></div>';
    11001100                    echo '</td>';
    11011101
  • trunk/src/wp-admin/themes.php

    r48077 r48092  
    560560function wp_theme_auto_update_setting_template() {
    561561    $template = '
    562         <p class="theme-autoupdate">
     562        <div class="theme-autoupdate">
    563563            <# if ( data.autoupdate ) { #>
    564564                <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="disable">
     
    580580                <br />' . wp_get_auto_update_message() . '</span>
    581581            <# } #>
    582             <span class="auto-updates-error hidden"><p></p></span>
    583         </p>
     582            <div class="notice notice-error notice-alt inline hidden"><p></p></div>
     583        </div>
    584584    ';
    585585
Note: See TracChangeset for help on using the changeset viewer.