Appearance
Developer Hooks
WP Social Ninja provides a comprehensive hook system that lets you extend and customize the plugin without modifying core files. The same hooks power the free templates, layer in Pro features, and let Custom Feed for TikTok plug into core — so anything Pro can do, your own code can do too.
Hook Types
Action Hooks
Actions let you run custom code at specific points — react to a new review, override how a template element renders, or hook into cron and cache events.
Filter Hooks
Filters let you modify data or output — change feed limits, register a new platform, or replace a template's HTML before it is displayed.
Hook Namespaces
| Namespace | Used by | Example |
|---|---|---|
wpsocialreviews/… | Core & Pro | wpsocialreviews/custom_review_created |
custom_feed_for_tiktok/… | TikTok plugin | custom_feed_for_tiktok/tiktok_feeds_limit |
wpsr_… | Cron & licensing | wpsr_google_reviews_update, wpsr_get_license |
wp_social_reviews_loaded(_v2) | Bootstrap | fired with the $app container |
When adding your own hooks inside the plugin, always use the wpsocialreviews/ namespace (see Coding Conventions).
Getting Started
Register handlers from your theme's functions.php or a custom plugin. Because add-ons boot off wp_social_reviews_loaded_v2, it is safest to register inside that action so the container and platforms are ready:
php
add_action('wp_social_reviews_loaded_v2', function ($app) {
// Run code when a custom review is created
add_action('wpsocialreviews/custom_review_created', function ($review) {
// e.g. sync the review to an external CRM
});
// Modify a value with a filter
add_filter('wpsocialreviews/facebook_feeds_limit', function ($limit) {
return 25;
});
});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.
What's Next
- Action Hooks → — events and template element rendering
- Filter Hooks → — value and HTML override points

