Clanbite Since 1.6.3
bake_avatar( int $user_id, int $source_id, float $x, float $y, float $zoom ): int|\WP_ErrorCut the chosen square out of the original avatar and make it the avatar.
public static
Class: Kernowdev\Clanbite\Extensions\Players\Player_Media
Parameters
$user_id(int) RequiredPlayer.
$source_id(int) RequiredAttachment ID of the original image.
$x(float) RequiredFocal point, 0 to 1.
$y(float) RequiredFocal point, 0 to 1.
$zoom(float) RequiredZoom, 1 to MAX_ZOOM.
Returns
int|\WP_Error Attachment ID of the new avatar.
Defined in inc/extensions/players/class-player-media.php
Changelog
| Version | Description |
|---|---|
| 1.6.3 | Introduced. |