[wp-trac] [WordPress Trac] #37216: Trigger event handler when updating theme

WordPress Trac noreply at wordpress.org
Tue Jun 28 21:47:52 UTC 2016


#37216: Trigger event handler when updating theme
-----------------------------+-----------------------------
 Reporter:  DavidAnderson    |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  trunk
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37216>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list