From a2afbf7531a9059fe495deb19db021abb203efca Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 3 Apr 2024 12:40:12 +0200 Subject: [PATCH] Set `theme_color` and `background_color` dynamically --- .../files/lib/data/style/StyleAction.class.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/lib/data/style/StyleAction.class.php b/wcfsetup/install/files/lib/data/style/StyleAction.class.php index 11ab5f5ff0..d8717beed0 100644 --- a/wcfsetup/install/files/lib/data/style/StyleAction.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleAction.class.php @@ -388,8 +388,12 @@ class StyleAction extends AbstractDatabaseObjectAction implements IToggleAction } if ($hasFavicon) { + $style->loadVariables(); + $headerColor = $style->getVariable('wcfHeaderBackground', true); + $backgroundColor = $style->getVariable('wcfContentBackground', true); + // update manifest.json - $manifest = <<<'MANIFEST' + $manifest = <<getAssetPath() . "manifest.json", $manifest); - $style->loadVariables(); - $tileColor = $style->getVariable('wcfHeaderBackground', true); + // update browserconfig.xml $browserconfig = << - {$tileColor} + {$headerColor} -- 2.20.1