Changeset 1274 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php
- Timestamp:
- 02/17/2015 11:18:19 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
r1255 r1274 1 1 <?php 2 global $theme;3 $theme = wporg_themes_photon_screen_shot( $theme);2 $slug = get_post()->post_name; 3 $theme = themes_api('theme_information', array( 'slug' => $slug ) ); 4 4 ?> 5 5 <div class="theme-wrap"> 6 6 <div class="theme-about hentry"> 7 7 8 <?php if ( strtotime( '-2 years' ) > strtotime( $theme->last_updated) ) : ?>8 <?php if ( strtotime( '-2 years' ) > get_post_modified_time() ) : ?> 9 9 <div class="theme-notice notice notice-warning"> 10 10 <p><?php _e( 'This theme <strong>hasn’t been updated in over 2 years</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-themes' ); ?></p> … … 14 14 <div class="theme-head"> 15 15 <h3 class="theme-name entry-title"><?php the_title(); ?></h3> 16 <h4 class="theme-author"><?php printf( __( 'By %s' ), sprintf( '<a href="https://profiles.wordpress.org/%s"><span class="author">%s</span><a/>', $theme->author ) ); ?></h4> 16 <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">%s</span></a>', get_the_author_meta( 'login' ), esc_html( get_the_author() ) ) ); ?> 18 </h4> 17 19 18 20 <div class="theme-actions"> 19 <a href="<?php echo esc_url( '// downloads.wordpress.org/theme/' . $theme->slug . '.' . $theme->version . '.zip' ); ?>" class="button button-primary"><?php _e( 'Download' ); ?></a>20 <a href="<?php echo esc_url( $theme->preview_url ); ?>" class="button button-secondary"><?php _e( 'Preview' ); ?></a>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> 21 23 </div> 22 24 23 <?php if ( ! empty( $theme->parent ) ) : ?>25 <?php if ( ! empty( get_post()->parent ) ) : ?> 24 26 <div class="theme-notice notice notice-info"> 25 27 <p class="parent-theme"><?php printf( __( 'This is a child theme of %s.' ), sprintf( '<a href="/%1$s">%2$s</a>', $theme->parent->slug, $theme->parent->name ) ); ?></p> … … 29 31 30 32 <div class="theme-info"> 31 <div class="screenshot"><?php echo esc_url( $theme->screenshot_url . '?w=732&strip=all' ); ?></div>33 <div class="screenshot"><?php the_post_thumbnail( '798' ); ?></div> 32 34 33 35 <div class="theme-description entry-summary"><?php the_content(); ?></div> 34 36 35 37 <div class="theme-tags"> 36 <h4><?php _e( 'Tags:' ); ?></h4> 37 <?php 38 foreach( $theme->tags as &$tag ) : 39 $tag = sprintf( '<a href="%1$s">%2$s</a>', esc_url( home_url( "/tag/{$tag}/" ) ), $tag ); 40 endforeach; 41 echo implode( ', ', $theme->tags ); 42 ?> 38 <?php the_tags( '<h4>' . __( 'Tags:' ) . '</h4>' ); ?> 43 39 </div><!-- .theme-tags --> 44 40 … … 46 42 <h4><?php _e( 'Downloads', 'wporg-themes' ); ?></h4> 47 43 48 <div id="theme-download-stats-<?php echo esc_attr( $ theme->slug ); ?>" class="chart"></div>44 <div id="theme-download-stats-<?php echo esc_attr( $slug ); ?>" class="chart"></div> 49 45 <script type="text/javascript"> 50 46 google.load("visualization", "1", {packages:["corechart"]}); … … 53 49 function drawThemeDownloadsChart() { 54 50 jQuery(document).ready(function($){ 55 jQuery.getJSON('https://api.wordpress.org/stats/themes/1.0/downloads.php?slug=<?php echo $theme->slug; ?>&limit=730&callback=?', function (downloads) {51 $.getJSON('https://api.wordpress.org/stats/themes/1.0/downloads.php?slug=<?php echo $slug; ?>&limit=730&callback=?', function (downloads) { 56 52 var data = new google.visualization.DataTable(), 57 53 count = 0; … … 67 63 }); 68 64 69 new google.visualization.ColumnChart(document.getElementById('theme-download-stats-<?php echo esc_attr( $ theme->slug ); ?>')).draw(data, {65 new google.visualization.ColumnChart(document.getElementById('theme-download-stats-<?php echo esc_attr( $slug ); ?>')).draw(data, { 70 66 colors: ['#253578'], 71 67 legend: { … … 118 114 <?php if ( ! empty( $theme->ratings ) && ! empty( $theme->num_ratings ) ) : ?> 119 115 <ul> 120 <?php foreach ( $theme->ratings as $key => $rate_count ) : ?> 116 <?php 117 foreach ( $theme->ratings as $key => $rate_count ) : 118 // Hack to have descending key/value pairs. 119 $key = 6 - $key; 120 $rate_count = $theme->ratings[ $key ]; 121 ?> 121 122 <li class="counter-container"> 122 <a href="//wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $ theme->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 ); ?>">123 <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 ); ?>"> 123 124 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), $key ); ?></span> 124 125 <span class="counter-back"> … … 133 134 </div><!-- .theme-rating --> 134 135 136 <div class="theme-support"> 137 <h4><?php _e( 'Support', 'wporg-themes' ); ?></h4> 138 <p><?php _e( 'Got something to say? Neeed help?', 'wporg-themes' ); ?></p> 139 <a href="//wordpress.org/support/theme/<?php echo esc_attr( $slug ); ?>" class="button button-secondary"><?php _e( 'View support forum', 'wporg-themes' ); ?></a> 140 </div><!-- .theme-support --> 141 135 142 <div class="theme-devs"> 136 143 <h4><?php _e( 'Development', 'wporg-themes' ); ?></h4> … … 138 145 <ul class="unmarked-list"> 139 146 <li> 140 <a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $ theme->slug ); ?>?limit=100&mode=stop_on_copy&format=rss">147 <a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $slug ); ?>?limit=100&mode=stop_on_copy&format=rss"> 141 148 <img src="//s.w.org/style/images/feedicon.png" /> 142 149 <?php _e( 'Development Log', 'wporg' ); ?> … … 147 154 <h5><?php _e( 'Browse the Code', 'wporg-themes' ); ?></h5> 148 155 <ul class="unmarked-list"> 149 <li><a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $ theme->slug ); ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li>150 <li><a href="//themes.svn.wordpress.org/<?php echo esc_attr( $ theme->slug ); ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li>151 <li><a href="//themes.trac.wordpress.org/browser/<?php echo esc_attr( $ theme->slug ); ?>/" rel="nofollow"><?php _e( 'Browse in Trac', 'wporg-themes' ); ?></a></li>156 <li><a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li> 157 <li><a href="//themes.svn.wordpress.org/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li> 158 <li><a href="//themes.trac.wordpress.org/browser/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Browse in Trac', 'wporg-themes' ); ?></a></li> 152 159 </ul> 153 160 </div><!-- .theme-devs --> 154 161 </div><!-- .theme-meta --> 155 162 </div> 163 <div class="theme-footer"> 164 <a class="index-link" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></a> 165 <?php the_post_navigation( array( 166 'prev_text' => '<span class="screen-reader-text">' . __( 'Next', 'wporg-themes' ) . '</span>', 167 'next_text' => '<span class="screen-reader-text">' . __( 'Previous', 'wporg-themes' ) . '</span>', 168 ) ); ?> 169 </div> 156 170 </div>
Note: See TracChangeset
for help on using the changeset viewer.