Skip to content

Action Hooks ​

Action hooks let you execute custom code at specific points in WP Social Ninja's execution flow — perfect for triggering side effects, syncing data, logging events, or replacing how a template element renders. The same hooks power the free templates, layer in Pro features, and let Custom Feed for TikTok plug into core.

All hooks are in the wpsocialreviews/ namespace unless noted (TikTok uses custom_feed_for_tiktok/, and cron hooks use wpsr_). Each reference page documents its hooks as collapsible entries with When it runs, Parameters, Source, and Usage.

Categories:

  1. Lifecycle & Boot — the container is ready; register everything else
  2. Reviews & Data Lifecycle — reviews, templates, widgets, forms created/updated/deleted
  3. Platforms & Connections — connection events and the per-platform settings seam
  4. Cache, Scheduler & Cron — background refresh and cache purging
  5. Template Element Rendering — the theming seam for overriding output

Registering a handler ​

Register inside wp_social_reviews_loaded_v2 so the container and platforms are ready:

php
add_action('wp_social_reviews_loaded_v2', function ($app) {
    add_action('wpsocialreviews/custom_review_created', function ($review) {
        // react to a new custom review
    });
});

Hook names and locations change

The reference pages include file:line references captured from a specific release. Treat them as a map — always confirm the exact signature in the source for the version you target.

WP Social Ninja Developer Documentation