chore(variants): add bodybackgroundcolor to build.php chooser migration (row 149)

Missed in the row-149 commit: the legacy-hex -> mode "other" + <key>custom
migration list now also covers bodybackgroundcolor, matching aColorChooserKeys
in options.js/options.twig.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-26 21:09:06 +01:00
commit 90a65b3d65

View file

@ -268,13 +268,13 @@ foreach ($logoPositions as $pos) {
} }
} }
// --- Row 115/135 migration: the color-chooser options (navbarfontcolor, // --- Row 115/135/149 migration: the color-chooser options (navbarfontcolor,
// headerbackgroundcolor, progressbarcolor, progressbarbackgroundcolor, // headerbackgroundcolor, progressbarcolor, progressbarbackgroundcolor,
// progressbarfontcolor) became mode dropdowns (default|defaultbackgroundcolor| // progressbarfontcolor, bodybackgroundcolor) became mode dropdowns (default|defaultbackgroundcolor|
// color1|color2|color3|other) with a <key>custom colorpicker child. A legacy HEX // color1|color2|color3|other) with a <key>custom colorpicker child. A legacy HEX
// value in the json means "custom color": map it to mode "other" and move the hex // value in the json means "custom color": map it to mode "other" and move the hex
// into the <key>custom child, so the variant default stays valid for the dropdown. // into the <key>custom child, so the variant default stays valid for the dropdown.
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor']; $colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor'];
foreach ($colorChooserKeys as $ck) { foreach ($colorChooserKeys as $ck) {
if (isset($definition['options'][$ck]) if (isset($definition['options'][$ck])
&& is_string($definition['options'][$ck]) && is_string($definition['options'][$ck])