Coming Soon: Inline Documentation For All WordPress Hooks

Something exciting is happening in the world of WordPress documentation. Very soon all of the hooks used throughout the core are going to be documented. An initiative is now underway to bring inline docs for hooks into the upcoming WordPress 3.7 release. I can see some of you jumping up and down and celebrating wildly right now. But there are probably more than a few of you who are wondering “What in the world is a hook?”

You will see the terms “actions/filters” and “hooks” throughout the codex and it can get a little confusing. Hooks are split into actions and filters. Essentially, hooks are events that allow you to “hook” into WordPress and make it do stuff. The codex Plugin API/Action Reference page lists all existing hooks, some of which have been documented.

Inline documentation of hooks will make it much easier for developers to extend WordPress. Each hook gets a quick explanation and the @since version added as a comment. For example, check out the notes for do_action( ‘welcome_panel’ );

If you wanted to add some content to the WordPress welcome panel but didn’t know how, this inline documentation will help to point you in the right direction.

A handful of contributors are currently tackling a massive list of hooks in 195 files. If you can help, leave a comment on the make.wordpress.org post to claim the files you’ll be working on and then add separate patches for each to the Add Inline Docs for Hooks trac ticket. Make sure to review the hook documentation standards before submitting a patch.

Developers always say that if you want to learn WordPress, the best way to start is by going through the core to find out how it all works. Inline documentation for hooks will make this easier than ever. Although it’s a monumental task to coordinate, the end result is that WordPress will be much more approachable for developers who are new to the platform.