Adding Merge Tags to existing Triggers
Sometimes it's needed to add your own Merge Tag to an already defined Trigger. In example you can add a custom meta Merge Tag to default Post Published
Trigger.
To do this simply hook into the action and add your Merge Tag:
Since v9, dynamic property $trigger->{$post_type}
has been replaced with a static prop $trigger->post
.
Targeting all Post Type Triggers
You can target all the Post Type Triggers like this:
Global Merge Tags
The Notification plugin also supports global Merge Tags which are added to all Triggers. You can use this nifty function to create one:
Before using any property of the Trigger make sure it's available. Global Merge Tags are intended to be loosely connected with any Trigger.
Last updated