Make WordPress Core

Changeset 38210 for branches/4.6


Ignore:
Timestamp:
08/05/2016 11:00:30 PM (8 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.

Merge of [38209] to the 4.6 branch.

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

Location:
branches/4.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.6

  • branches/4.6/src/wp-admin/js/updates.js

    r38206 r38210  
    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.