From c7956dcae04e2cbd8be857ba3856026a5594d63c Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 7 Apr 2015 02:31:43 +0000 Subject: [PATCH] Trigger events upon the completion of a shiny update Plugins need to be able to do actions when a shiny update completes. While we don't have complete javascript actions and filters, we do have jQuery events that we can fire to assist plugin authors. See #31819 git-svn-id: https://develop.svn.wordpress.org/trunk@32061 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/updates.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index 242ec6de8c..d6d8ed84df 100644 --- a/src/wp-admin/js/updates.js +++ b/src/wp-admin/js/updates.js @@ -227,6 +227,8 @@ window.wp = window.wp || {}; wp.updates.updateDoneSuccessfully = true; + $(document).trigger( 'wp.plugin.update.success', response ); + /* * The lock can be released since the update was successful, * and any other updates can commence. @@ -262,6 +264,7 @@ window.wp = window.wp || {}; $message.text( wp.updates.l10n.updateFailed ); wp.a11y.speak( wp.updates.l10n.updateFailed ); + $(document).trigger( 'wp.plugin.update.error', response ); }; /**