From b909e552945e73571ed0cbb8a2bc55a30db68b66 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Tue, 10 Apr 2012 00:15:13 +0000 Subject: [PATCH] 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 --- wp-admin/css/wp-admin.dev.css | 10 +++- .../class-wp-theme-install-list-table.php | 6 +-- .../includes/class-wp-themes-list-table.php | 54 ++++++++++--------- 3 files changed, 40 insertions(+), 30 deletions(-) diff --git a/wp-admin/css/wp-admin.dev.css b/wp-admin/css/wp-admin.dev.css index 1b50abfbb..b05ed6abf 100644 --- a/wp-admin/css/wp-admin.dev.css +++ b/wp-admin/css/wp-admin.dev.css @@ -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 { diff --git a/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php index 4dc0b6119..d79d5151d 100644 --- a/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/wp-admin/includes/class-wp-theme-install-list-table.php @@ -197,10 +197,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { -

by %2$s' ), $name, $author ); - ?>

+

+
install_theme_info( $theme ); diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index b2b16cd92..a148212c1 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -116,17 +116,17 @@ class WP_Themes_List_Table extends WP_List_Table { function display_rows() { $themes = $this->items; - foreach ( $themes as $theme ) { - echo '
'; + foreach ( $themes as $theme ): + ?>
get_template(); + $template = $theme->get_template(); $stylesheet = $theme->get_stylesheet(); - - $title = $theme->display('Name'); - $version = $theme->display('Version'); - $author = $theme->display('Author'); + $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,28 +154,32 @@ class WP_Themes_List_Table extends WP_List_Table { -

- - - | -
-

display('Description'); ?>

- parent() ) : - /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: 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.' ), - $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?>

- -

%2$s.' ), - $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?>

- +

+
+ + +
+

+

display('Description'); ?>

+ parent() ) : + /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: 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.' ), + $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?>

+ +

%2$s.' ), + $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?>

+ +
+ +