Clanbite Players

apply_filters( 'clanbite_players_get_display_avatar_id', int $avatar_id, int $player_id )

Allows filtering of the players display avatar attachment ID, this can be bypassed by setting $suppress_filters param to true.

Filter PHP

Parameters

$avatar_id (int)

Avatar attachment ID (0 when unset).

$player_id (int)

Player (user) ID.

Example

add_filter( 'clanbite_players_get_display_avatar_id', function ( $avatar_id, $player_id ) {
	// Change $avatar_id here.
	return $avatar_id;
}, 10, 2 );

Defined in inc/extensions/players/functions.php

Changelog

VersionDescription
1.3.0Updated.