Clanbite Social Kit Since 1.6.2

class Reaction_Markup

The one place the reaction chips and the reaction picker are written.

Both are Interactivity markup: they bind to a context path the caller passes (context.item, context.currentTopic…) and to the actions and callbacks of the caller's store, so any extension that registered a reactable object type (Reactions) shows reactions with this markup and one stylesheet convention. Class names follow the caller's BEM block (prefix), so an existing surface keeps its CSS.

Use the global wrappers clanbite_social_kit_render_reaction_summary() and clanbite_social_kit_render_reaction_picker(). Third parties can change either output with the filters clanbite_social_kit_reaction_summary_html and clanbite_social_kit_reaction_picker_html.

class final

Full name
Kernowdev\ClanbiteSocialKit\Social\Reaction_Markup

Methods

  • picker() The reaction picker popover: one button per reaction type.
  • summary() The reaction chips for one object, each with a tooltip naming the reaction, its count and who reacted.

Defined in inc/Social/Reaction_Markup.php

Changelog

VersionDescription
1.6.2Introduced.