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

Milan Dinić liste at srpski.biz
Mon Sep 20 18:14:51 UTC 2010


I belive that most people thought that it is used on every activation. Even
if plugin is updated, it is still activated.


2010/9/20 Rich Pedley <elfin at elfden.co.uk>

> 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
>> activation.
>>
>
>
> 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?
>
> Rich
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list