3

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)

2 Answers 2

3

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.