Clanbite Social Kit Since 1.6.2
picker( array $args ): stringThe reaction picker popover: one button per reaction type.
public static
Class: Kernowdev\ClanbiteSocialKit\Social\Reaction_Markup
Parameters
$args(array<string, mixed>) RequiredPicker arguments.
$prefixstringBEM block, e.g.clanbite-social-feedorclanbite-forums-board. Required.$surfacestringWhere it is shown (feed,forums…): added as the classis-{surface}so each surface can be styled on its own.$actionstringStore action run on click, e.g.actions.toggleReaction. Required.$hiddenstringBinding that hides the popover, e.g.state.isPostReactionPickerHidden. Required.$activestringCallback that marks the viewer's current reaction, e.g.callbacks.isReactionActive.$bindarray<string, string>Extraattribute => bindingpairs on each button (the object ID the action needs).$popover_attrsarray<string, string>Extra attributes on the popover (an ID binding foraria-controls).$button_classstringExtra classes on each button (wp-element-button clanbite-button…).$typesarray<int, array>Reaction definitions (slug,label, …). Default: the shared registry.
Returns
string HTML (already escaped).
Defined in inc/Social/Reaction_Markup.php
Changelog
| Version | Description |
|---|---|
| 1.6.2 | Introduced. |