LogoLogo
WordPress.orgExtensionsSupport
Version 9
Version 9
  • Notification – Custom Notifications and Alerts for WordPress
  • Updating to v9
  • Known issues
  • 🤸‍♀️ User guide
    • Update broke my site
    • How Notification plugin works
    • Who can use this plugin
    • How to create Notifications
    • Troubleshooting
    • Advanced
      • How to escape { character
      • Background processing
      • How to setup different FROM address for different Notifications
      • Custom Post Type support
      • Disable upselling
      • How to send HTML Emails
  • 🔧Developer
    • General
      • Plugin loading chain
      • Runtime
      • Extension possibilities
      • Creating an extension
      • Customizations
      • Bundling Notification plugin
      • White label mode
    • Notifications
      • Suppressing the Notification
      • JSON synchronization
      • Programmatic Notifications
    • Triggers
      • List of all default Triggers
      • Custom Trigger
      • Enable support for non-public Custom Post Type
      • Adding Merge Tags to existing Triggers
    • Carriers
      • Custom Carrier
      • Adding custom fields to Carrier form
      • Suppressing the Carrier
    • Recipients
      • Custom Recipient
    • Snippets
      • General
        • Automatic Trigger testing
        • Allow other roles to edit Notifications
        • Programmatic Notification with manual Trigger
        • Background Processing filter
      • Triggers
        • Post
        • User
      • Integations
        • WP All Import
        • MemberPress
  • 🧩Extensions
    • Installation
    • Planned extensions
    • 3rd Party Extensions
    • Custom Fields
      • v2.2
      • v1.4
      • v1.3
    • Conditionals
    • Email Attachments
    • Push
    • Scheduled Triggers
    • Slack
    • Twilio
    • Webhooks
Powered by GitBook
On this page
  • Modular components
  • Carrier
  • Trigger
  • Merge Tag
  • Recipient
  • Summary

Was this helpful?

  1. Developer
  2. General

Extension possibilities

PreviousRuntimeNextCreating an extension

Last updated 6 months ago

Was this helpful?

The Notification plugin has a great, powerful developer API which allows you to extend it nearly limitless.

Take a look at to search for actions and filters you can use, but also to see how the default things are registered.

Modular components

Carrier

By default, plugin supports the Email and Webhook carriers, but it can be anything. You can even send real paper letters with it as long as you have service provider and API access for it.

The best part is that you can create any form fields, including repeatable fields. All using very simple internal API.

Trigger

The trigger is a class which handles the action you want to hook in. Because it utilizes the WordPress actions system, you can hook up to anything you want! Even a page refresh, but this would probably kill your server.

Merge Tag

This is a tiny bit of code which replaces things like {this} to This. With them, you can create dynamic parts of the Notification. An example is {post_permalink} Merge Tag used in Post published Trigger.

There are few very basic Merge Tag types, like String, Integer, URL etc. but we have also more specific ones, like User Email. You can use them too!

The configuration couldn’t be simpler. You just have to define a property with needed information in the Trigger class and that’s it.

If you wish to add some more Merge tags to existing Triggers – that’s not a problem.

If you wish to add completely new Merge tags – that’s not a problem too.

Recipient

The recipient is also represented by a class. It’s not obligatory to use them with any custom Notification, but it’s highly recommended to keep unified interface of the plugin.

Also, it provides a value parser which automatically changes saved values to values which are understood by your Notification. For example, the Email Notification has Recipients. In the database, we are storing user IDs and with Recipient class they are automatically changed to an email address.

Summary

I hope this will give you a nice idea how you can extend Notification plugin by yourself.

In the WordPress admin, we have also an Extensions screen. We’ll be happy to put your extensions there!

🔧
plugin’s repository at Github
Custom Carrier
Custom Trigger
Adding Merge Tags to existing Triggers
Custom Recipient