Theme browsing UX improvements. see #20403.
* On manage/install themes pages, moved author under theme name. * On manage themes page, moved version number to details. git-svn-id: http://svn.automattic.com/wordpress/trunk@20414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
14a2452d72
commit
b909e55294
|
@ -4304,7 +4304,15 @@ h3.available-themes {
|
|||
}
|
||||
|
||||
.available-theme h3 {
|
||||
margin: 15px 0 5px;
|
||||
margin: 15px 0 0;
|
||||
}
|
||||
|
||||
.available-theme .theme-author {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.available-theme .action-links {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#current-theme {
|
||||
|
|
|
@ -197,10 +197,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||
<img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' />
|
||||
</a>
|
||||
|
||||
<h3><?php
|
||||
/* translators: 1: theme name, 2: author name */
|
||||
printf( __( '%1$s <span>by %2$s</span>' ), $name, $author );
|
||||
?></h3>
|
||||
<h3><?php echo $name; ?></h3>
|
||||
<div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
|
||||
|
||||
<?php
|
||||
$this->install_theme_info( $theme );
|
||||
|
|
|
@ -116,17 +116,17 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||
function display_rows() {
|
||||
$themes = $this->items;
|
||||
|
||||
foreach ( $themes as $theme ) {
|
||||
echo '<div class="available-theme">';
|
||||
foreach ( $themes as $theme ):
|
||||
?><div class="available-theme"><?php
|
||||
|
||||
$template = $theme->get_template();
|
||||
$stylesheet = $theme->get_stylesheet();
|
||||
|
||||
$title = $theme->display('Name');
|
||||
$version = $theme->display('Version');
|
||||
$author = $theme->display('Author');
|
||||
|
||||
$activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $template );
|
||||
|
||||
$preview_link = esc_url( add_query_arg(
|
||||
array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ),
|
||||
home_url( '/' ) ) );
|
||||
|
@ -154,13 +154,15 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||
<img src="<?php echo esc_url( $screenshot ); ?>" alt="" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<h3><?php
|
||||
/* translators: 1: theme title, 2: theme version, 3: theme author */
|
||||
printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3>
|
||||
|
||||
<span class='action-links'><?php echo $actions ?></span>
|
||||
<h3><?php echo $title; ?></h3>
|
||||
<div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
|
||||
<div class="action-links">
|
||||
<?php echo $actions; ?>
|
||||
<span class="separator hide-if-no-js">| </span><a href="#" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a>
|
||||
</div>
|
||||
|
||||
<div class="themedetaildiv hide-if-js">
|
||||
<p><strong><?php _e('Version: '); ?></strong><?php echo $version; ?></p>
|
||||
<p><?php echo $theme->display('Description'); ?></p>
|
||||
<?php if ( current_user_can( 'edit_themes' ) && $theme->parent() ) :
|
||||
/* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
|
||||
|
@ -172,10 +174,12 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||
$title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php theme_update_available( $theme ); ?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
endforeach;
|
||||
}
|
||||
|
||||
function search_theme( $theme ) {
|
||||
|
|
Loading…
Reference in New Issue