Clanbite Avatars Since 1.2.0 Updated in 1.3.0

apply_filters( 'clanbite_avatar_img_attributes_{context}', array<string, string|bool> $img_attrs, array<string, mixed> $args )

Filters the avatar <img> attributes for one context.

Context-specific variant of clanbite_avatar_img_attributes.

Filter PHP

Parameters

$img_attrs (array<string, string|bool>)

Attribute map.

$args (array<string, mixed>)

Avatar arguments (type, id, size, context, shape, …); see clanbite_render_avatar().

Example

add_filter( 'clanbite_avatar_img_attributes_{context}', function ( $img_attrs, $args ) {
	// Change $img_attrs here.
	return $img_attrs;
}, 10, 2 );

Defined in inc/avatar-helpers.php

Changelog

VersionDescription
1.3.0Updated.
1.2.0Introduced.