Clanbite Social Kit Since 1.6.2

avatar_html( string $type, int $id, string $fallback_url = '', array $args = array() ): string

Markup for a player, team or group avatar, built by Clanbite core's shared avatar component.

Social Kit never draws its own avatars: shape, XP ring, rank badge and every clanbite_avatar_* filter come from core, and the arguments here tell those filters where the avatar sits (context, object_type, object_id, extension, context_data); the viewer is added by core. Falls back to a plain image on a Clanbite without clanbite_render_avatar().

public static

Class: Kernowdev\ClanbiteSocialKit\Extension\Social_Kit

Parameters

$type (string) Required

player, team or group.

$id (int) Required

Entity ID.

$fallback_url (string) Optional

Image used when the shared component is missing.

Default: ''

$args (array<string, mixed>) Optional

Extra clanbite_render_avatar() arguments (size, context, object_type, object_id, link, context_data…).

Default: array()

Returns

string Avatar HTML, empty when there is nothing to show.

Defined in inc/Extension/Social_Kit.php

Changelog

VersionDescription
1.6.2Introduced.