[wp-hackers] Will Activation Hook Be Executed During Plugin Upgradation?
elfin at elfden.co.uk
Mon Sep 20 18:10:30 UTC 2010
On 20/09/2010 18:29, Peter Westwood wrote:
> On 20 Sep 2010, at 16:34, Nicolas Kuttler wrote:
>> On Mon, Sep 20, 2010 at 11:04:12AM -0400, Andrew Nacin wrote:
>>> On Mon, Sep 20, 2010 at 10:19 AM, Raj<list at expost.org> wrote:
>>>> When a plug-in is upgraded through the administrator panel's
>>>> plugin interface (when already activated), will the
>>>> activation hook be executed?
>>> Historically, yes, but only during a single upgrade. However,
>>> it is not executed as part of a bulk update. Which is probably
>>> something to be classified as a bug.
>> Seriously? Yes, sounds like a bug.
> Actually, I would only expect activation hooks to fire when the
> plugin is activated and not on upgrade.
> Just like deactivation hooks should only fire on deactivation.
> So the bug would be them firing at any point apart from real
A lot of plugin authors, myself included (but I can easily change
things if necessary) use this 'feature' (well that's what MS calls
it...) to upgrade things. So if this really is the case that we
shouldn't be using it, what would be the correct way to upgrade?
More information about the wp-hackers