[wp-hackers] Will Activation Hook Be Executed During Plugin Upgradation?

Rich Pedley elfin at elfden.co.uk
Mon Sep 20 19:30:47 UTC 2010


On 20/09/2010 19:35, Andrew Nacin wrote:
> On Mon, Sep 20, 2010 at 2:14 PM, Milan Dinić<liste at srpski.biz>  wrote:
>
>> I belive that most people thought that it is used on every activation. Even
>> if plugin is updated, it is still activated.
>
>
> It should be noted that plugin deactivation hooks are *not* fired on
> updates. Those are explicitly suppressed. Only activation hooks are
> fired. Personally, I don't see why we're not silencing both.

Well correct me if I'm wrong, but when you update a plugin 
automatically it deactivates, upgrades, then reactivates?


I make changes to the database tables created by the plugin on 
occasion (plus occassional settings changes), and I have always used 
the feature of the activation hook being run. I do my version check 
within there.

I even coded something to highlight that the version number hadn't 
been updated thus prodding them to deactivate/reactivate.

If this 'feature' was to be removed, then it would affect many many 
plugin authors(IMO) and time would be needed for them to adjust to things.

Rich


More information about the wp-hackers mailing list