From 3122bbc8d20b4e2bcbd6d6e7d70ab793b36a94fc Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@2502 602fd350-edb4-49c9-b593-d223f7449a82 --- 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.