diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index b58a2267e0..33756ffd74 100644 --- a/src/wp-admin/js/updates.js +++ b/src/wp-admin/js/updates.js @@ -369,7 +369,7 @@ .attr( 'aria-label', message ) .text( wp.updates.l10n.updating ); - $document.trigger( 'wp-plugin-updating' ); + $document.trigger( 'wp-plugin-updating', args ); return wp.updates.ajax( 'update-plugin', args ); }; @@ -525,6 +525,8 @@ // Remove previous error messages, if any. $card.removeClass( 'plugin-card-install-failed' ).find( '.notice.notice-error' ).remove(); + $document.trigger( 'wp-plugin-installing', args ); + return wp.updates.ajax( 'install-plugin', args ); }; @@ -715,6 +717,8 @@ wp.a11y.speak( wp.updates.l10n.deleting, 'polite' ); + $document.trigger( 'wp-plugin-deleting', args ); + return wp.updates.ajax( 'delete-plugin', args ); }; @@ -905,7 +909,7 @@ wp.a11y.speak( wp.updates.l10n.updatingMsg, 'polite' ); $notice.text( wp.updates.l10n.updating ); - $document.trigger( 'wp-theme-updating' ); + $document.trigger( 'wp-theme-updating', args ); return wp.updates.ajax( 'update-theme', args ); }; @@ -1038,6 +1042,8 @@ // Remove previous error messages, if any. $( '.install-theme-info, [data-slug="' + args.slug + '"]' ).removeClass( 'theme-install-failed' ).find( '.notice.notice-error' ).remove(); + $document.trigger( 'wp-theme-installing', args ); + return wp.updates.ajax( 'install-theme', args ); }; @@ -1167,6 +1173,8 @@ // Remove previous error messages, if any. $( '.theme-info .update-message' ).remove(); + $document.trigger( 'wp-theme-deleting', args ); + return wp.updates.ajax( 'delete-theme', args ); }; @@ -1973,6 +1981,8 @@ // Un-check the bulk checkboxes. $bulkActionForm.find( '.manage-column [type="checkbox"]' ).prop( 'checked', false ); + $document.trigger( 'wp-' + type + '-bulk-' + bulkAction, itemsSelected ); + // Find all the checkboxes which have been checked. itemsSelected.each( function( index, element ) { var $checkbox = $( element ),