From the course: WordPress: Building Child Themes

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Hooks, filters, and action

Hooks, filters, and action - WordPress Tutorial

From the course: WordPress: Building Child Themes

Start my 1-month free trial

Hooks, filters, and action

- [Instructor] One of the most important ideas in WordPress theme and plugin development are hooks. You could say that this lesson is about actions and filters, because actions and filters are two kinds of functions that interact with WordPress hooks. Understanding hooks isn't all that easy, partly because the terms themselves are rather tricky to visualize and distinguish from one another. But the payoff is huge. As a developer, we find that working with filters and actions is probably the most common way we interact with WordPress. Let's start by defining some terms. A hook is a place in WordPress's code that invites other functions to add to it. When you create a hook, you're giving yourself and other developers the opportunity to add in additional functionality at that location. A hooked function is a custom PHP function that we can hook into WordPress at the locations specified by its hooks. And there are two types. The two types of hooked functions that exist are actions and…

Contents