Changeset 1006 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php
- Timestamp:
- 11/25/2014 08:49:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php
r1001 r1006 12 12 */ 13 13 14 $template_part = is_single() ? 'single' : 'index'; 14 15 include ABSPATH . 'wp-admin/includes/theme.php'; 15 $themes = themes_api( 'query_themes', array( 16 'per_page' => 15, 17 'browse' => get_query_var( 'attachment' ) ? get_query_var( 'attachment' ) : 'search', 18 ) ); 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 } 19 25 20 26 get_header(); … … 42 48 <a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a> 43 49 </div> 50 44 51 <?php foreach ( get_theme_feature_list() as $feature_name => $features ) : ?> 45 52 <div class="filter-group"> … … 55 62 </div> 56 63 <?php endforeach; ?> 64 57 65 <div class="filtered-by"> 58 66 <span><?php _e( 'Filtering by:' ); ?></span> … … 61 69 </div> 62 70 </div> 71 </div><!-- .wp-filter --> 72 73 <div class="theme-browser content-filterable"> 74 <div class="themes"> 75 <?php 76 if ( ! is_wp_error( $themes ) ) : 77 foreach ( $themes->themes as $theme ) : 78 get_template_part( 'content', $template_part ); 79 endforeach; 80 endif; 81 ?> 82 </div> 63 83 </div> 64 <div class="theme-browser content-filterable"> 65 <?php 66 if ( ! is_wp_error( $themes ) ) : 67 foreach ( $themes->themes as $theme ) : 68 get_template_part( 'content', 'index' ); 69 endforeach; 70 endif; 71 ?> 72 </div> 84 <div class="theme-install-overlay"></div> 73 85 <div class="theme-overlay"></div> 74 86
Note: See TracChangeset
for help on using the changeset viewer.