It’s a true sign I was raised a child of the 90s when I think of a scene from the movie Eddie when I hear the term “black hole”. Rachel Vasquez dug deep to identify and describe the hundreds of hooks that run on a WordPress page load, and it helped her realize just how much of a black hole WordPress can be.
Another realization now that I’m really jumping headfirst into trying to understand WordPress is that this endeavor is a black hole.
But she also realized just how beneficial the experience of digging into the core code is.
Now that I’ve written all of these WordPress hooks by hand, I can actually name a few off the top of my head. You’d be surprised what a little writing does for memorization. I don’t recommend that everyone do exactly as I did, but maybe writing a few with their definitions might be helpful for memorization.
I can’t promise this is the most legit list WordPress hooks and their sequence, but I’m definitely going to refer to this in the future. I feel like it’ll be easier to glance at this list and find what I need versus take wild guess and type into the Code Reference search bar. Having a list in the order as it happens on a page has given me a better understanding of how WordPress, as a platform, is falling into place. I now have a better chance of knowing what point I want to hook functions into.
This is the biggest reason I’m such a strong advocate for people blogging about the things they are learning. I think so many of us hold back sharing what we’re learning, when there is so much to gain — both in terms of the knowledge we ourselves gain, and the knowledge we can share with others — when we take the extra time to make our lessons more permanent.
It’s one of the best ways to learn, and is one of the most empowering ways for recalling knowledge later. I still remember nearly every one of thousand(s?) of blog posts I’ve written over the years. I’ve long since forgotten many thousands of other things that I took in but didn’t write down.
I took this lesson from Rachel’s post, but her work logging the hooks in WordPress is quite impressive, so check it out.