Clanbite Social Kit Since 1.6.0 Updated in 1.6.1
class Player_CardGET clanbite-social-kit/v1/player-card/{id} returns ready-made card markup (the shared avatar with its XP ring and rank badge, the name, the rank and the progress), and assets/js/clanbite-player-card.js shows it next to any a.clanbite-mention--user link the pointer rests on. The script is loaded on every front-end page while @mentions are on; it does nothing until a mention is hovered.
Added in 1.6.0. Extend the card with the filter clanbite_social_kit_player_card_html, or change who gets one with clanbite_social_kit_player_card_enabled.
class final
- Full name
Kernowdev\ClanbiteSocialKit\Social\Player_Card
Constants
| Name | Value | Description |
|---|---|---|
HANDLE | 'clanbite-social-kit-player-card' | Script and style handle. |
Methods
card_html()The card markup for a player.enqueue()Load the script and style on the front end.register_routes()Register the REST route.register()Register hooks.rest_card()REST callback.
Defined in inc/Social/Player_Card.php
Changelog
| Version | Description |
|---|---|
| 1.6.1 | Updated. |
| 1.6.0 | Introduced. |