[wp-hackers] Hook being called twice on activate, once on deactivate

Austin Matzko if.website at gmail.com
Thu Oct 29 20:10:03 UTC 2009


On Thu, Oct 29, 2009 at 2:58 PM, mark waterous <mark at watero.us> wrote:
> That fixes the constant returning the proper string, but is the activation
> hook supposed to be run twice like that? And again on deactivation if there
> is no deactivation hook?

The *activation hook* is not being called during those times; the
*call_user_func()* call is.

Each time:

1. Test include of plugin file to check for fatal errors, immediately
prior to activation.
2. Actual include of plugin file because it's activated.
3. Include of plugin file just prior to deactivation.


More information about the wp-hackers mailing list