Publications
Reel ‘em In: Understanding Hooks From the Inside Out
Written publication for: Wptuts+
Estimated total website impressions per month: Over 150,000
Synopsis
As a counterpoint to my first article for Wptuts+, which focuses on a more advanced, less-known feature, “Reel ‘em In: Understanding Hooks From the Inside Out” goes straight back to the basics, highlighting the very system that gives the CMS its extensible foundation: hooks. From themes to template files to plugins, hooks are present to give developers the ability to add functionality to WordPress without directly editing it, thereby allowing for streamlined updates to the core. Indeed, knowledge of this essential component is vital for any serious WordPress developer.
Details
What makes my article different from any other introduction to hooks is the fact that it takes an inside-out four step approach to gaining full comprehension:
- Explore the documentation and gain a high-level knowledge of hooks.
- Based upon inferences from this exploration, code an implementation of hooks in PHP. This will force a developer to employ critical thinking skills and determine for him/herself how hooks work.
- Look through the WordPress core files and see how it is really done. Compare and contrast this with the result of step 2, learning from both the similarities and differences in the implementations.
- Apply this inside, lower-level knowledge to the outside realm through real-world applications.
Quoting myself from the article yields this important take-away point:
Rather than looking at someone else’s code to understand how a feature is realized, it is often even more useful to first implement it yourself and then return to examine how it is actually done.