Clanbite Social Kit Since 1.6.2
clanbite_social_kit_register_reactable( string $object_type, array $args ): boolMake an object type reactable (see \Kernowdev\ClanbiteSocialKit\Social\Reactions for the arguments).
Call on the clanbite_social_kit_register_reactables action. Once registered the object gets the shared toggle API (Reactions::toggle()), the REST route POST clanbite-social-kit/v1/reactions/{object_type}/{id} and the shared filters and action, so it needs no reactions code of its own.
Namespace: Kernowdev\ClanbiteSocialKit
Parameters
$object_type(string) RequiredLowercase slug, e.g.
forum_topic.$args(array<string, mixed>) Requiredlabel,toggle(required),exists,can_react,enabled.
Returns
bool True when registered.
Defined in inc/functions.php
Changelog
| Version | Description |
|---|---|
| 1.6.2 | Introduced. |