Hooks, In a Nutshell – WP Daily

I’ve published another article over on wpdaily.co exploring the concept of hooks. I remember when starting out that people kept mentioning hooks and filters and actions and… it took a while to grasp what they each meant. I think the first time I started to grasp it was when I read the codex and saw this:

You can sometimes accomplish the same goal with either an action or a filter. For example, if you want your plugin to change the text of a post, you might add an action function to publish_post (so the post is modified as it is saved to the database), or a filter function to the_content (so the post is modified as it is displayed in the browser screen).

And realized that actions and filters are each kinds of hooks. In the post I use a metaphor of procedural programming as people standing in a line waiting to register at the DMV. I hope it will help you understand hooks a little bit better. read it now at Hooks, In a Glorious Nutshell – WP Daily.