From d16e72b15270e6b5fdbcd8901e70de6573439444 Mon Sep 17 00:00:00 2001 From: filesite Date: Sat, 11 May 2024 06:19:19 +0800 Subject: [PATCH] add theme custom config json load --- conf/app.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf/app.php b/conf/app.php index 3330988..49a93f5 100644 --- a/conf/app.php +++ b/conf/app.php @@ -142,4 +142,14 @@ if (file_exists($customConfigFile)) { }catch(Exception $e) {} } +//皮肤对应的自定义配置 +$customConfigFile = __DIR__ . "/../runtime/custom_config_{$configs['theme']}.json"; +if (file_exists($customConfigFile)) { + try { + $json = file_get_contents($customConfigFile); + $customConfigs = json_decode($json, true); + $configs = array_merge($configs, $customConfigs); + }catch(Exception $e) {} +} + return $configs; \ No newline at end of file