WordPress.org

Make WordPress Core

Changeset 20414


Ignore:
Timestamp:
04/10/12 00:15:13 (2 years ago)
Author:
koopersmith
Message:

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.
Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.dev.css

    r20412 r20414  
    43054305 
    43064306.available-theme h3 { 
    4307     margin: 15px 0 5px; 
     4307    margin: 15px 0 0; 
     4308} 
     4309 
     4310.available-theme .theme-author { 
     4311    line-height: 18px; 
     4312} 
     4313 
     4314.available-theme .action-links { 
     4315    margin-top: 10px; 
    43084316} 
    43094317 
  • trunk/wp-admin/includes/class-wp-theme-install-list-table.php

    r20391 r20414  
    198198        </a> 
    199199 
    200         <h3><?php 
    201             /* translators: 1: theme name, 2: author name */ 
    202             printf( __( '%1$s <span>by %2$s</span>' ), $name, $author ); 
    203         ?></h3> 
     200        <h3><?php echo $name; ?></h3> 
     201        <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 
    204202 
    205203        <?php 
  • trunk/wp-admin/includes/class-wp-themes-list-table.php

    r20352 r20414  
    117117        $themes = $this->items; 
    118118 
    119         foreach ( $themes as $theme ) { 
    120             echo '<div class="available-theme">'; 
    121  
    122             $template = $theme->get_template(); 
     119        foreach ( $themes as $theme ): 
     120            ?><div class="available-theme"><?php 
     121 
     122            $template   = $theme->get_template(); 
    123123            $stylesheet = $theme->get_stylesheet(); 
    124  
    125             $title = $theme->display('Name'); 
    126             $version = $theme->display('Version'); 
    127             $author = $theme->display('Author'); 
     124            $title      = $theme->display('Name'); 
     125            $version    = $theme->display('Version'); 
     126            $author     = $theme->display('Author'); 
    128127 
    129128            $activate_link = wp_nonce_url( "themes.php?action=activate&amp;template=" . urlencode( $template ) . "&amp;stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $template ); 
     129 
    130130            $preview_link = esc_url( add_query_arg( 
    131131                array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), 
     
    155155            <?php endif; ?> 
    156156            </a> 
    157             <h3><?php 
    158             /* translators: 1: theme title, 2: theme version, 3: theme author */ 
    159             printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3> 
    160  
    161             <span class='action-links'><?php echo $actions ?></span> 
    162             <span class="separator hide-if-no-js">| </span><a href="#" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a> 
     157            <h3><?php echo $title; ?></h3> 
     158            <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 
     159            <div class="action-links"> 
     160                <?php echo $actions; ?> 
     161                <span class="separator hide-if-no-js">| </span><a href="#" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a> 
     162            </div> 
     163 
    163164            <div class="themedetaildiv hide-if-js"> 
    164             <p><?php echo $theme->display('Description'); ?></p> 
    165             <?php if ( current_user_can( 'edit_themes' ) && $theme->parent() ) : 
    166                 /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> 
    167                 <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.' ), 
    168                     $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?></p> 
    169             <?php else : 
    170                     /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir */ ?> 
    171                 <p><?php printf( __( 'All of this theme&#8217;s files are located in <code>%2$s</code>.' ), 
    172                     $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?></p> 
    173             <?php endif; ?> 
     165                <p><strong><?php _e('Version: '); ?></strong><?php echo $version; ?></p> 
     166                <p><?php echo $theme->display('Description'); ?></p> 
     167                <?php if ( current_user_can( 'edit_themes' ) && $theme->parent() ) : 
     168                    /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> 
     169                    <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.' ), 
     170                        $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?></p> 
     171                <?php else : 
     172                        /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir */ ?> 
     173                    <p><?php printf( __( 'All of this theme&#8217;s files are located in <code>%2$s</code>.' ), 
     174                        $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?></p> 
     175                <?php endif; ?> 
    174176            </div> 
     177 
    175178            <?php theme_update_available( $theme ); ?> 
     179 
    176180            </div> 
    177181        <?php 
    178         } 
     182        endforeach; 
    179183    } 
    180184 
Note: See TracChangeset for help on using the changeset viewer.