Making WordPress.org


Ignore:
Timestamp:
12/02/2014 11:03:33 PM (10 years ago)
Author:
obenland
Message:

WP.org Themes: First pass at improved single theme page.

  • Synchronizes content between modal and single view.
  • Displays a banner if the theme is outdated.
  • Removes unused inline CSS for easier code scanning.

See #745.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php

    r1006 r1021  
    1212 */
    1313
    14 $template_part = is_single() ? 'single' : 'index';
    1514include ABSPATH . 'wp-admin/includes/theme.php';
    16 if ( is_single() ) {
    17     $themes = themes_api( 'theme_information', array( 'slug' => get_post()->post_name ) );
    18 } else {
    19     $themes = themes_api( 'query_themes', array(
    20         'per_page' => 15,
    21         'browse'   => get_query_var( 'attachment' ) ? get_query_var( 'attachment' ) : 'featured',
    22         'fields'   => 'tags',
    23     ) );
    24 }
     15$themes = themes_api( 'query_themes', array(
     16    'per_page' => 15,
     17    'browse'   => get_query_var( 'attachment' ) ? get_query_var( 'attachment' ) : 'featured',
     18    'fields'   => 'tags',
     19) );
    2520
    2621get_header();
     
    3025    <div class="wp-filter">
    3126        <div class="filter-count">
    32             <span class="count theme-count"></span>
     27            <span class="count theme-count"><?php echo count( $themes->themes ); ?></span>
    3328        </div>
    3429
     
    7671                if ( ! is_wp_error( $themes ) ) :
    7772                    foreach ( $themes->themes as $theme ) :
    78                         get_template_part( 'content', $template_part );
     73                        get_template_part( 'content', 'index' );
    7974                    endforeach;
    8075                endif;
Note: See TracChangeset for help on using the changeset viewer.