I spent several hours one day trying to find a good definition for “hook” as it’s used in WordPress. I was trying to understand actions and filters, and these three terms kept showing up together.
Most resources will send you in circles trying to understand them as they relate to one another. They will tell you what hooks are for, how they work, how to use them. But what is a hook? A good, simple definition. I couldn’t even find one in the Codex.
Using many sources, lights turned on when I compiled this definition of hook as it is used in WordPress. It then made actions and filters very clear.
Hook: a function built into the WordPress core which makes it possible to alter the default WordPress behavior or output, without altering the core.
Action: A hook that allows modification of WordPress behavior (action).
Filter: A hook that allows modification of WordPress output.
What do you think? Did this help you? Do you have tips to make these basic definitions better?