Clanbite Social Kit Social Since 1.6.2
do_action( 'clanbite_social_kit_object_reaction_toggled', string $object_type, int $object_id, int $user_id, string $slug, bool $active, array<string, mixed> $state )Fires after a reaction is toggled on any object, whichever extension owns it.
The one action to listen to for points, notifications or analytics. The older per-surface actions (clanbite_social_kit_reaction_toggled, clanbite_forums_topic_reaction_toggled…) still fire as before.
Action PHP
Parameters
$object_type(string)Registered object type.
$object_id(int)Object ID.
$user_id(int)Reacting user.
$slug(string)Reaction type slug.
$active(bool)Whether the reaction is now present.
$state(array<string, mixed>)Full state returned by the object type's
togglecallback.
Example
add_action( 'clanbite_social_kit_object_reaction_toggled', function ( $object_type, $object_id, $user_id, $slug, $active, $state ) {
// Run your code.
}, 10, 6 );Defined in inc/Social/Reactions.php
Changelog
| Version | Description |
|---|---|
| 1.6.2 | Introduced. |