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>) Required

Counts keyed by reaction slug.

$user_slugs (string[]) Required

Slugs the viewer has on the object.

$key_base (string) Optional

Unique 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>>>) Optional

Reactor payloads per slug.

Default: array()

$types (array<string, array<string, mixed>>|null) Optional

Reaction definitions (default: the shared registry).

Default: null

$object_type (string) Optional

Registered object type, so "See all" can ask for the full list. Empty for none.

Default: ''

$object_id (int) Optional

Object ID.

Default: 0

Returns

array<int, array<string, mixed>>

Defined in inc/Social/Reactions.php

Changelog

VersionDescription
1.6.4Updated.
1.6.2Introduced.