Ticket #845: 845.diff
| File 845.diff, 3.6 KB (added by , 11 years ago) |
|---|
-
content-single.php
9 9 <?php endif; ?> 10 10 11 11 <div class="theme-screenshots"> 12 <div class="screenshot"><?php the_post_thumbnail(); ?></div>12 <div class="screenshot"><?php echo esc_url( $theme->screenshot_url . '?w=613&strip=all' ); ?></div> 13 13 14 14 <div class="theme-actions"> 15 15 <a href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $theme->slug . '.' . $theme->version . '.zip' ); ?>" class="button button-primary"><?php _e( 'Download' ); ?></a> -
content.php
1 1 <?php global $theme; ?> 2 2 <article id="post-<?php echo $theme->slug; ?>" class="theme hentry"> 3 3 <div class="theme-screenshot"> 4 <img src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="">4 <img src="<?php echo esc_url( $theme->screenshot_url . '?w=286&strip=all' ); ?>" alt=""> 5 5 </div> 6 6 <a class="more-details url" href="<?php echo esc_url( home_url( $theme->slug . '/' ) ); ?>" rel="bookmark"><?php _ex( 'More Info', 'theme' ); ?></a> 7 7 <div class="theme-author"><?php printf( __( 'By %s' ), '<span class="author">' . $theme->author . '</span>' ); ?></div> -
functions.php
240 240 } 241 241 242 242 foreach ( $api->themes as &$theme ) { 243 list( $screen_shot ) = explode( '?', $theme->screenshot_url ); 244 $screen_shot = ltrim( $screen_shot, '/' ); 245 $i = mt_rand( 0, 2 ); 246 $theme->screenshot_url = "https://i{$i}.wp.com/{$screen_shot}"; 247 243 248 $theme->name = wp_kses( $theme->name, $themes_allowedtags ); 244 249 $theme->author = wp_kses( $theme->author, $themes_allowedtags ); 245 250 $theme->version = wp_kses( $theme->version, $themes_allowedtags ); … … 263 268 wp_send_json_error(); 264 269 } 265 270 271 list( $screen_shot ) = explode( '?', $theme->screenshot_url ); 272 $screen_shot = ltrim( $screen_shot, '/' ); 273 $i = mt_rand( 0, 2 ); 274 $theme->screenshot_url = "https://i{$i}.wp.com/{$screen_shot}"; 275 266 276 $theme->name = wp_kses( $theme->name, $themes_allowedtags ); 267 277 $theme->author = wp_kses( $theme->author, $themes_allowedtags ); 268 278 $theme->version = wp_kses( $theme->version, $themes_allowedtags ); -
view-templates/theme-single.php
15 15 16 16 <div class="theme-screenshots"> 17 17 <# if ( data.screenshot_url ) { #> 18 <div class="screenshot"><img src="{{ data.screenshot_url }} " alt=""/></div>18 <div class="screenshot"><img src="{{ data.screenshot_url }}?w=613&strip=all" alt=""/></div> 19 19 <# } else { #> 20 20 <div class="screenshot blank"></div> 21 21 <# } #> -
view-templates/theme.php
1 1 <script id="tmpl-theme" type="text/template"> 2 2 <# if ( data.screenshot_url ) { #> 3 3 <div class="theme-screenshot"> 4 <img src="{{ data.screenshot_url }} " alt="" />4 <img src="{{ data.screenshot_url }}?w=286&strip=all" alt="" /> 5 5 </div> 6 6 <# } else { #> 7 7 <div class="theme-screenshot blank"></div>