[wp-trac] [WordPress Trac] #19681: Plugin update hook

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 29 00:12:21 UTC 2011


#19681: Plugin update hook
-------------------------+------------------------------
 Reporter:  olliea95     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Plugins      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  close        |
-------------------------+------------------------------

Comment (by dd32):

 > To me it's odd that during the upgrade process, the plugin is
 deactivated and activated but neither of those hooks are actually fired.

 That was the original case, But then too many plugins were removing data
 on the deactivation hook, or interrupting the process by doing crazy
 things, so then only the activation hook was fired, Then plugins were
 still messing it up by redirecting off elsewhere or doing way too much
 processing/not checking on activations. Finally, since most plugins were
 doing the right thing of storing a "database version" and checking for it
 on admin_init, to work around the fact people could manually update their
 plugins, it was easier to just not fire either of them, and leave them
 specifically for Activation/Deactivation purposes.

 A upgrade hook such as this is overall pretty useless, for 2 reasons, 1.
 The plugin may rely on it, and break when someone performs a manual
 upgrade, and 2. At the time the hook would be run (ie. during the update
 process) the old plugin would be loaded in memory, not the newer version,
 which would mean waiting for the next page load to be able to fire it, and
 then you've got to deal with multiple plugins updating at once and
 affecting eachother, and future core alterations to updates..

 My point is, there's a lot more to it, than just firing an action when a
 plugin is updated.. Theres numerous tickets on this suggestion too, and
 they always come back to the same points and get closed as wontfix..

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19681#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list