diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 350bd327e8..05446275e7 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -39,48 +39,62 @@ $current_template_dir = $themes[$current_theme]['Template Dir']; $current_stylesheet_dir = $themes[$current_theme]['Stylesheet Dir']; $current_template = $themes[$current_theme]['Template']; $current_stylesheet = $themes[$current_theme]['Stylesheet']; +$current_screenshot = $themes[$current_theme]['Screenshot']; ?>

+ +Current theme preview +

-

%1$s. The template files are located in %2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $current_theme, $current_template_dir, $current_stylesheet_dir, $current_theme, $current_parent_theme); ?>

+

%2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $current_theme, $current_template_dir, $current_stylesheet_dir, $current_theme, $current_parent_theme); ?>

-

%1$s. The template files are located in %2$s. The stylesheet files are located in %3$s.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?>

+

%2$s.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?>

- - - - - - - + +
+

"> + + + + + +

+

+
+' . __('Active Theme') . ''; $current = true; } else { - $action = "" . __('Select') . ''; + $action = "" . __('Select') . ''; $current = false; } @@ -93,16 +107,17 @@ $current_stylesheet = $themes[$current_theme]['Stylesheet']; if ( $current ) echo ""; else - echo ""; + echo ""; echo " "; +*/ } + ?> -
$title $version$title $version$author $description $action
diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 10fe7e99c5..dad4f9ae73 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -160,6 +160,26 @@ textarea, input, select { margin: 10px 20px 10px 20px; } +.available-theme { + width: 250px; + margin-right: 2.5em; + float: left; + text-align: center; +} + +.available-theme span { + width: 250px; + height: 187px; + display: block; + margin: auto; + background: #f1f1f1; + border: 1px solid #ccc; +} + +.available-theme img { + width: 100%; +} + .checkbox { background: #fff; border: none; @@ -267,6 +287,7 @@ textarea, input, select { .wrap h2 { margin: .8em 0 .5em; + clear: both; } #adminmenu { @@ -341,6 +362,13 @@ textarea, input, select { width: 97%; } +#currenttheme img { + float: left; + border: 1px solid #666; + margin-right: 1em; + margin-bottom: 1.5em; +} + #deletepost:hover { background: #ce0000; color: #fff; diff --git a/wp-content/themes/classic/screenshot.png b/wp-content/themes/classic/screenshot.png new file mode 100644 index 0000000000..6692130614 Binary files /dev/null and b/wp-content/themes/classic/screenshot.png differ diff --git a/wp-content/themes/default/screenshot.png b/wp-content/themes/default/screenshot.png new file mode 100644 index 0000000000..e0b1d488e1 Binary files /dev/null and b/wp-content/themes/default/screenshot.png differ diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 8328fcfc85..69096ad140 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1511,9 +1511,6 @@ function get_theme_data($theme_file) { $name = $theme_name[1]; $name = trim($name); $theme = $name; - if ('' != $theme_uri[1] && '' != $name) { - $theme = '' . $theme . ''; - } if ('' == $author_uri[1]) { $author = $author_name[1]; @@ -1569,7 +1566,7 @@ function get_themes() { foreach($theme_files as $theme_file) { $theme_data = get_theme_data("$theme_root/$theme_file"); - + $name = $theme_data['Name']; $title = $theme_data['Title']; $description = wptexturize($theme_data['Description']); @@ -1578,6 +1575,12 @@ function get_themes() { $template = $theme_data['Template']; $stylesheet = dirname($theme_file); + $screenshot = glob("$theme_root/$stylesheet/screenshot.png"); + if ( !empty( $screenshot ) ) + $screenshot = basename( $screenshot[0] ); + else + $screenshot = false; + if (empty($name)) { $name = dirname($theme_file); $title = $name; @@ -1640,7 +1643,7 @@ function get_themes() { } } - $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']); + $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'], 'Screenshot' => $screenshot); } // Resolve theme dependencies. diff --git a/wp-includes/version.php b/wp-includes/version.php index 45a9133075..1c31ee7d37 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -2,6 +2,6 @@ // This just holds the version number, in a separate file so we can bump it without cluttering the SVN -$wp_version = '1.6-ALPHA-2'; +$wp_version = '1.6-ALPHA-2-still-dont-use'; ?> \ No newline at end of file