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.

I'm just trying to get my head around the "life-cycle" of a typical page request in WordPress. The Action Reference page lists 38 actions that occur during a typical page load, but two things aren't clear to me:

  • does functions.php get invoked before any of the hooks are executed?
  • does the framework call your "page.php", etc., somewhere within the sequence of hooks, or after all hooks have been executed?

Thanks.

(apologies if my terminology is a little off, but I believe I understand the idea behind hooks being made available by the framework, and actions being associated with these hooks by the theme author)

share|improve this question
add comment

2 Answers

To see both when an action is fired and when a file is included, take a look here:

http://wp-roadmap.com/demo/

Note that it only covers things inside WP Core, along with the default theme.

share|improve this answer
add comment

does functions.php get invoked before any of the hooks are executed?

It is processed during theme(s) load, right before after_setup_theme hook.

does the framework call your "page.php", etc., somewhere within the sequence of hooks, or after all hooks have been executed?

If I am not mistaken specific template is determined and processed in template_redirect hook.

share|improve this answer
add comment

Your Answer

 
discard

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