Clanbite

clanbite_players_get_display_avatar( int $player_id = 0, bool $suppress_filters = false, string|array $size = '', string $context = '', string $avatar_preset = '' ): string

Returns the players display avatar URL.

All Clanbite player avatar surfaces should resolve the image URL through this function so third-party code can override output once (XP overlays, rank badges as image, CDN URLs, etc.). Use the optional $context argument to vary behaviour by surface; it is passed to filters and avatar markup helpers.

Pass $avatar_preset as large, medium, or small to use the image sizes configured under Clanbite → Players (profiles, forums/social feeds, comments/replies). When set, it overrides $size.

Parameters

$player_id (int) Optional

The Player/User unique identifier.

Default: 0

$suppress_filters (bool) Optional

Disallows filtering of the value.

Default: false

$size (string|array) Optional

Registered size name or array of width and height (ignored when preset is set).

Default: ''

$context (string) Optional

Logical surface key (e.g. player_avatar_block, user_nav, notifications).

Default: ''

$avatar_preset (string) Optional

Optional. large, medium, or small for settings-driven sizes.

Default: ''

Returns

string

Defined in inc/extensions/players/functions.php