[wp-trac] [WordPress Trac] #30441: New action hook in auto-upgrade process
WordPress Trac
noreply at wordpress.org
Fri Nov 21 13:21:07 UTC 2014
#30441: New action hook in auto-upgrade process
-----------------------------+-----------------------------
Reporter: DavidAnderson | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: trunk
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
The attached patch adds an action hook in the automatic (background)
upgrading process.
I have a need for such a hook in a plugin. (I wish to record some state
information pre-update). Currently, if you want to do this, then it's very
ugly and hackish: the nearest you can get is to use the should_update
filter, and duplicate part of the WP_Automatic_Updater::should_update()
method within your filter (the part that comes after the filter is called
- because that can also prevent the update). And even so, it's a filter:
someone else might decide to call it for a different reason other than a
real update going ahead, so, you've also got to do stuff with
doing_action() to make sure of your context.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30441>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list