Changeset 1034 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php
- Timestamp:
- 12/11/2014 07:39:05 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
r1021 r1034 13 13 14 14 include ABSPATH . 'wp-admin/includes/theme.php'; 15 $themes = themes_api( 'query_themes', array( 15 16 $args = array( 16 17 'per_page' => 15, 17 'browse' => get_query_var( 'attachment' ) ? get_query_var( 'attachment' ) : 'featured', 18 'fields' => 'tags', 19 ) ); 18 'fields' => array_merge( $GLOBALS['theme_field_defaults'], array( 19 'parent' => true, 20 ) ), 21 ); 22 23 if ( get_query_var( 'tag' ) ) { 24 $args['tag'][] = get_query_var( 'tag' ); 25 } else { 26 $args['browse'] = get_query_var( 'attachment' ) ? get_query_var( 'attachment' ) : 'featured'; 27 } 28 $themes = themes_api( 'query_themes', $args ); 20 29 21 30 get_header(); 22 31 ?> 23 32 24 <div id="themes" class="wrap"> 25 <div class="wp-filter"> 26 <div class="filter-count"> 27 <span class="count theme-count"><?php echo count( $themes->themes ); ?></span> 28 </div> 29 30 <ul class="filter-links"> 31 <li><a href="#" data-sort="featured"><?php _ex( 'Featured', 'themes' ); ?></a></li> 32 <li><a href="#" data-sort="popular"><?php _ex( 'Popular', 'themes' ); ?></a></li> 33 <li><a href="#" data-sort="new"><?php _ex( 'Latest', 'themes' ); ?></a></li> 34 </ul> 35 36 <a class="drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a> 37 38 <div class="search-form"></div> 39 40 <div class="filter-drawer"> 41 <div class="buttons"> 42 <a class="apply-filters button button-secondary" href="#"><?php _e( 'Apply Filters' ); ?><span></span></a> 43 <a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a> 33 <div id="themes" class="wrap"> 34 <div class="wp-filter"> 35 <div class="filter-count"> 36 <span class="count theme-count"><?php echo count( $themes->themes ); ?></span> 44 37 </div> 45 38 46 <?php foreach ( get_theme_feature_list() as $feature_name => $features ) : ?> 47 <div class="filter-group"> 48 <h4><?php echo esc_html( $feature_name ); ?></h4> 49 <ol class="feature-group"> 50 <?php foreach ( $features as $feature => $feature_name ) : ?> 51 <li> 52 <input type="checkbox" id="filter-id-<?php echo esc_attr( $feature ); ?>" value="<?php echo esc_attr( $feature ); ?>" /> 53 <label for="filter-id-<?php echo esc_attr( $feature ); ?>"><?php echo esc_html( $feature_name ); ?></label> 54 </li> 55 <?php endforeach; ?> 56 </ol> 39 <ul class="filter-links"> 40 <li><a href="/browse/featured/" data-sort="featured"><?php _ex( 'Featured', 'themes' ); ?></a></li> 41 <li><a href="/browse/popular/" data-sort="popular"><?php _ex( 'Popular', 'themes' ); ?></a></li> 42 <li><a href="/browse/new/" data-sort="new"><?php _ex( 'Latest', 'themes' ); ?></a></li> 43 </ul> 44 45 <a class="drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a> 46 47 <div class="search-form"></div> 48 49 <div class="filter-drawer"> 50 <div class="buttons"> 51 <a class="apply-filters button button-secondary" href="#"><?php _e( 'Apply Filters' ); ?><span></span></a> 52 <a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a> 53 </div> 54 55 <div class="filtered-by"> 56 <span><?php _e( 'Filtering by:' ); ?></span> 57 <div class="tags"></div> 58 <a href="#"><?php _e( 'Edit' ); ?></a> 59 </div> 60 61 <?php foreach( get_theme_feature_list() as $feature_name => $features ) : ?> 62 <div class="filter-group"> 63 <h4><?php echo esc_html( $feature_name ); ?></h4> 64 <ol class="feature-group"> 65 <?php foreach ( $features as $feature => $feature_name ) : ?> 66 <li> 67 <input type="checkbox" id="filter-id-<?php echo esc_attr( $feature ); ?>" value="<?php echo esc_attr( $feature ); ?>" /> 68 <label for="filter-id-<?php echo esc_attr( $feature ); ?>"><?php echo esc_html( $feature_name ); ?></label> 69 </li> 70 <?php endforeach; ?> 71 </ol> 72 </div> 73 <?php endforeach; ?> 57 74 </div> 58 <?php endforeach; ?>75 </div><!-- .wp-filter --> 59 76 60 <div class="filtered-by"> 61 <span><?php _e( 'Filtering by:' ); ?></span> 62 <div class="tags"></div> 63 <a href="#"><?php _e( 'Edit' ); ?></a> 64 </div> 65 </div> 66 </div><!-- .wp-filter --> 67 68 <div class="theme-browser content-filterable"> 69 <div class="themes"> 70 <?php 77 <div class="theme-browser content-filterable"> 78 <div class="themes"> 79 <?php 71 80 if ( ! is_wp_error( $themes ) ) : 72 81 foreach ( $themes->themes as $theme ) : … … 74 83 endforeach; 75 84 endif; 76 ?> 85 ?> 86 </div> 77 87 </div> 88 <div class="theme-install-overlay"></div> 89 <div class="theme-overlay"></div> 90 91 <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p> 92 <span class="spinner"></span> 78 93 </div> 79 <div class="theme-install-overlay"></div>80 <div class="theme-overlay"></div>81 82 <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>83 <span class="spinner"></span>84 </div>85 94 86 95 <?php
Note: See TracChangeset
for help on using the changeset viewer.