WordPress.org

Make WordPress Core

Changeset 38209


Ignore:
Timestamp:
08/05/2016 10:56:53 PM (4 years ago)
Author:
ocean90
Message:

Update/Install: Remove the .notice-error class before adding classes for the update process.

Prevents displaying an update message with error styling.

Props obenland.
Props SergeyBiryukov for review.
Fixes #37550.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/updates.js

    r38205 r38209  
    351351        if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    352352            $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' );
    353             $message   = $updateRow.find( '.update-message' ).addClass( 'updating-message' ).find( 'p' );
     353            $message   = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
    354354            message    = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
    355355        } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
     
    901901
    902902        if ( 'themes-network' === pagenow ) {
    903             $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).addClass( 'updating-message' ).find( 'p' );
     903            $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
    904904
    905905        } else {
     
    20282028                    success++;
    20292029                } else {
    2030                     itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.theme-title strong' ).text();
     2030                    itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.column-primary strong' ).text();
    20312031
    20322032                    error++;
Note: See TracChangeset for help on using the changeset viewer.