From 720f1d71233ab9f6be3ea4ae4b09d823fdca7367 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 1 Sep 2016 17:09:58 -0700 Subject: actively set all the theme options on the display settings page based on the current theme selection --- Zotlabs/Module/Theme_info.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Module/Theme_info.php') diff --git a/Zotlabs/Module/Theme_info.php b/Zotlabs/Module/Theme_info.php index 054ab6447..eb4a28279 100644 --- a/Zotlabs/Module/Theme_info.php +++ b/Zotlabs/Module/Theme_info.php @@ -9,6 +9,8 @@ class Theme_info extends \Zotlabs\Web\Controller { $theme = argv(1); if(! $theme) killme(); + + $schemalist = array(); $theme_config = ""; if(($themeconfigfile = $this->get_theme_config_file($theme)) != null){ @@ -17,6 +19,12 @@ class Theme_info extends \Zotlabs\Web\Controller { $clsname = ucfirst($theme) . 'Config'; $th_config = new $clsname(); $schemas = $th_config->get_schemas(); + if($schemas) { + foreach($schemas as $k => $v) { + $schemalist[] = [ 'key' => $k, 'val' => $v ]; + } + } + } $theme_config = theme_content($a); } @@ -39,7 +47,7 @@ class Theme_info extends \Zotlabs\Web\Controller { 'desc' => $desc, 'version' => $version, 'credits' => $credits, - 'schemas' => $schemas, + 'schemas' => $schemalist, 'config' => $theme_config ]; json_return_and_die($ret); -- cgit v1.2.3