diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
index 5056fa0..1929158 100644
|
|
|
713 | 713 | * decorated with an abort() method. |
714 | 714 | */ |
715 | 715 | wp.updates.deletePlugin = function( args ) { |
716 | | var $message = $( '[data-plugin="' + args.plugin + '"]' ).find( '.update-message p' ); |
717 | | |
718 | 716 | args = _.extend( { |
719 | 717 | success: wp.updates.deletePluginSuccess, |
720 | 718 | error: wp.updates.deletePluginError |
721 | 719 | }, args ); |
722 | 720 | |
723 | | if ( $message.html() !== wp.updates.l10n.updating ) { |
724 | | $message.data( 'originaltext', $message.html() ); |
725 | | } |
726 | | |
727 | 721 | wp.a11y.speak( wp.updates.l10n.deleting, 'polite' ); |
728 | 722 | |
729 | 723 | $document.trigger( 'wp-plugin-deleting', args ); |
… |
… |
|
1172 | 1166 | error: wp.updates.deleteThemeError |
1173 | 1167 | }, args ); |
1174 | 1168 | |
1175 | | if ( $button.html() !== wp.updates.l10n.deleting ) { |
1176 | | $button.data( 'originaltext', $button.html() ); |
| 1169 | if ( $button ) { |
| 1170 | if ( $button.html() !== wp.updates.l10n.deleting ) { |
| 1171 | $button.data( 'originaltext', $button.html() ); |
| 1172 | } |
| 1173 | |
| 1174 | $button.text( wp.updates.l10n.deleting ); |
1177 | 1175 | } |
1178 | 1176 | |
1179 | | $button.text( wp.updates.l10n.deleting ); |
1180 | 1177 | wp.a11y.speak( wp.updates.l10n.deleting, 'polite' ); |
1181 | 1178 | |
1182 | 1179 | // Remove previous error messages, if any. |
… |
… |
|
1710 | 1707 | $message = $( 'tr[data-plugin="' + job.data.plugin + '"]' ).find( '.update-message' ); |
1711 | 1708 | } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { |
1712 | 1709 | $message = $( '.update-now.updating-message' ); |
| 1710 | } else if ( 'themes' === pagenow ) { |
| 1711 | $message = $( '.theme-actions .delete-theme' ); |
1713 | 1712 | } else { |
1714 | 1713 | $message = $updatingMessage; |
1715 | 1714 | } |