Changeset 1238
- Timestamp:
- 02/10/2015 12:18:47 AM (11 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
- Files:
-
- 5 edited
-
content-single.php (modified) (2 diffs)
-
content.php (modified) (1 diff)
-
functions.php (modified) (3 diffs)
-
view-templates/theme-single.php (modified) (1 diff)
-
view-templates/theme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php
r1188 r1238 1 <?php global $theme; ?> 1 <?php 2 global $theme; 3 $theme = wporg_themes_photon_screen_shot( $theme ); 4 ?> 2 5 <div class="theme-wrap"> 3 6 <div class="theme-about"> … … 10 13 11 14 <div class="theme-screenshots"> 12 <div class="screenshot"><?php the_post_thumbnail(); ?></div>15 <div class="screenshot"><?php echo esc_url( $theme->screenshot_url . '?w=613&strip=all' ); ?></div> 13 16 14 17 <div class="theme-actions"> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content.php
r1147 r1238 1 <?php global $theme; ?> 1 <?php 2 global $theme; 3 $theme = wporg_themes_photon_screen_shot( $theme ); 4 ?> 2 5 <article id="post-<?php echo $theme->slug; ?>" class="theme hentry"> 3 6 <div class="theme-screenshot"> 4 <img src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="">7 <img src="<?php echo esc_url( $theme->screenshot_url . '?w=286&strip=all' ); ?>" alt=""> 5 8 </div> 6 9 <a class="more-details url" href="<?php echo esc_url( home_url( $theme->slug . '/' ) ); ?>" rel="bookmark"><?php _ex( 'More Info', 'theme' ); ?></a> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r1212 r1238 241 241 242 242 foreach ( $api->themes as &$theme ) { 243 $theme->name = wp_kses( $theme->name, $themes_allowedtags ); 244 $theme->author = wp_kses( $theme->author, $themes_allowedtags ); 245 $theme->version = wp_kses( $theme->version, $themes_allowedtags ); 246 $theme->description = wp_kses( $theme->description, $themes_allowedtags ); 247 $theme->num_ratings = number_format_i18n( $theme->num_ratings ); 248 $theme->preview_url = set_url_scheme( $theme->preview_url ); 243 $theme->name = wp_kses( $theme->name, $themes_allowedtags ); 244 $theme->author = wp_kses( $theme->author, $themes_allowedtags ); 245 $theme->version = wp_kses( $theme->version, $themes_allowedtags ); 246 $theme->description = wp_kses( $theme->description, $themes_allowedtags ); 247 $theme->num_ratings = number_format_i18n( $theme->num_ratings ); 248 $theme->preview_url = set_url_scheme( $theme->preview_url ); 249 wporg_themes_photon_screen_shot( $theme ); 249 250 } 250 251 … … 264 265 } 265 266 266 $theme->name = wp_kses( $theme->name, $themes_allowedtags ); 267 $theme->author = wp_kses( $theme->author, $themes_allowedtags ); 268 $theme->version = wp_kses( $theme->version, $themes_allowedtags ); 269 $theme->description = wp_kses( $theme->description, $themes_allowedtags ); 270 $theme->num_ratings = number_format_i18n( $theme->num_ratings ); 271 $theme->preview_url = set_url_scheme( $theme->preview_url ); 267 $theme->name = wp_kses( $theme->name, $themes_allowedtags ); 268 $theme->author = wp_kses( $theme->author, $themes_allowedtags ); 269 $theme->version = wp_kses( $theme->version, $themes_allowedtags ); 270 $theme->description = wp_kses( $theme->description, $themes_allowedtags ); 271 $theme->num_ratings = number_format_i18n( $theme->num_ratings ); 272 $theme->preview_url = set_url_scheme( $theme->preview_url ); 273 wporg_themes_photon_screen_shot( $theme ); 272 274 273 275 wp_send_json_success( $theme ); … … 275 277 add_action( 'wp_ajax_theme-info', 'wporg_themes_theme_info' ); 276 278 add_action( 'wp_ajax_nopriv_theme-info', 'wporg_themes_theme_info' ); 279 280 /** 281 * Photon-ifies the screen shot URL. 282 * 283 * @param object $theme 284 * @return object 285 */ 286 function wporg_themes_photon_screen_shot( $theme ) { 287 if ( preg_match( '/screenshot.(jpg|jpeg|png|gif)/', $theme->screenshot_url, $match ) ) { 288 $theme->screenshot_url = sprintf( 'https://i0.wp.com/themes.svn.wordpress.org/%1$s/%2$s/%3$s', 289 $theme->slug, 290 $theme->version, 291 $match[0] 292 ); 293 } 294 return $theme; 295 } 277 296 278 297 /** -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php
r1088 r1238 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=732&strip=all" alt=""/></div> 19 19 <# } else { #> 20 20 <div class="screenshot blank"></div> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php
r1221 r1238 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=572&strip=all" alt="" /> 5 5 </div> 6 6 <# } else { #>
Note: See TracChangeset
for help on using the changeset viewer.