[wp-hackers] register_activation_hook only if is_admin() ?

Kevin Newman CaptainN at unFocus.com
Wed Jan 26 21:34:12 UTC 2011

Hello all,

I'd like to know if I need to always register_activation_hook for my 
install routine (in a plugin), or is it ok to just register that if 
"is_admin()" is true (and maybe if current_user_can('manage_options')). 
I like to keep my overhead small.

If there are cases where the activation_hook can be automatically 
invoked without admin or is_admin of the current user, I guess it'd have 
to be registered every time.


Kevin N.

More information about the wp-hackers mailing list