#37216 closed defect (bug) (fixed)
Shiny Updates: Trigger event handler when updating theme
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
I develop WP's most-installed backup plugin (UpdraftPlus) which, among other things, can take a backup immediately before a plugin or theme update.
This is integrated with "shiny updates" for plugins (since WP 4.2), thanks to previous co-operation over issues that arose during WP 4.2 development. (Before a shiny plugin update takes place, a dialog pops up (much like the filesystem credentials box can in WP itself), takes a backup, then goes away and allows the update to proceed).
We've been looking at the shiny-updates-for-themes code, and have an issue on wp-admin/themes.php. There's currently no easy way to know when the visitor clicks the 'update' link, because the handler in wp-admin/js/theme.js blocks all other event handlers when it is clicked.
The attached patch rectifies this, by triggering an event early in wp.updates.updateTheme, which thus allows other plugins to take appropriate action.
Attachments (2)
Change History (13)
#2
@
7 years ago
Yup. Those are the tickets opened and which helped us to keep automatic pre-upgrade backups possible when "shiny updates" was added for plugins back in WP 4.2.
#3
@
7 years ago
- Summary changed from Trigger event handler when updating theme to Shiny Updates: Trigger event handler when updating theme
#4
@
7 years ago
@jorbin : Do you have any tips on how I can get attention for this issue? It seems to be slipping under the radar, and currently means that existing functionality in our plugin will be broken, with no way to fix it, in WP 4.6.
#6
@
7 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.6
For plugin updates there's a $document.trigger( 'wp-plugin-updating' );
line. We need the same for theme updates.
@DavidAnderson Would 37216.diff solve the issue?
Trigger event when a shiny theme update is requested