You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just run across a plugin that will only be activated properly if the activation hook is called when is_admin() is true. The underlying code is actually risky and ill-conceived. However, that aside, it brought to my attention the fact that WordPress core always activates plugins when is_admin() is true. The question is, should we simulate that in our plugin activation code? After all, the plugin related functions are all currently stored in wp-admin/includes. However, I think it is good not to rely entirely on being in the admin either. It is probably better for the activation routine not to make those kinds of assumptions. But maybe it would be best for us to allow either way to be tested, as in admin and not as in admin.
The text was updated successfully, but these errors were encountered:
I've just run across a plugin that will only be activated properly if the activation hook is called when
is_admin()
is true. The underlying code is actually risky and ill-conceived. However, that aside, it brought to my attention the fact that WordPress core always activates plugins whenis_admin()
is true. The question is, should we simulate that in our plugin activation code? After all, the plugin related functions are all currently stored inwp-admin/includes
. However, I think it is good not to rely entirely on being in the admin either. It is probably better for the activation routine not to make those kinds of assumptions. But maybe it would be best for us to allow either way to be tested, as in admin and not as in admin.The text was updated successfully, but these errors were encountered: