diff --git a/inc/avatar-styles/avataaars.php b/inc/avatar-styles/avataaars.php
new file mode 100644
index 0000000..cc4a435
--- /dev/null
+++ b/inc/avatar-styles/avataaars.php
@@ -0,0 +1,291 @@
+ 'avataaars',
+'meta' => array(
+ 'title' => 'Avataaars',
+ 'creator' => 'Pablo Stanley',
+ 'source' => 'https://avataaars.com/',
+ 'license_name' => 'Free for personal and commercial use',
+ 'license_url' => 'https://avataaars.com/',
+),
+'view_box' => '0 0 280 280',
+'clip_default' => true,
+'has_pre_create' => false,
+'has_post_create' => true,
+'is_initials' => false,
+'attr_pairs' => array(
+ array('viewBox', '0 0 280 280'),
+ array('fill', 'none'),
+ array('shape-rendering', 'auto'),
+),
+'bg_colors' => array('65c9ff'),
+'bg_type' => array('solid'),
+'bg_rotation' => array('0', '360'),
+'body_template' => '@@k:style@@',
+'pick_order' => array('style', 'base', 'clothing', 'mouth', 'nose', 'eyes', 'eyebrows', 'top', 'facialHair', 'accessories', 'clothingGraphic'),
+'bool_order' => array('top', 'facialHair', 'accessories'),
+'color_order' => array(
+ 'accessories' => 'accessoriesColor',
+ 'clothes' => 'clothesColor',
+ 'hat' => 'hatColor',
+ 'hair' => 'hairColor',
+ 'skin' => 'skinColor',
+ 'facialHair' => 'facialHairColor',
+ 'background' => 'backgroundColor',
+),
+'pc_has_ints' => false,
+'pc_meta' => array(
+ array(
+ 'group' => 'style',
+ 'values_opt' => 'style',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'base',
+ 'values_opt' => 'base',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'clothing',
+ 'values_opt' => 'clothing',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'mouth',
+ 'values_opt' => 'mouth',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'nose',
+ 'values_opt' => 'nose',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'eyes',
+ 'values_opt' => 'eyes',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'eyebrows',
+ 'values_opt' => 'eyebrows',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'top',
+ 'values_opt' => 'top',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'facialHair',
+ 'values_opt' => 'facialHair',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'accessories',
+ 'values_opt' => 'accessories',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'clothingGraphic',
+ 'values_opt' => 'clothingGraphic',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+),
+'defaults' => array(
+ 'accessories' => array('kurt', 'prescription01', 'prescription02', 'round', 'sunglasses', 'wayfarers', 'eyepatch'),
+ 'accessoriesColor' => array('262e33', '65c9ff', '5199e4', '25557c', 'e6e6e6', '929598', '3c4f5c', 'b1e2ff', 'a7ffc4', 'ffdeb5', 'ffafb9', 'ffffb1', 'ff488e', 'ff5c5c', 'ffffff'),
+ 'accessoriesProbability' => 10,
+ 'backgroundColor' => array('65c9ff'),
+ 'base' => array('default'),
+ 'clothesColor' => array('262e33', '65c9ff', '5199e4', '25557c', 'e6e6e6', '929598', '3c4f5c', 'b1e2ff', 'a7ffc4', 'ffafb9', 'ffffb1', 'ff488e', 'ff5c5c', 'ffffff'),
+ 'clothing' => array('blazerAndShirt', 'blazerAndSweater', 'collarAndSweater', 'graphicShirt', 'hoodie', 'overall', 'shirtCrewNeck', 'shirtScoopNeck', 'shirtVNeck'),
+ 'clothingGraphic' => array('bat', 'bear', 'cumbia', 'deer', 'diamond', 'hola', 'pizza', 'resist', 'skull', 'skullOutline'),
+ 'eyebrows' => array('angryNatural', 'defaultNatural', 'flatNatural', 'frownNatural', 'raisedExcitedNatural', 'sadConcernedNatural', 'unibrowNatural', 'upDownNatural', 'angry', 'default', 'raisedExcited', 'sadConcerned', 'upDown'),
+ 'eyes' => array('closed', 'cry', 'default', 'eyeRoll', 'happy', 'hearts', 'side', 'squint', 'surprised', 'winkWacky', 'wink', 'xDizzy'),
+ 'facialHair' => array('beardLight', 'beardMajestic', 'beardMedium', 'moustacheFancy', 'moustacheMagnum'),
+ 'facialHairColor' => array('a55728', '2c1b18', 'b58143', 'd6b370', '724133', '4a312c', 'f59797', 'ecdcbf', 'c93305', 'e8e1e1'),
+ 'facialHairProbability' => 10,
+ 'hairColor' => array('a55728', '2c1b18', 'b58143', 'd6b370', '724133', '4a312c', 'f59797', 'ecdcbf', 'c93305', 'e8e1e1'),
+ 'hatColor' => array('262e33', '65c9ff', '5199e4', '25557c', 'e6e6e6', '929598', '3c4f5c', 'b1e2ff', 'a7ffc4', 'ffdeb5', 'ffafb9', 'ffffb1', 'ff488e', 'ff5c5c', 'ffffff'),
+ 'mouth' => array('concerned', 'default', 'disbelief', 'eating', 'grimace', 'sad', 'screamOpen', 'serious', 'smile', 'tongue', 'twinkle', 'vomit'),
+ 'nose' => array('default'),
+ 'skinColor' => array('614335', 'd08b5b', 'ae5d29', 'edb98a', 'ffdbb4', 'fd9841', 'f8d25c'),
+ 'style' => array('default'),
+ 'top' => array('hat', 'hijab', 'turban', 'winterHat1', 'winterHat02', 'winterHat03', 'winterHat04', 'bob', 'bun', 'curly', 'curvy', 'dreads', 'frida', 'fro', 'froBand', 'longButNotTooLong', 'miaWallace', 'shavedSides', 'straight02', 'straight01', 'straightAndStrand', 'dreads01', 'dreads02', 'frizzle', 'shaggy', 'shaggyMullet', 'shortCurly', 'shortFlat', 'shortRound', 'shortWaved', 'sides', 'theCaesar', 'theCaesarAndSidePart', 'bigHair'),
+ 'topProbability' => 100,
+),
+'groups' => array(
+ 'style' => array(
+ 'circle' => '@@k:base@@',
+ 'default' => '@@k:base@@',
+ ),
+ 'base' => array(
+ 'default' => '@@k:clothing@@@@k:mouth@@@@k:nose@@@@k:eyes@@@@k:eyebrows@@@@k:top@@@@k:facialHair@@@@k:accessories@@',
+ ),
+ 'clothing' => array(
+ 'blazerAndShirt' => '',
+ 'blazerAndSweater' => '',
+ 'collarAndSweater' => '',
+ 'graphicShirt' => '@@k:clothingGraphic@@',
+ 'hoodie' => '',
+ 'overall' => '',
+ 'shirtCrewNeck' => '',
+ 'shirtScoopNeck' => '',
+ 'shirtVNeck' => '',
+ ),
+ 'mouth' => array(
+ 'concerned' => '',
+ 'default' => '',
+ 'disbelief' => '',
+ 'eating' => '',
+ 'grimace' => '',
+ 'sad' => '',
+ 'screamOpen' => '',
+ 'serious' => '',
+ 'smile' => '',
+ 'tongue' => '',
+ 'twinkle' => '',
+ 'vomit' => '',
+ ),
+ 'nose' => array(
+ 'default' => '',
+ ),
+ 'eyes' => array(
+ 'closed' => '',
+ 'cry' => '',
+ 'default' => '',
+ 'eyeRoll' => '',
+ 'happy' => '',
+ 'hearts' => '',
+ 'side' => '',
+ 'squint' => '',
+ 'surprised' => '',
+ 'winkWacky' => '',
+ 'wink' => '',
+ 'xDizzy' => '',
+ ),
+ 'eyebrows' => array(
+ 'angryNatural' => '',
+ 'defaultNatural' => '',
+ 'flatNatural' => '',
+ 'frownNatural' => '',
+ 'raisedExcitedNatural' => '',
+ 'sadConcernedNatural' => '',
+ 'unibrowNatural' => '',
+ 'upDownNatural' => '',
+ 'angry' => '',
+ 'default' => '',
+ 'raisedExcited' => '',
+ 'sadConcerned' => '',
+ 'upDown' => '',
+ ),
+ 'top' => array(
+ 'hat' => '',
+ 'hijab' => '',
+ 'turban' => '',
+ 'winterHat1' => '',
+ 'winterHat02' => '',
+ 'winterHat03' => '',
+ 'winterHat04' => '',
+ 'bob' => '',
+ 'bun' => '',
+ 'curly' => '',
+ 'curvy' => '',
+ 'dreads' => '',
+ 'frida' => '',
+ 'fro' => '',
+ 'froBand' => '',
+ 'longButNotTooLong' => '',
+ 'miaWallace' => '',
+ 'shavedSides' => '',
+ 'straight02' => '',
+ 'straight01' => '',
+ 'straightAndStrand' => '',
+ 'dreads01' => '',
+ 'dreads02' => '',
+ 'frizzle' => '',
+ 'shaggy' => '',
+ 'shaggyMullet' => '',
+ 'shortCurly' => '',
+ 'shortFlat' => '',
+ 'shortRound' => '',
+ 'shortWaved' => '',
+ 'sides' => '',
+ 'theCaesar' => '',
+ 'theCaesarAndSidePart' => '',
+ 'bigHair' => '',
+ ),
+ 'facialHair' => array(
+ 'beardLight' => '',
+ 'beardMajestic' => '',
+ 'beardMedium' => '',
+ 'moustacheFancy' => '',
+ 'moustacheMagnum' => '',
+ ),
+ 'accessories' => array(
+ 'kurt' => '',
+ 'prescription01' => '',
+ 'prescription02' => '',
+ 'round' => '',
+ 'sunglasses' => '',
+ 'wayfarers' => '',
+ 'eyepatch' => '',
+ ),
+ 'clothingGraphic' => array(
+ 'bat' => '',
+ 'bear' => '',
+ 'cumbia' => '',
+ 'deer' => '',
+ 'diamond' => '',
+ 'hola' => '',
+ 'pizza' => '',
+ 'resist' => '',
+ 'skull' => '',
+ 'skullOutline' => '',
+ ),
+),
+);
\ No newline at end of file
diff --git a/inc/avatar-styles/avataaars_neutral.php b/inc/avatar-styles/avataaars_neutral.php
new file mode 100644
index 0000000..723fed9
--- /dev/null
+++ b/inc/avatar-styles/avataaars_neutral.php
@@ -0,0 +1,123 @@
+ 'avataaars-neutral',
+'meta' => array(
+ 'title' => 'Avataaars',
+ 'creator' => 'Pablo Stanley',
+ 'source' => 'https://avataaars.com/',
+ 'license_name' => 'Free for personal and commercial use.',
+ 'license_url' => 'https://avataaars.com/',
+),
+'view_box' => '0 0 112 112',
+'clip_default' => true,
+'has_pre_create' => false,
+'has_post_create' => false,
+'is_initials' => false,
+'attr_pairs' => array(
+ array('viewBox', '0 0 112 112'),
+ array('fill', 'none'),
+ array('shape-rendering', 'auto'),
+),
+'bg_colors' => array('614335', 'd08b5b', 'ae5d29', 'edb98a', 'ffdbb4', 'fd9841', 'f8d25c'),
+'bg_type' => array('solid'),
+'bg_rotation' => array('0', '360'),
+'body_template' => '@@k:mouth@@@@k:nose@@@@k:eyes@@@@k:eyebrows@@',
+'pick_order' => array('mouth', 'nose', 'eyes', 'eyebrows'),
+'bool_order' => array(),
+'color_order' => array(
+),
+'pc_has_ints' => false,
+'pc_meta' => array(
+ array(
+ 'group' => 'mouth',
+ 'values_opt' => 'mouth',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'nose',
+ 'values_opt' => 'nose',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'eyes',
+ 'values_opt' => 'eyes',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'eyebrows',
+ 'values_opt' => 'eyebrows',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+),
+'defaults' => array(
+ 'backgroundColor' => array('614335', 'd08b5b', 'ae5d29', 'edb98a', 'ffdbb4', 'fd9841', 'f8d25c'),
+ 'eyebrows' => array('angryNatural', 'defaultNatural', 'flatNatural', 'frownNatural', 'raisedExcitedNatural', 'sadConcernedNatural', 'unibrowNatural', 'upDownNatural', 'angry', 'default', 'raisedExcited', 'sadConcerned', 'upDown'),
+ 'eyes' => array('closed', 'cry', 'default', 'eyeRoll', 'happy', 'hearts', 'side', 'squint', 'surprised', 'winkWacky', 'wink', 'xDizzy'),
+ 'mouth' => array('concerned', 'default', 'disbelief', 'eating', 'grimace', 'sad', 'screamOpen', 'serious', 'smile', 'tongue', 'twinkle', 'vomit'),
+ 'nose' => array('default'),
+),
+'groups' => array(
+ 'mouth' => array(
+ 'concerned' => '',
+ 'default' => '',
+ 'disbelief' => '',
+ 'eating' => '',
+ 'grimace' => '',
+ 'sad' => '',
+ 'screamOpen' => '',
+ 'serious' => '',
+ 'smile' => '',
+ 'tongue' => '',
+ 'twinkle' => '',
+ 'vomit' => '',
+ ),
+ 'nose' => array(
+ 'default' => '',
+ ),
+ 'eyes' => array(
+ 'closed' => '',
+ 'cry' => '',
+ 'default' => '',
+ 'eyeRoll' => '',
+ 'happy' => '',
+ 'hearts' => '',
+ 'side' => '',
+ 'squint' => '',
+ 'surprised' => '',
+ 'winkWacky' => '',
+ 'wink' => '',
+ 'xDizzy' => '',
+ ),
+ 'eyebrows' => array(
+ 'angryNatural' => '',
+ 'defaultNatural' => '',
+ 'flatNatural' => '',
+ 'frownNatural' => '',
+ 'raisedExcitedNatural' => '',
+ 'sadConcernedNatural' => '',
+ 'unibrowNatural' => '',
+ 'upDownNatural' => '',
+ 'angry' => '',
+ 'default' => '',
+ 'raisedExcited' => '',
+ 'sadConcerned' => '',
+ 'upDown' => '',
+ ),
+),
+);
\ No newline at end of file
diff --git a/inc/avatar-styles/bottts.php b/inc/avatar-styles/bottts.php
new file mode 100644
index 0000000..a6a66d5
--- /dev/null
+++ b/inc/avatar-styles/bottts.php
@@ -0,0 +1,167 @@
+ 'bottts',
+'meta' => array(
+ 'title' => 'Bottts',
+ 'creator' => 'Pablo Stanley',
+ 'source' => 'https://bottts.com/',
+ 'license_name' => 'Free for personal and commercial use',
+ 'license_url' => 'https://bottts.com/',
+),
+'view_box' => '0 0 180 180',
+'clip_default' => true,
+'has_pre_create' => false,
+'has_post_create' => false,
+'is_initials' => false,
+'attr_pairs' => array(
+ array('viewBox', '0 0 180 180'),
+ array('fill', 'none'),
+ array('shape-rendering', 'auto'),
+),
+'bg_colors' => array(),
+'bg_type' => array('solid'),
+'bg_rotation' => array('0', '360'),
+'body_template' => '@@k:sides@@@@k:top@@@@k:face@@@@k:mouth@@@@k:eyes@@',
+'pick_order' => array('sides', 'top', 'face', 'mouth', 'eyes', 'texture'),
+'bool_order' => array('sides', 'top', 'mouth', 'texture'),
+'color_order' => array(
+ 'base' => 'baseColor',
+),
+'pc_has_ints' => false,
+'pc_meta' => array(
+ array(
+ 'group' => 'sides',
+ 'values_opt' => 'sides',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'top',
+ 'values_opt' => 'top',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'face',
+ 'values_opt' => 'face',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'mouth',
+ 'values_opt' => 'mouth',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'eyes',
+ 'values_opt' => 'eyes',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'texture',
+ 'values_opt' => 'texture',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+),
+'defaults' => array(
+ 'baseColor' => array('ffb300', '1e88e5', '546e7a', '6d4c41', '00acc1', 'f4511e', '5e35b1', '43a047', '757575', '3949ab', '039be5', '7cb342', 'c0ca33', 'fb8c00', 'd81b60', '8e24aa', 'e53935', '00897b', 'fdd835'),
+ 'eyes' => array('bulging', 'dizzy', 'eva', 'frame1', 'frame2', 'glow', 'happy', 'hearts', 'robocop', 'round', 'roundFrame01', 'roundFrame02', 'sensor', 'shade01'),
+ 'face' => array('round01', 'round02', 'square01', 'square02', 'square03', 'square04'),
+ 'mouth' => array('bite', 'diagram', 'grill01', 'grill02', 'grill03', 'smile01', 'smile02', 'square01', 'square02'),
+ 'mouthProbability' => 100,
+ 'sides' => array('antenna01', 'antenna02', 'cables01', 'cables02', 'round', 'square', 'squareAssymetric'),
+ 'sidesProbability' => 100,
+ 'texture' => array('camo01', 'camo02', 'circuits', 'dirty01', 'dirty02', 'dots', 'grunge01', 'grunge02'),
+ 'textureProbability' => 50,
+ 'top' => array('antenna', 'antennaCrooked', 'bulb01', 'glowingBulb01', 'glowingBulb02', 'horns', 'lights', 'pyramid', 'radar'),
+ 'topProbability' => 100,
+),
+'groups' => array(
+ 'sides' => array(
+ 'antenna01' => '',
+ 'antenna02' => '',
+ 'cables01' => '',
+ 'cables02' => '',
+ 'round' => '',
+ 'square' => '',
+ 'squareAssymetric' => '',
+ ),
+ 'top' => array(
+ 'antenna' => '',
+ 'antennaCrooked' => '',
+ 'bulb01' => '',
+ 'glowingBulb01' => '',
+ 'glowingBulb02' => '',
+ 'horns' => '',
+ 'lights' => '',
+ 'pyramid' => '',
+ 'radar' => '',
+ ),
+ 'face' => array(
+ 'round01' => '@@k:texture@@',
+ 'round02' => '@@k:texture@@',
+ 'square01' => '@@k:texture@@',
+ 'square02' => '@@k:texture@@',
+ 'square03' => '@@k:texture@@',
+ 'square04' => '@@k:texture@@',
+ ),
+ 'mouth' => array(
+ 'bite' => '',
+ 'diagram' => '',
+ 'grill01' => '',
+ 'grill02' => '',
+ 'grill03' => '',
+ 'smile01' => '',
+ 'smile02' => '',
+ 'square01' => '',
+ 'square02' => '',
+ ),
+ 'eyes' => array(
+ 'bulging' => '',
+ 'dizzy' => '',
+ 'eva' => '',
+ 'frame1' => '',
+ 'frame2' => '',
+ 'glow' => '',
+ 'happy' => '',
+ 'hearts' => '',
+ 'robocop' => '',
+ 'round' => '',
+ 'roundFrame01' => '',
+ 'roundFrame02' => '',
+ 'sensor' => '',
+ 'shade01' => '',
+ ),
+ 'texture' => array(
+ 'camo01' => '',
+ 'camo02' => '',
+ 'circuits' => '',
+ 'dirty01' => '',
+ 'dirty02' => '',
+ 'dots' => '',
+ 'grunge01' => '',
+ 'grunge02' => '',
+ ),
+),
+);
\ No newline at end of file
diff --git a/inc/avatar-styles/bottts_neutral.php b/inc/avatar-styles/bottts_neutral.php
new file mode 100644
index 0000000..fcf3c13
--- /dev/null
+++ b/inc/avatar-styles/bottts_neutral.php
@@ -0,0 +1,84 @@
+ 'bottts-neutral',
+'meta' => array(
+ 'title' => 'Bottts',
+ 'creator' => 'Pablo Stanley',
+ 'source' => 'https://bottts.com/',
+ 'license_name' => 'Free for personal and commercial use',
+ 'license_url' => 'https://bottts.com/',
+),
+'view_box' => '0 0 120 120',
+'clip_default' => true,
+'has_pre_create' => false,
+'has_post_create' => false,
+'is_initials' => false,
+'attr_pairs' => array(
+ array('viewBox', '0 0 120 120'),
+ array('fill', 'none'),
+ array('shape-rendering', 'auto'),
+),
+'bg_colors' => array('ffb300', '1e88e5', '546e7a', '6d4c41', '00acc1', 'f4511e', '5e35b1', '43a047', '757575', '3949ab', '039be5', '7cb342', 'c0ca33', 'fb8c00', 'd81b60', '8e24aa', 'e53935', '00897b', 'fdd835'),
+'bg_type' => array('solid'),
+'bg_rotation' => array('0', '360'),
+'body_template' => '@@k:mouth@@@@k:eyes@@',
+'pick_order' => array('mouth', 'eyes'),
+'bool_order' => array(),
+'color_order' => array(
+),
+'pc_has_ints' => false,
+'pc_meta' => array(
+ array(
+ 'group' => 'mouth',
+ 'values_opt' => 'mouth',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+ array(
+ 'group' => 'eyes',
+ 'values_opt' => 'eyes',
+ 'width' => 0,
+ 'height' => 0,
+ 'rotation' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetX' => array('opt' => null, 'fallback' => array('0')),
+ 'offsetY' => array('opt' => null, 'fallback' => array('0')),
+ ),
+),
+'defaults' => array(
+ 'backgroundColor' => array('ffb300', '1e88e5', '546e7a', '6d4c41', '00acc1', 'f4511e', '5e35b1', '43a047', '757575', '3949ab', '039be5', '7cb342', 'c0ca33', 'fb8c00', 'd81b60', '8e24aa', 'e53935', '00897b', 'fdd835'),
+ 'eyes' => array('bulging', 'dizzy', 'eva', 'frame1', 'frame2', 'glow', 'happy', 'hearts', 'robocop', 'round', 'roundFrame01', 'roundFrame02', 'sensor', 'shade01'),
+ 'mouth' => array('bite', 'diagram', 'grill01', 'grill02', 'grill03', 'smile01', 'smile02', 'square01', 'square02'),
+),
+'groups' => array(
+ 'mouth' => array(
+ 'bite' => '',
+ 'diagram' => '',
+ 'grill01' => '',
+ 'grill02' => '',
+ 'grill03' => '',
+ 'smile01' => '',
+ 'smile02' => '',
+ 'square01' => '',
+ 'square02' => '',
+ ),
+ 'eyes' => array(
+ 'bulging' => '',
+ 'dizzy' => '',
+ 'eva' => '',
+ 'frame1' => '',
+ 'frame2' => '',
+ 'glow' => '',
+ 'happy' => '',
+ 'hearts' => '',
+ 'robocop' => '',
+ 'round' => '',
+ 'roundFrame01' => '',
+ 'roundFrame02' => '',
+ 'sensor' => '',
+ 'shade01' => '',
+ ),
+),
+);
\ No newline at end of file
diff --git a/inc/theme-avatar.php b/inc/theme-avatar.php
index 5b7f47d..252e655 100644
--- a/inc/theme-avatar.php
+++ b/inc/theme-avatar.php
@@ -12,11 +12,16 @@
*
* ── 素材与算法来源 ────────────────────────────────────────────────
* 算法与图形素材来自 DiceBear(https://www.dicebear.com)9.x。
- * 收录的 14 套风格全部是 CC0 1.0 或 MIT 许可,可自由使用与商用:
+ * 收录的 18 套风格全部可自由使用与商用,且**都不要求署名**:
* CC0 1.0:glass identicon initials lorelei lorelei-neutral
* notionists notionists-neutral open-peeps pixel-art
* pixel-art-neutral rings shapes thumbs
* MIT :icons
+ * 作者自定义许可(Free for personal and commercial use,不要求署名):
+ * avataaars avataaars-neutral bottts bottts-neutral
+ * 设计者 Pablo Stanley,来源 avataaars.com / bottts.com。
+ * 这四套在 npm 包里写的是「See LICENSE file」,必须点进去看才知道
+ * 条款 —— 别把「措辞不明」当成「不能商用」,实际比 CC BY 还宽松。
* 每套模板都是把 DiceBear 的风格包「编译」成纯数组后的产物
* (inc/avatar-styles/*.php),文件里没有任何可执行 JS。
*
@@ -534,6 +539,22 @@ function yang_avatar_styles()
'label' => __('首字母', 'kratos'),
'desc' => __('显示邮箱对应的首字母文字。若访客用中文邮箱会显示拼音首字母。', 'kratos'),
),
+ 'avataaars' => array(
+ 'label' => __('美式卡通', 'kratos'),
+ 'desc' => __('美式插画风,表情与发型最丰富的一套。不画背景,头像直接压在页面上。', 'kratos'),
+ ),
+ 'avataaars-neutral' => array(
+ 'label' => __('美式卡通(带底色)', 'kratos'),
+ 'desc' => __('同一套画风,带一块背景色,更醒目一点。', 'kratos'),
+ ),
+ 'bottts' => array(
+ 'label' => __('机器人', 'kratos'),
+ 'desc' => __('机器脑袋,靠零件与配色区分,没有人脸所以不会"崩脸"。不画背景。', 'kratos'),
+ ),
+ 'bottts-neutral' => array(
+ 'label' => __('机器人(带底色)', 'kratos'),
+ 'desc' => __('同一套机器人画风,带背景色块。', 'kratos'),
+ ),
);
}
@@ -572,7 +593,7 @@ function yang_avatar_style()
/**
* 加载某套风格的编译后模板
*
- * 只 require 用到的那一份,其余不解析 —— 14 套全量 1.1MB,
+ * 只 require 用到的那一份,其余不解析 —— 18 套全量 1.2MB,
* 每次请求都加载是不必要的开销。
*
* @param string $style
@@ -1029,11 +1050,13 @@ function yang_avatar_render($style, $seed, $size = 96, $palette = array())
$colors[$ck] = yang_avatar_color($p->pick($vals, 'transparent'));
}
- /* ── 3. onPostCreate(会改 colors / options.backgroundColor) ── */
+ /* ── 3. onPostCreate(会改 colors / options.backgroundColor / 组件开关) ──
+ 必须把 $picked 传进去:官方这里读的是 components.style.name 与 components.top.name。 */
if (!empty($style['has_post_create'])) {
- $res = yang_avatar_post_create($style['name'], $d, $colors, $on);
+ $res = yang_avatar_post_create($style['name'], $d, $colors, $on, $picked);
$d = $res[0];
$colors = $res[1];
+ $on = $res[2];
}
/* ── 4. 展开 body ── */
@@ -1136,7 +1159,7 @@ function yang_avatar_int_range($p, $spec, $d)
* onPreCreate:按风格名精确复刻
*
* 这些是**代码**(会动态改 options),不能当数据编译。
- * 收录的 14 套里只有 shapes 有,且它会消耗 3 次 pick。
+ * 收录的 18 套里只有 shapes 有,且它会消耗 3 次 pick。
*
* @param string $name
* @param Yang_Avatar_Prng $p
@@ -1184,11 +1207,46 @@ function yang_avatar_pre_create($name, $p, $d)
* @param array $d
* @param array $colors
* @param array $on
- * @return array array($d, $colors)
+ * @param array $picked getComponents 已抽到的组件名(官方 onPostCreate 读的是
+ * components.style.name / components.top.name,必须传进来)
+ * @return array array($d, $colors, $on)
*/
-function yang_avatar_post_create($name, $d, $colors, $on)
+function yang_avatar_post_create($name, $d, $colors, $on, $picked = array())
{
- if ($name === 'lorelei' || $name === 'lorelei-neutral') {
+ if ($name === 'avataaars') {
+ /* 官方 onPostCreate 的三条,逐条复刻(顺序也要一样):
+ ① style 组取到 'circle' ⇒ 背景整个清空;
+ ② style 不是 'circle'、但背景**恰好只有 65c9ff 这一项** ⇒ 也清空。
+ 65c9ff 是这款的默认背景色,意思是「用户没主动选过背景」,
+ 留着会在脸后面糊一块天蓝,看着像没去底。
+ ⚠️ 注意这里判的是「只有一个、且等于 65c9ff」,不是「包含 65c9ff」:
+ 若用户给了多个颜色,就说明是主动选的,要留着。
+ ③ 戴头巾(top = hijab)且没强制 100% 胡子 ⇒ 去掉胡子
+ (头巾配胡子现实中不存在)。
+ 清空 backgroundColor 不是「不画背景」那么简单:下游
+ yang_avatar_bg_colors() 对空数组会走 shuffle + next() 消耗 PRNG,
+ 与官方 getBackgroundColors() 的空数组分支步数一致 —— 两边都恰好消耗一次。 */
+ $styleName = isset($picked['style']) ? $picked['style'] : '';
+
+ if ($styleName === 'circle') {
+ $d['backgroundColor'] = array();
+ } elseif (isset($d['backgroundColor']) && is_array($d['backgroundColor'])
+ && count($d['backgroundColor']) === 1
+ && $d['backgroundColor'][0] === '65c9ff') {
+ $d['backgroundColor'] = array();
+ }
+
+ // ③ 头巾与胡子互斥
+ if (!empty($on['top'])) {
+ $topName = isset($picked['top']) ? $picked['top'] : '';
+ $prob = isset($d['facialHairProbability']) ? $d['facialHairProbability'] : 10;
+ if ((int) $prob !== 100 && $topName === 'hijab') {
+ // 官方置 undefined ⇒ 展开时该组不出现;这里同步关掉 bool,避免取到残留值
+ $d['facialHair'] = array();
+ $on['facialHair'] = false;
+ }
+ }
+ } elseif ($name === 'lorelei' || $name === 'lorelei-neutral') {
// 有胡子且胡子与嘴同色时,把嘴改成白色,否则看不出嘴
if (!empty($on['beard']) && isset($colors['hair'], $colors['mouth'])
&& $colors['hair'] === $colors['mouth']) {
@@ -1229,7 +1287,7 @@ function yang_avatar_post_create($name, $d, $colors, $on)
}
}
}
- return array($d, $colors);
+ return array($d, $colors, $on);
}
/**
diff --git a/inc/theme-options.php b/inc/theme-options.php
index d900c39..2b1fe8b 100644
--- a/inc/theme-options.php
+++ b/inc/theme-options.php
@@ -288,7 +288,7 @@ function kratos_options()
$options[] = array(
'name' => __('头像风格', 'kratos'),
- 'desc' => __('勾选上面的「启用自动头像」后,这里才会出现风格列表。所有风格都是 CC0 或 MIT 许可,可自由使用与商用。点一下即时预览,保存后生效。', 'kratos'),
+ 'desc' => __('勾选上面的「启用自动头像」后,这里才会出现风格列表。所有风格都可自由使用与商用,且不要求署名。点一下即时预览,保存后生效。', 'kratos'),
'std' => 'lorelei',
'id' => 'a_auto_style',
'type' => 'avatar_style',
diff --git a/style.css b/style.css
index 3754531..1b687e5 100644
--- a/style.css
+++ b/style.css
@@ -1,7 +1,7 @@
/*
Theme Name: Kratos_Yang
Text Domain: kratos_Yang
-Version: 3.2.37
+Version: 3.2.38
Requires PHP: 7.0
Description: 这是一个Kratos主题的分支版本,用来增加一些定制化功能。
Tags: 博客, 双栏, 响应式, 自定义背景, 自定义颜色, 自定义图标, 自定义菜单, 特色图像, 收录优化, 邮件中心, 主题选项, 小工具, 文章置顶, 无障碍友好