Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Action Helper Functions0:59 with Zac Gordon
In this video we look at some helpful functions for working with actions, like has_action and current_filter.
One of the helpful function that you might find useful,
when working with actions in WordPress, is the has action_function.
What this allows you to do, is check to see if a specific action hook exists,
as well as more specifically, if a specific function is tied into that hook.
If it is, then in this example we're doing something where we're removing it and
replacing it with our own custom code.
However, you could run whatever code you need to inside of
that conditional statement.
Likewise, we have the current filter.php function again.
I wanted to show you this, because it isn't current action.
In word press, technically actions are a type of filter and
in this case this function runs through both actions and filters and
will tell you, where you are regardless of whether you're in an action or a filter
You need to sign up for Treehouse in order to download course files.Sign up