Clanbite Since 1.3.0

clanbite_avatar_shape_element( string $shape, float $radius, string $css_class, string $attrs = '' ): string

One SVG shape in an avatar's 100 x 100 coordinate space.

Geometry is shared with the CSS photo clip in _avatars.scss; keep the two in sync. $radius is the shape's half-size: 50 touches the edge of the box. Hexagons are regular and point-up, so the progress arc starts at the top and runs clockwise.

Parameters

$shape (string) Required

circle, square or hexagon.

$radius (float) Required

Half-size in viewBox units (0 to 50).

$css_class (string) Required

CSS class of the element.

$attrs (string) Optional

Extra, already-escaped attributes.

Default: ''

Returns

string SVG element markup.

Defined in inc/avatar-helpers.php

Changelog

VersionDescription
1.3.0Introduced.