Clanbite Social Kit Since 1.6.2 Updated in 1.6.4
display_rows( array $counts, array $user_slugs, string $key_base = '', array $reactors_by_slug = array(), ?array $types = null, string $object_type = '', int $object_id = 0 ): array<int, array<string, mixed>>The reaction chips for one object: every registered reaction with a count or the viewer's mark, then unknown slugs with counts.
public static
Class: Kernowdev\ClanbiteSocialKit\Social\Reactions
Parameters
$counts(array<string, int>) RequiredCounts keyed by reaction slug.
$user_slugs(string[]) RequiredSlugs the viewer has on the object.
$key_base(string) OptionalUnique key of the object on the page (prefix + ID); each chip's tooltip key is
{key_base}-{slug}. Empty for none.Default:
''$reactors_by_slug(array<string, array<int, array<string, string|int>>>) OptionalReactor payloads per slug.
Default:
array()$types(array<string, array<string, mixed>>|null) OptionalReaction definitions (default: the shared registry).
Default:
null$object_type(string) OptionalRegistered object type, so "See all" can ask for the full list. Empty for none.
Default:
''$object_id(int) OptionalObject ID.
Default:
0
Returns
array<int, array<string, mixed>>
Defined in inc/Social/Reactions.php
Changelog
| Version | Description |
|---|---|
| 1.6.4 | Updated. |
| 1.6.2 | Introduced. |