10

What is the difference between the after_setup_theme and init action hooks? It seems they are both called right before any page in WordPress is loaded (even admin pages).

22

after_setup_theme action hook is fired before the actual $wp->init(); which Set up the current user and only then init action hook is fired which means that they are pretty much the same with one major difference and that is at after_setup_theme the user is not authenticated, and at init he is (assuming that we are talking about an actual user).

Your Answer

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