Changeset 1409 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php
- Timestamp:
- 03/17/2015 11:37:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php
r1383 r1409 3 3 $theme = themes_api('theme_information', array( 'slug' => $slug ) ); 4 4 ?> 5 <div class="theme-navigation"> 6 <a class="close" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></a> 7 <?php the_post_navigation( array( 8 'prev_text' => '<span class="screen-reader-text">' . __( 'Next', 'wporg-themes' ) . '</span>', 9 'next_text' => '<span class="screen-reader-text">' . __( 'Previous', 'wporg-themes' ) . '</span>', 10 ) ); ?> 11 </div> 5 12 <div class="theme-wrap"> 6 13 <div class="theme-about hentry" itemscope itemtype="http://schema.org/CreativeWork"> … … 12 19 <?php endif; ?> 13 20 14 <div class="theme-head">21 <div> 15 22 <h3 class="theme-name entry-title" itemprop="name"><?php the_title(); ?></h3> 16 23 <h4 class="theme-author"> 17 <?php printf( _x( ' By %s', 'post author', 'wporg-themes' ), sprintf( '<a href="https://profiles.wordpress.org/%s"><span class="author" itemprop="author">%s</span></a>', get_the_author_meta( 'nicename' ), esc_html( get_the_author() ) ) ); ?>24 <?php printf( _x( 'by %s', 'post author', 'wporg-themes' ), sprintf( '<a href="https://wordpress.org/themes/author/%s/"><span class="author" itemprop="author">%s</span></a>', get_the_author_meta( 'nicename' ), esc_html( get_the_author() ) ) ); ?> 18 25 </h4> 26 </div> 19 27 20 <div class="theme-actions"> 21 <a href="<?php echo esc_url( '//wp-themes.com/' . $slug ); ?>" class="button button-secondary"><?php _e( 'Preview' ); ?></a> 22 <a href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $slug . '.' . $theme->version . '.zip' ); ?>" class="button button-primary"><?php _e( 'Download' ); ?></a> 28 <div class="theme-head"> 29 <div class="theme-actions clear"> 30 <a href="<?php echo esc_url( '//wp-themes.com/' . $slug ); ?>" class="button button-secondary alignleft"><?php _e( 'Preview' ); ?></a> 31 <a href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $slug . '.' . $theme->version . '.zip' ); ?>" class="button button-primary alignright"><?php _e( 'Download' ); ?></a> 23 32 </div> 24 33 … … 44 53 45 54 <div class="theme-info"> 46 <div class="screenshot"><?php the_post_thumbnail( ' 798' ); ?></div>55 <div class="screenshot"><?php the_post_thumbnail( '571' ); ?></div> 47 56 48 57 <div class="theme-description entry-summary" itemprop="description"><?php the_content(); ?></div> … … 106 115 } 107 116 </script> 108 <p class="total-downloads"><?php printf( __( 'Total downloads: %s' ), '<strong>' . $theme->downloaded. '</strong>' ); ?></p>117 <p class="total-downloads"><?php printf( __( 'Total downloads: %s' ), '<strong>' . number_format_i18n( $theme->downloaded ) . '</strong>' ); ?></p> 109 118 </div><!-- .theme-downloads --> 110 119 </div><!-- .theme-info --> … … 112 121 <div class="theme-meta"> 113 122 <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> 114 <meta itemprop="ratingValue" content="<?php echo esc_attr( number_format_i18n( $theme->rating / 20, 1 ) ); ?>"/>115 123 <meta itemprop="ratingCount" content="<?php echo esc_attr( $theme->num_ratings ); ?>"/> 116 124 <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4> 117 125 118 <div class="rating"> 119 <div class="star-holder"> 120 <div class="star-rating" style="width: <?php echo esc_attr( number_format_i18n( $theme->rating, 1 ) ); ?>%"> 121 <?php printf( __( '%d stars', 'wporg-themes' ), number_format_i18n( $theme->rating / 20 ) ); ?> 122 </div> 126 <?php if ( ! empty( $theme->ratings ) ) : ?> 127 <div class="rating rating-<?php echo esc_attr( number_format( $theme->rating ) ); ?>"> 128 <span class="one"></span> 129 <span class="two"></span> 130 <span class="three"></span> 131 <span class="four"></span> 132 <span class="five"></span> 133 <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">' . number_format_i18n( $theme->rating / 20, 1 ) . '</span>' ); ?></p> 123 134 </div> 124 <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), number_format_i18n( $theme->rating / 20, 1 ) ); ?></p> 125 </div> 135 <?php else : ?> 136 <div class="rating"> 137 <div class="ratings"><?php _e( 'This theme has not been rated yet.', 'wporg-themes' ); ?></div> 138 </div> 139 <?php endif; ?> 126 140 127 141 <?php if ( ! empty( $theme->ratings ) && ! empty( $theme->num_ratings ) ) : ?> … … 130 144 foreach ( $theme->ratings as $key => $rate_count ) : 131 145 // Hack to have descending key/value pairs. 132 $key = 6 - $key; 133 $rate_count = $theme->ratings[ $key ]; 146 $key = 6 - $key; 134 147 ?> 135 148 <li class="counter-container"> 136 <a href="//wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $slug ); ?>?filter=<?php echo $key; ?>" title="<?php printf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key, 'wporg-themes' ), $key); ?>">137 <span class="counter-label"><?php printf( _ _( '%d stars', 'wporg-themes' ), $key ); ?></span>149 <a href="//wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $slug ); ?>?filter=<?php echo $key; ?>" title="<?php echo esc_attr( sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key, 'wporg-themes' ), $key ) ); ?>"> 150 <span class="counter-label"><?php printf( _n( '%d star', '%d stars', $key, 'wporg-themes' ), $key ); ?></span> 138 151 <span class="counter-back"> 139 <span class="counter-bar" style="width: <?php echo 100 * ( $ rate_count / $theme->num_ratings ); ?>px;"></span>152 <span class="counter-bar" style="width: <?php echo 100 * ( $theme->ratings[ $key ] / $theme->num_ratings ); ?>%;"></span> 140 153 </span> 141 <span class="counter-count"><?php echo $ rate_count; ?></span>154 <span class="counter-count"><?php echo $theme->ratings[ $key ]; ?></span> 142 155 </a> 143 156 </li> … … 145 158 </ul> 146 159 <?php endif; ?> 160 161 <a class="button button-secondary" href="https://wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $slug ); ?>#postform"><?php _e( 'Add your review', 'wporg-themes' ); ?></a> 147 162 </div><!-- .theme-rating --> 148 163 … … 174 189 </div><!-- .theme-meta --> 175 190 </div> 176 <div class="theme-footer">177 <a class="index-link" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></a>178 <?php the_post_navigation( array(179 'prev_text' => '<span class="screen-reader-text">' . __( 'Next', 'wporg-themes' ) . '</span>',180 'next_text' => '<span class="screen-reader-text">' . __( 'Previous', 'wporg-themes' ) . '</span>',181 ) ); ?>182 </div>183 191 </div>
Note: See TracChangeset
for help on using the changeset viewer.