WP Manifestindependent plugin directory
manifest / integrations / notify-hub

Notify Hub

A WordPress plugin that sends webhook notifications when posts are published

by Mohit Agarwal · github.com/mohitx345/notify-hub · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mohitx345/notify-hub/archive/refs/heads/main.zip

A lightweight WordPress plugin that sends a JSON webhook notification to any external URL whenever a post is published.

What It Does

When a post transitions to publish status, Notify Hub fires a POST request to your configured webhook URL with a JSON payload containing the post details. Works with Zapier, Make (Integromat), custom REST endpoints, Slack incoming webhooks, or any service that accepts HTTP POST requests.

Why I Built This

I needed a simple, dependency-free way to trigger external workflows (CRM updates, Slack notifications, content pipelines) when content goes live — without relying on heavy third-party plugins that do too much. Notify Hub does one thing and does it cleanly.

Features

  • Fires on transition_post_status — only triggers on fresh publishes, not every save
  • Admin settings page under Settings > Notify Hub
  • Sends a structured JSON payload via wp_remote_post() (no cURL dependency)
  • Logs errors to the WordPress debug log when WP_DEBUG is enabled
  • Fully namespaced class-based architecture — no global function pollution

Webhook Payload

{
  "event": "post.published",
  "post_id": 42,
  "title": "My New Post",
  "url": "https://yoursite.com/my-new-post/",
  "author": "Mohit Agarwal",
  "categories": ["News", "Updates"],
  "published_at": "2026-03-23T10:00:00+00:00",
  "site_url": "https://yoursite.com"
}

Installation

  1. Upload the notify-hub folder to /wp-content/plugins/
  2. Activate through Plugins > Installed Plugins
  3. Go to Settings > Notify Hub
  4. Paste your webhook URL and click Save

Plugin Architecture

notify-hub/
├── notify-hub.php              # Entry point — registers hooks, loads classes
├── includes/
│   ├── class-settings.php      # Admin settings page (WordPress Settings API)
│   └── class-notifier.php      # Webhook logic (transition_post_status hook)
└── readme.txt

Key design decisions

transition_post_status over publish_post Using transition_post_status gives us access to both the old and new status, allowing us to avoid re-firing the webhook when a published post is simply updated.

wp_remote_post() over cURL WordPress's HTTP API selects the best available transport for the server environment. This makes the plugin portable across hosts that may have cURL disabled.

Static class methods with init() Each class exposes a single init() method that registers its hooks. This keeps the main plugin file clean and makes each class self-contained and independently testable.

Requirements

  • WordPress 5.8+
  • PHP 7.4+

License

GPL-2.0+