From 2297c16ea921c912beabdc6e0abf285cd7197b3a Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Wed, 30 Dec 2009 06:03:52 -0800 Subject: [PATCH] $avail_layouts trying to figure out the best method for having child themes set the themestyle.php which themes are available for the child theme. Signed-off-by: Philip M. Hofer (Frumph) --- comicpress-options.php | 4 ++-- functions.php | 12 ++++++++++++ options/themestyle.php | 19 ++++++++++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/comicpress-options.php b/comicpress-options.php index 57e4799..6b0740c 100644 --- a/comicpress-options.php +++ b/comicpress-options.php @@ -30,7 +30,7 @@ function comicpress_admin() {
function hidemessage() { document.getElementById('message').style.display = 'none'; } diff --git a/functions.php b/functions.php index 0a58526..3838954 100644 --- a/functions.php +++ b/functions.php @@ -233,6 +233,18 @@ function is_cp_theme_layout($choices) { return false; } +function is_cp_layout_avail($layout, $avail_layouts) { + if (empty($layout)) return false; + if (empty($avail_layouts)) $avail_layouts = 'standard,v,3c,3c2r,v3c,v3cr,gn,rgn'; + $avail_layouts = explode(",",$avail_layouts); + foreach ($avail_layouts as $able_layout) { + if ($layout == $able_layout) { + return true; + } + } + return false; +} + /** * Remove of wordpress auto-texturizer. * Dependant on the need remove the commented out areas of this code. diff --git a/options/themestyle.php b/options/themestyle.php index 4e2709a..f56b537 100644 --- a/options/themestyle.php +++ b/options/themestyle.php @@ -20,17 +20,34 @@ + - +