From e71f2610091960a66a3b237cc1054f444b7b94a7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 15 Jan 2010 11:46:20 +0300 Subject: replace some theme-specific frontend hooks with theme options --- functions.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'functions.php') 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 ""; + print ""; print ""; print ""; print ""; -- cgit v1.2.3