From 2c30bcbb7d132b2b86dd60a24adfbfa812e3ca44 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 31 Mar 2005 04:44:50 +0000 Subject: [PATCH] Add support for new Status: theme header field. http://mosquito.wordpress.org/view.php?id=1192 git-svn-id: http://svn.automattic.com/wordpress/trunk@2502 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 1b19223de4..66779a037f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1517,6 +1517,10 @@ function get_theme_data($theme_file) { $version = $version[1]; else $version =''; + if ( preg_match("|Status:(.*)|i", $theme_data, $status) ) + $status = $status[1]; + else + $status ='publish'; $description = wptexturize($description[1]); @@ -1533,7 +1537,7 @@ function get_theme_data($theme_file) { $author = '' . $author_name[1] . ''; } - return array('Name' => $name, 'Title' => $theme, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1]); + return array('Name' => $name, 'Title' => $theme, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status); } function get_themes() { @@ -1634,7 +1638,7 @@ function get_themes() { if (empty($template_dir)) $template_dir = '/'; if (empty($stylesheet_dir)) $stylesheet_dir = '/'; - $themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Stylesheet' => $stylesheet, 'Template Files' => $template_files, 'Stylesheet Files' => $stylesheet_files, 'Template Dir' => $template_dir, 'Stylesheet Dir' => $stylesheet_dir); + $themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Stylesheet' => $stylesheet, 'Template Files' => $template_files, 'Stylesheet Files' => $stylesheet_files, 'Template Dir' => $template_dir, 'Stylesheet Dir' => $stylesheet_dir, 'Status' => $theme_data['Status']); } // Resolve theme dependencies.