As a kid I loved going to the pool. Actually I loved water in general. I was raised all over the world including Japan, Guam, and California. This meant I spent a lot of my time at the beach or in pools. Not long after moving to Oklahoma we got to go the to local pool. It was burning hot and I missed the California beaches, but the pool was great. I went 2-3 times a week and made a lot of summer friends by the water.
Our pool had 2 diving boards. The low board was just a few feet above the water and we would line up to do cannon balls, belly flops, and ninja dives. You may not know what a ninja dive is. Basically it is what 8 year olds who have watched too many kung fu movies do when they are trying to reenact the wire fu kicks and flips seen in movies like Crouching Tiger Hidden Dragon, but from a diving board.
The problem with ninja dives from the low dive is you only have a split second to strike a pose, not quite the Teenage Mutant Ninja Turtles kind of stuff we were going for.
Weeks into the summer we were daring each other to try the high dive. To an 8 year old it was about a million feet tall so none of us would do it. Still, the thought of having all those seconds of free fall to put on a series of legendary arial acrobatics … it was tempting. Eventually I had psyched myself up enough to climb the thousands of steps and edge out to the end of the board. I literally crawled out then looked down. Everyone was watching so I sucked it up and stood. The board twitched and wobbled with each step as bigger kids yelled for me to hurry up. I stood on the edge and felt my stomach heave and then stepped into history.
All of us had been anticipating that moment, and for my 8 year old self it was everything I wanted it to be. After that everyone lined up and we never looked back on that low dive.
That is how I feel about Genesis 2.0 and HTML5. It is so exciting. I feel like we have been in a holding pattern for ages to bring these changes out, but it will be so worth it and I know I’ll never go back to the XHTML markup.
Back in May of 2011 I started my Genesis Explained series so it is appropriate that May 2013 is the start of the Genesis 2.0 series. In that initial article I explained that working with Genesis is a lot like working with Legos (another child hood memory). Through the course of the series I tried to teach how actions work, what filters do, and how fledgling developers can learn to read the code in the various files to learn and adapt.
That information is largely still valid and I don’t plan on removing it. Through Genesis Explained Two series I will be referencing the original Genesis Explained series for added details. I will also be going back to edit the original series to point to the new articles where appropriate. If you already know Genesis you will find Genesis 2.0 extremely comfortable. If you are just getting started and want to learn more while I am writing this new series, then take time to go check out the original Genesis Explained Series. It won’t steer you wrong.
I’ve already referenced the first article of Genesis Explained, but if you have not read it I’d recommend going back and reading it now. Now that you are familiar with the basic concept behind Genesis I’d like to cover the new hooks. I’ll be going back and looking at the framework.php file from Genesis 2.0 later. There is a new function I need to explain, but don’t worry, I won’t forget.
So, on to the complete hook reference for all Genesis 2 hooks:
That is every hook that Genesis loads in order on a typical front end page. As you see there are two different sets of loop hooks, the HTML5 and XHTML hooks. This is the single biggest change in the hook structure for Genesis and that is what you will need to focus on. In addition to those hooks, there are admin hooks and a few other hooks that are run in specific instances.
Finally there are the dynamic hooks. These hooks are created by the functions that use them. This means they will change based on how they are used. For example, the “$args['before_sidebar_hook']” hook below is created by the genesis_widget_area() function and it will use the widget area id to make a “genesis_before_sidebar_widget_area” hook when the primary sidebar is loaded.
- $this->pagehook . ‘_settings_page_form’
- $this->pagehook . ‘_settings_page_boxes’
As you can see, there are a LOT of hooks. By my count there are 78 total hooks plus the Dynamic hooks that create additional hooks as needed. Additionally WordPress has dozens of hooks so you can add content almost anywhere. With the addition of priorities (which I explain in the original Genesis Explained Actions article) you have near perfect control with these hooks. That is one reason why Genesis is so amazing and why we have been so excited for Genesis 2.0 to hit.
So what are you waiting for? Dive in.