Is there a plugin init hook that runs whenever the plugin is being loaded? I'd like to link the functions for requiring files and defining constants to such a hook if it exists.


There's the plugins_loaded hook for normal Plugins and muplugins_loaded, which runs earlier.

My best advice for hooks is making cross file searches for do_action or dump the content of the all hook with $GLOBALS['wp_filter'][ current_filter() ];.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.