diff options
author | Andrew Dolgov <[email protected]> | 2010-01-15 11:46:20 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-01-15 11:46:20 +0300 |
commit | e71f2610091960a66a3b237cc1054f444b7b94a7 (patch) | |
tree | 577638694dbcfc35301e104d3bb396b4702a23f1 /functions.php | |
parent | 8d66a48a6df97d77aab52fc7dec5733cfdc416d9 (diff) |
replace some theme-specific frontend hooks with theme options
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/functions.php b/functions.php index f32ff8c98..781074569 100644 --- a/functions.php +++ b/functions.php @@ -2037,6 +2037,21 @@ return $theme_path; } + function get_user_theme_options($link) { + $t = get_user_theme_path($link); + + if ($t) { + if (is_file("$t/theme.ini")) { + $ini = parse_ini_file("$t/theme.ini", true); + if ($ini['theme']['version']) { + return $ini['theme']['options']; + } + } + } + return false; + } + + function get_all_themes() { $themes = glob("themes/*"); @@ -2054,6 +2069,7 @@ $entry["name"] = $ini['theme']['name']; $entry["version"] = $ini['theme']['version']; $entry["author"] = $ini['theme']['author']; + $entry["options"] = $ini['theme']['options']; array_push($rv, $entry); } } @@ -3133,6 +3149,7 @@ } print "<param key=\"theme\" value=\"".get_user_theme($link)."\"/>"; + print "<param key=\"theme_options\" value=\"".get_user_theme_options($link)."\"/>"; print "<param key=\"daemon_enabled\" value=\"" . ENABLE_UPDATE_DAEMON . "\"/>"; print "<param key=\"feeds_frame_refresh\" value=\"" . FEEDS_FRAME_REFRESH . "\"/>"; print "<param key=\"daemon_refresh_only\" value=\"true\"/>"; |