Changeset 1479 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/page-commercial.php
- Timestamp:
- 04/15/2015 09:58:29 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/page-commercial.php
r1477 r1479 6 6 */ 7 7 8 $theme_shops = new WP_Query( array( 9 'post_type' => 'theme_shop', 10 'posts_per_page' => -1, 11 'orderby' => 'rand', 12 ) ); 8 $theme_shops = wporg_themes_query_api( 'get_commercial_shops' )->shops; 13 9 14 10 get_header(); … … 38 34 <div class="theme-browser content-filterable"> 39 35 <div class="themes"> 40 <?php 41 while ( $theme_shops->have_posts() ) : 42 $theme_shops->the_post(); 43 44 if ( ! $image_url = post_custom( 'image_url' ) ) : 45 $image_url = sprintf( '//s0.wp.com/mshots/v1/%s?w=572', urlencode( post_custom( 'url' ) ) ); 46 endif; 47 ?> 48 <article id="post-<?php the_ID(); ?>" <?php post_class( array( 'theme', 'hentry' ) ); ?>> 36 <?php foreach ( $theme_shops as $shop ) : ?> 37 <article id="post-<?php echo esc_attr( $shop->slug ); ?>" class="theme hentry"> 49 38 <div class="theme-screenshot"> 50 <img src="<?php echo esc_url( $ image_url); ?>" alt="">39 <img src="<?php echo esc_url( $shop->image ); ?>" alt=""> 51 40 </div> 52 <a class="more-details url" href="<?php echo esc_url( post_custom( 'url' ) ); ?>" rel="bookmark"><?php the_content(); ?></a>53 <h3 class="theme-name entry-title"><?php the_title(); ?></h3>41 <a class="more-details url" href="<?php echo esc_url( $shop->url ); ?>" rel="bookmark"><?php echo apply_filters( 'the_content', $shop->haiku ); ?></a> 42 <h3 class="theme-name entry-title"><?php echo apply_filters( 'the_title', $shop->shop ); ?></h3> 54 43 </article> 55 <?php 56 endwhile; 57 wp_reset_postdata(); 58 ?> 44 <?php endforeach; ?> 59 45 </div> 60 46 </div>
Note: See TracChangeset
for help on using the changeset viewer.