Adding Plugin Actions and Filters With Plugin Machine

Actions and filters or “hooks” are used to extend or modify WordPress core, or plugins and themes. Plugin Machine will add a hooks file to your plugin. You can include hooks from popular plugins or from your own templates collection.

Working With Actions And Filters In Plugin Machine

When creating a plugin with Plugin Machine, make sure to enable the “Actions and Filters” feature. From the features list, you will have an option for “Actions and Filters”.

Click on that, and you will see something like this, beacuse you have not added any yet:

Based on which plugin you clicked on, you will see different hooks. Select one please.

Then, you may need to add some other settings, depending on which hook you have selected:

Working With Your Hooks

All generated hooks will be added to “inc/hooks.php” in your plugin.