Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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).

share|improve this question
add comment

1 Answer

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.