summaryrefslogtreecommitdiffstats
path: root/wp-includes/theme.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-24 13:24:32 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-24 13:24:32 +0000
commit5d34926f74d8032e4a245c01c2b35351286edd76 (patch)
tree056b48994c2cb92704ea91ee5c6b6f46ed41e68d /wp-includes/theme.php
parent15a0a1765324cd24fba870fc10b45366f9f757ba (diff)
downloadwordpress-mu-5d34926f74d8032e4a245c01c2b35351286edd76.tar.gz
wordpress-mu-5d34926f74d8032e4a245c01c2b35351286edd76.tar.xz
wordpress-mu-5d34926f74d8032e4a245c01c2b35351286edd76.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@703 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/theme.php')
-rw-r--r--wp-includes/theme.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/wp-includes/theme.php b/wp-includes/theme.php
index 2ce5641..9130394 100644
--- a/wp-includes/theme.php
+++ b/wp-includes/theme.php
@@ -50,24 +50,24 @@ function get_theme_data($theme_file) {
preg_match("|Author URI:(.*)|i", $theme_data, $author_uri);
preg_match("|Template:(.*)|i", $theme_data, $template);
if ( preg_match("|Version:(.*)|i", $theme_data, $version) )
- $version = $version[1];
+ $version = trim($version[1]);
else
$version ='';
if ( preg_match("|Status:(.*)|i", $theme_data, $status) )
- $status = $status[1];
+ $status = trim($status[1]);
else
- $status ='publish';
+ $status = 'publish';
- $description = wptexturize($description[1]);
+ $description = wptexturize(trim($description[1]));
$name = $theme_name[1];
$name = trim($name);
$theme = $name;
if ( '' == $author_uri[1] ) {
- $author = $author_name[1];
+ $author = trim($author_name[1]);
} else {
- $author = '<a href="' . $author_uri[1] . '" title="' . __('Visit author homepage') . '">' . $author_name[1] . '</a>';
+ $author = '<a href="' . trim($author_uri[1]) . '" title="' . __('Visit author homepage') . '">' . trim($author_name[1]) . '</a>';
}
return array('Name' => $name, 'Title' => $theme, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status);
@@ -371,6 +371,10 @@ function load_template($file) {
}
function validate_current_theme() {
+ // Don't validate during an install/upgrade.
+ if ( defined('WP_INSTALLING') )
+ return true;
+
if ((get_template() != 'default') && (!file_exists(get_template_directory() . '/index.php'))) {
update_option('template', 'default');
update_option('stylesheet', 'default');