[wp-hackers] Hook being called twice on activate, once on deactivate
mark at watero.us
Thu Oct 29 21:23:39 UTC 2009
I appreciate the comments, but the plugin itself doesn't use
call_user_func(), I simply did that in the test as a way to pass an argument
to the function. It was meant to be a quick and dirty test, I wasn't really
priding myself on the coding style in that sample - the root of the problem
was the scope during activation as Otto informed me.
Thank you for also pointing out however that call_user_func is executing
every time the file is accessed, it's not a function I've used very much in
the past, and I will make sure the same mistake isn't made twice.
> -----Original Message-----
> Sent: Thursday, October 29, 2009 12:53 PM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Hook being called twice on activate, once on
> Frankly, your code is a mess.
More information about the wp-hackers