In this part of Plugin Development 101 we take a look at another of the most important tools plugin developers use every day: actions. Just like filters, the presence of actions throughout WordPress are one of the elements that make plugin development possible, so having a good understanding of what they are and how they work is extremely important.
Actions are a method in WordPress that allows developers to “hook” into points an execute code. For example, when a post is published in WordPress there is a hook that can be used to trigger additional functions that you want to execute at the same time, perhaps to send an email notification of the new post.
I will leave the extended explanation of actions to the video, but here are a few links that help to illustrate what actions are and how to use them:
- Plugins API
- Quick Introduction to Action Hooks
- The Beginner’s Guide to WordPress Actions and Filters