I have some code that I need to execute. I am currently executing it in response to the template_redirect event. This is giving me desired result for pages other than /wp-admin
. What event can I tap into that fires before wordpress starts processing /wp-admin
? I need an event that will fire just before /wp-admin
processing starts. Thanks.
I have some code that I need to execute. I am currently executing it in response to the template_redirect event. This is giving me desired result for pages other than /wp-admin
. What event can I tap into that fires before wordpress starts processing /wp-admin
? I need an event that will fire just before /wp-admin
processing starts. Thanks.
1 Answer
Reset to default 0The earliest admin related hook I can see is admin_menu
, so before that comes (listing only useful core hooks, from later to earlier)
- auth_redirect
- update_option
- wp_loaded
- init
- pre_get_posts
- after_setup_theme
- get_template_part
- setup_theme
- plugins_loaded
- muplugins_loaded
What are you trying to do, exactly? the complete answer depends on your use case.