From the course: WordPress: Action and Filter Hooks

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

A look at load order and dependencies

A look at load order and dependencies - WordPress Tutorial

From the course: WordPress: Action and Filter Hooks

Start my 1-month free trial

A look at load order and dependencies

- [Instructor] In this lesson, I'd like to take a look at load order. So here in the action reference, I've mentioned that they're not listed alphabetically, they're listed in approximate load order. And this is an important concept to understand as you want to make sure that you're injecting your code at the right point during load time. For a big picture overview of how and when WordPress loads things, I love this chart created by WordPress core developer, Rarst. He breaks down load order for a front in request and admin request and even an ajax request. And then right here in the middle, you can see where plugins are loaded. So if you create a plugin for WordPress, this is the context it's loaded into. And know that it's happening before the theme is loaded. So in addition to referencing the codex or maybe a chart like this, one of my favorite plugins for digging into load order is Query Monitor. Debug bar, which I…

Contents