Clanbite Social Kit Since 1.6.2
my_reaction( array $user_slugs, ?array $types = null ): array{slug: string, label: string, text: string, active: bool, emoji: string, icon_url: string, hide_icon: bool, hide_emoji: bool}The viewer's own reaction for the React button ("React" until they react, then their emoji and its name).
Always returns every key so Interactivity bindings never see undefined.
public static
Class: Kernowdev\ClanbiteSocialKit\Social\Reactions
Parameters
$user_slugs(string[]) RequiredSlugs the viewer has on the object.
$types(array<string, array<string, mixed>>|null) OptionalReaction definitions (default: the shared registry).
Default:
null
Returns
array{slug: string, label: string, text: string, active: bool, emoji: string, icon_url: string, hide_icon: bool, hide_emoji: bool}
Defined in inc/Social/Reactions.php
Changelog
| Version | Description |
|---|---|
| 1.6.2 | Introduced. |