Changeset 1087
- Timestamp:
- 01/05/2015 11:14:57 PM (10 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php
r1034 r1087 59 59 60 60 <?php 61 if ( $theme->lvl_ratings) :62 foreach ( $theme-> lvl_ratings as $key => $rate_count ) :61 if ( ! empty( $theme->ratings ) ) : 62 foreach ( $theme->ratings as $key => $rate_count ) : 63 63 ?> 64 64 <div class="counter-container"> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r1084 r1087 74 74 75 75 wp_enqueue_style( 'global-style', '//s.w.org/style/wp4.css', array(), '14' ); 76 wp_enqueue_style( 'ratings', '//wordpress.org/extend/themes-plugins/bb-ratings/bb-ratings.css', array(), '4' ); 76 77 wp_enqueue_style( 'themes-style', self_admin_url( 'css/themes.css' ) ); 77 78 wp_enqueue_style( 'wporg-themes-style', get_stylesheet_uri() ); … … 154 155 if ( 'query_themes' == $action ) { 155 156 $args->per_page = 30; 156 $args->fields['parent'] = true; 157 $args->fields['tags'] = true; 157 $args->fields['parent'] = true; 158 $args->fields['ratings'] = true; 159 $args->fields['tags'] = true; 158 160 } 159 161 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php
r1034 r1087 54 54 <span><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '{{ (data.rating/20).toFixed(1) }}' ); ?></span> 55 55 56 <# if ( data.lvl_ratings ) { #>56 <# console.log(data); if ( data.ratings ) { #> 57 57 <div class="counter-container"> 58 58 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=5" title="<?php printf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 5 ); ?>"> 59 59 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 5 ); ?></span> 60 60 <span class="counter-back"> 61 <span class="counter-bar" style="width: {{ 92 * data. lvl_ratings[5] / data.num_ratings }}px;"></span>61 <span class="counter-bar" style="width: {{ 92 * data.ratings[5] / data.num_ratings }}px;"></span> 62 62 </span> 63 63 </a> 64 <span class="counter-count">{{ data. lvl_ratings[5] }}</span>64 <span class="counter-count">{{ data.ratings[5] }}</span> 65 65 </div> 66 66 <div class="counter-container"> … … 68 68 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 4 ); ?></span> 69 69 <span class="counter-back"> 70 <span class="counter-bar" style="width: {{ 92 * data. lvl_ratings[4] / data.num_ratings }}px;"></span>70 <span class="counter-bar" style="width: {{ 92 * data.ratings[4] / data.num_ratings }}px;"></span> 71 71 </span> 72 72 </a> 73 <span class="counter-count">{{ data. lvl_ratings[4] }}</span>73 <span class="counter-count">{{ data.ratings[4] }}</span> 74 74 </div> 75 75 <div class="counter-container"> … … 77 77 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 3 ); ?></span> 78 78 <span class="counter-back"> 79 <span class="counter-bar" style="width: {{ 92 * data. lvl_ratings[3] / data.num_ratings }}px;"></span>79 <span class="counter-bar" style="width: {{ 92 * data.ratings[3] / data.num_ratings }}px;"></span> 80 80 </span> 81 81 </a> 82 <span class="counter-count">{{ data. lvl_ratings[3] }}</span>82 <span class="counter-count">{{ data.ratings[3] }}</span> 83 83 </div> 84 84 <div class="counter-container"> … … 86 86 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 2 ); ?></span> 87 87 <span class="counter-back"> 88 <span class="counter-bar" style="width: {{ 92 * data. lvl_ratings[2] / data.num_ratings }}px;"></span>88 <span class="counter-bar" style="width: {{ 92 * data.ratings[2] / data.num_ratings }}px;"></span> 89 89 </span> 90 90 </a> 91 <span class="counter-count">{{ data. lvl_ratings[2] }}</span>91 <span class="counter-count">{{ data.ratings[2] }}</span> 92 92 </div> 93 93 <div class="counter-container"> … … 95 95 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 1 ); ?></span> 96 96 <span class="counter-back"> 97 <span class="counter-bar" style="width: {{ 92 * data. lvl_ratings[1] / data.num_ratings }}px;"></span>97 <span class="counter-bar" style="width: {{ 92 * data.ratings[1] / data.num_ratings }}px;"></span> 98 98 </span> 99 99 </a> 100 <span class="counter-count">{{ data. lvl_ratings[1] }}</span>100 <span class="counter-count">{{ data.ratings[1] }}</span> 101 101 </div> 102 102 <# } #>
Note: See TracChangeset
for help on using the changeset viewer.