Changeset 1156 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php
- Timestamp:
- 01/16/2015 10:48:01 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
r1151 r1156 12 12 */ 13 13 14 include ABSPATH . 'wp-admin/includes/theme.php';15 14 16 $args = array(17 'per_page' => 15,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 }26 elseif ( get_query_var( 'author_name' ) ) {27 $args['author'] = get_query_var( 'author_name' );28 }29 else {30 $args['browse'] = 'featured';31 32 if ( in_array( get_query_var( 'name' ), array( 'featured', 'popular', 'new' ) ) ) {33 $args['browse'] = get_query_var( 'name' );34 }35 }36 $themes = themes_api( 'query_themes', $args );37 15 38 16 get_header(); 17 18 global $themes; 39 19 ?> 40 20 … … 87 67 <?php 88 68 if ( ! is_wp_error( $themes ) ) : 89 foreach ( $themes->themes as $theme ) : 90 get_template_part( 'content', 'index' ); 91 endforeach; 69 if ( is_single() ) : 70 $theme = array_shift( $themes->themes ); 71 get_template_part( 'content', 'single' ); 72 else : 73 foreach ( $themes->themes as $theme ) : 74 get_template_part( 'content', 'index' ); 75 endforeach; 76 endif; 92 77 endif; 93 78 ?>
Note: See TracChangeset
for help on using the changeset viewer.