Clanbite Social Kit Since 1.6.2

summary( array $args ): string

The reaction chips for one object, each with a tooltip naming the reaction, its count and who reacted.

public static

Class: Kernowdev\ClanbiteSocialKit\Social\Reaction_Markup

Parameters

$args (array<string, mixed>) Required

Chip arguments.

  • $prefix string BEM block. Required.
  • $surface string Where it is shown (feed, forums…): added as the class is-{surface} on the wrapper and tooltips, for per-surface styling.
  • $item string Context path of the object holding reactions_display and reactions_count. Required.
  • $chip_alias string data-wp-each alias for a chip (default rx).
  • $reactor_alias string Alias for a reactor (default ru).
  • $toggle string Store action that opens/closes a chip's tooltip on click. Required.
  • $popover_hidden string Binding that hides the tooltip. Required.
  • $reactors_hidden string Binding that hides the reactor row. Required.
  • $dropdown_class string Tooltip class suffix (default simple-dropdown; Forums uses reaction-dropdown).
  • $hover array<string, string> Optional hover actions: enter and leave store actions on each chip.
  • $word_binding string Binding for the word after the count ("reactions"); empty uses a translated string.
  • $count_in_chip bool Print the count inside the chip (Forums) instead of only a total after the chips.
  • $context string Avatar context for reactors (default reactions).
  • $extension string Avatar extension (the plugin rendering it).
  • $summary_class string Extra class on the wrapper (e.g. …__reaction-summary--reply).

Returns

string HTML (already escaped).

Defined in inc/Social/Reaction_Markup.php

Changelog

VersionDescription
1.6.2Introduced.