Making the presentation page a little more intuitive
git-svn-id: http://svn.automattic.com/wordpress/trunk@2757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a7b8ae2f17
commit
4022b5c2be
|
@ -39,48 +39,62 @@ $current_template_dir = $themes[$current_theme]['Template Dir'];
|
||||||
$current_stylesheet_dir = $themes[$current_theme]['Stylesheet Dir'];
|
$current_stylesheet_dir = $themes[$current_theme]['Stylesheet Dir'];
|
||||||
$current_template = $themes[$current_theme]['Template'];
|
$current_template = $themes[$current_theme]['Template'];
|
||||||
$current_stylesheet = $themes[$current_theme]['Stylesheet'];
|
$current_stylesheet = $themes[$current_theme]['Stylesheet'];
|
||||||
|
$current_screenshot = $themes[$current_theme]['Screenshot'];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><?php _e('Current Theme'); ?></h2>
|
<h2><?php _e('Current Theme'); ?></h2>
|
||||||
<div id="currenttheme">
|
<div id="currenttheme">
|
||||||
|
<?php if ( $current_screenshot ) : ?>
|
||||||
|
<img src="<?php echo get_option('siteurl') . '/' . $current_stylesheet_dir . '/' . $current_screenshot; ?>" alt="Current theme preview" />
|
||||||
|
<?php endif; ?>
|
||||||
<h3><?php printf(__('%1$s %2$s by %3$s'), $current_title, $current_version, $themes[$current_theme]['Author']) ; ?></h3>
|
<h3><?php printf(__('%1$s %2$s by %3$s'), $current_title, $current_version, $themes[$current_theme]['Author']) ; ?></h3>
|
||||||
<p><?php echo $themes[$current_theme]['Description']; ?></p>
|
<p><?php echo $themes[$current_theme]['Description']; ?></p>
|
||||||
<?php if ($current_parent_theme) { ?>
|
<?php if ($current_parent_theme) { ?>
|
||||||
<p><?php printf(__('The active theme is <strong>%1$s</strong>. The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.'), $current_theme, $current_template_dir, $current_stylesheet_dir, $current_theme, $current_parent_theme); ?></p>
|
<p><?php printf(__('The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.'), $current_theme, $current_template_dir, $current_stylesheet_dir, $current_theme, $current_parent_theme); ?></p>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<p><?php printf(__('The active theme is <strong>%1$s</strong>. The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?></p>
|
<p><?php printf(__('All of this theme’s files are located in <code>%2$s</code>.'), $current_theme, $current_template_dir, $current_stylesheet_dir); ?></p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><?php _e('Available Themes'); ?></h2>
|
<h2><?php _e('Available Themes'); ?></h2>
|
||||||
<?php if ( 1 < count($themes) ) { ?>
|
<?php if ( 1 < count($themes) ) { ?>
|
||||||
<table width="100%" cellpadding="3" cellspacing="3">
|
|
||||||
<tr>
|
|
||||||
<th><?php _e('Name'); ?></th>
|
|
||||||
<th><?php _e('Author'); ?></th>
|
|
||||||
<th><?php _e('Description'); ?></th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
<?php
|
<?php
|
||||||
$style = '';
|
$style = '';
|
||||||
|
|
||||||
$theme_names = array_keys($themes);
|
$theme_names = array_keys($themes);
|
||||||
natcasesort($theme_names);
|
natcasesort($theme_names);
|
||||||
|
|
||||||
foreach ($theme_names as $theme_name) {
|
foreach ($theme_names as $theme_name) {
|
||||||
|
if ( $theme_name == $current_theme )
|
||||||
|
continue;
|
||||||
$template = $themes[$theme_name]['Template'];
|
$template = $themes[$theme_name]['Template'];
|
||||||
$stylesheet = $themes[$theme_name]['Stylesheet'];
|
$stylesheet = $themes[$theme_name]['Stylesheet'];
|
||||||
$title = $themes[$theme_name]['Title'];
|
$title = $themes[$theme_name]['Title'];
|
||||||
$version = $themes[$theme_name]['Version'];
|
$version = $themes[$theme_name]['Version'];
|
||||||
$description = $themes[$theme_name]['Description'];
|
$description = $themes[$theme_name]['Description'];
|
||||||
$author = $themes[$theme_name]['Author'];
|
$author = $themes[$theme_name]['Author'];
|
||||||
|
$screenshot = $themes[$theme_name]['Screenshot'];
|
||||||
|
$stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
|
||||||
|
?>
|
||||||
|
<div class="available-theme">
|
||||||
|
<h3><a href="<?php echo "themes.php?action=activate&template=$template&stylesheet=$stylesheet"; ?>"><?php echo "$title $version"; ?>
|
||||||
|
<span>
|
||||||
|
<?php if ( $screenshot ) : ?>
|
||||||
|
<img src="<?php echo get_option('siteurl') . '/' . $stylesheet_dir . '/' . $screenshot; ?>" alt="" />
|
||||||
|
<?php endif; ?>
|
||||||
|
</span>
|
||||||
|
</a></h3>
|
||||||
|
<p><?php echo $description; ?></p>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
if ($template == $current_template && $stylesheet == $current_stylesheet) {
|
if ($template == $current_template && $stylesheet == $current_stylesheet) {
|
||||||
$action = '<strong>' . __('Active Theme') . '</strong>';
|
$action = '<strong>' . __('Active Theme') . '</strong>';
|
||||||
$current = true;
|
$current = true;
|
||||||
} else {
|
} else {
|
||||||
$action = "<a href='themes.php?action=activate&template=$template&stylesheet=$stylesheet' title='" . __('Select this theme') . "' class='edit'>" . __('Select') . '</a>';
|
$action = "<a href='' title='" . __('Select this theme') . "' class='edit'>" . __('Select') . '</a>';
|
||||||
$current = false;
|
$current = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,16 +107,17 @@ $current_stylesheet = $themes[$current_theme]['Stylesheet'];
|
||||||
if ( $current )
|
if ( $current )
|
||||||
echo "<td><strong>$title $version</strong></td>";
|
echo "<td><strong>$title $version</strong></td>";
|
||||||
else
|
else
|
||||||
echo "<td>$title $version</td>";
|
echo "<td></td>";
|
||||||
echo "
|
echo "
|
||||||
<td class=\"auth\">$author</td>
|
<td class=\"auth\">$author</td>
|
||||||
<td class=\"desc\">$description</td>
|
<td class=\"desc\">$description</td>
|
||||||
<td class=\"togl\">$action</td>
|
<td class=\"togl\">$action</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</table>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -160,6 +160,26 @@ textarea, input, select {
|
||||||
margin: 10px 20px 10px 20px;
|
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 {
|
.checkbox {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -267,6 +287,7 @@ textarea, input, select {
|
||||||
|
|
||||||
.wrap h2 {
|
.wrap h2 {
|
||||||
margin: .8em 0 .5em;
|
margin: .8em 0 .5em;
|
||||||
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
#adminmenu {
|
#adminmenu {
|
||||||
|
@ -341,6 +362,13 @@ textarea, input, select {
|
||||||
width: 97%;
|
width: 97%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#currenttheme img {
|
||||||
|
float: left;
|
||||||
|
border: 1px solid #666;
|
||||||
|
margin-right: 1em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
#deletepost:hover {
|
#deletepost:hover {
|
||||||
background: #ce0000;
|
background: #ce0000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
|
@ -1511,9 +1511,6 @@ function get_theme_data($theme_file) {
|
||||||
$name = $theme_name[1];
|
$name = $theme_name[1];
|
||||||
$name = trim($name);
|
$name = trim($name);
|
||||||
$theme = $name;
|
$theme = $name;
|
||||||
if ('' != $theme_uri[1] && '' != $name) {
|
|
||||||
$theme = '<a href="' . $theme_uri[1] . '" title="' . __('Visit theme homepage') . '">' . $theme . '</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('' == $author_uri[1]) {
|
if ('' == $author_uri[1]) {
|
||||||
$author = $author_name[1];
|
$author = $author_name[1];
|
||||||
|
@ -1578,6 +1575,12 @@ function get_themes() {
|
||||||
$template = $theme_data['Template'];
|
$template = $theme_data['Template'];
|
||||||
$stylesheet = dirname($theme_file);
|
$stylesheet = dirname($theme_file);
|
||||||
|
|
||||||
|
$screenshot = glob("$theme_root/$stylesheet/screenshot.png");
|
||||||
|
if ( !empty( $screenshot ) )
|
||||||
|
$screenshot = basename( $screenshot[0] );
|
||||||
|
else
|
||||||
|
$screenshot = false;
|
||||||
|
|
||||||
if (empty($name)) {
|
if (empty($name)) {
|
||||||
$name = dirname($theme_file);
|
$name = dirname($theme_file);
|
||||||
$title = $name;
|
$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.
|
// Resolve theme dependencies.
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
// This just holds the version number, in a separate file so we can bump it without cluttering the SVN
|
// 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';
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue