1 | <div> |
---|
2 | <div class="theme-navigation"> |
---|
3 | <a class="close" href="<?php echo home_url('/'); ?>"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></a> |
---|
4 | <div class="navigation post-navigation"> |
---|
5 | <button class="left dashicons dashicons-arrow-left-alt2 disabled"><span class="screen-reader-text"><?php _e( 'Show previous theme', 'wporg-themes' ); ?></span></button> |
---|
6 | <button class="right dashicons dashicons-arrow-right-alt2 disabled"><span class="screen-reader-text"><?php _e( 'Show next theme', 'wporg-themes' ); ?></span></button> |
---|
7 | </div> |
---|
8 | </div> |
---|
9 | <div class="theme-wrap"> |
---|
10 | <div class="theme-about hentry"> |
---|
11 | <?php if ( time() - strtotime( $theme->last_updated ) > 2 * YEAR_IN_SECONDS ) { ?> |
---|
12 | <div class="theme-notice notice notice-warning notice-alt"> |
---|
13 | <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 | </div><!-- .theme-notice --> |
---|
15 | <?php } ?> |
---|
16 | |
---|
17 | <div> |
---|
18 | <h1 class="theme-name entry-title"><?php echo esc_html( $theme->name ); ?></h1> |
---|
19 | <?php if ( $theme->author->display_name ) { ?> |
---|
20 | <span class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="https://wordpress.org/themes/author/' . $theme->author->user_nicename . '/"><span class="author">' . esc_html( $theme->author->display_name ) . '</span></a>' ); ?></span> |
---|
21 | <?php } ?> |
---|
22 | |
---|
23 | <?php if ( is_user_logged_in() && wporg_themes_is_favourited( $theme->slug ) ) { ?> |
---|
24 | <span class="dashicons dashicons-heart favorite favorited"></span> |
---|
25 | <?php } elseif ( is_user_logged_in() ) { ?> |
---|
26 | <span class="dashicons dashicons-heart favorite"></span> |
---|
27 | <?php } ?> |
---|
28 | </div> |
---|
29 | |
---|
30 | <div class="theme-head"> |
---|
31 | <div class="theme-actions clear"> |
---|
32 | <a href="<?php echo esc_url( $theme->preview_url ); ?>" class="button button-secondary alignleft"><?php _e( 'Preview', 'wporg-themes' ); ?></a> |
---|
33 | <a href="<?php echo esc_url( $theme->download_link); ?>" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a> |
---|
34 | </div> |
---|
35 | |
---|
36 | <?php if ( !empty( $theme->parent ) ) { ?> |
---|
37 | <div class="theme-notice notice notice-info notice-alt"> |
---|
38 | <p class="parent"><?php printf( __( 'This is a child theme of %s.', 'wporg-themes' ), sprintf( '<a href="%1$s">%2$s</a>', home_url( $theme->parent['slug'] . '/' ), esc_html( $theme->parent['name'] ) ) ); ?></p> |
---|
39 | </div> |
---|
40 | <?php } ?> |
---|
41 | |
---|
42 | <div class="theme-meta-info"> |
---|
43 | <p class="version"> |
---|
44 | <?php printf( __( 'Version: %s', 'wporg-themes' ), '<strong>' . esc_html( $theme->version ) . '</strong>' ); ?> |
---|
45 | </p> |
---|
46 | <p class="updated"> |
---|
47 | <?php printf( __( 'Last updated: %s', 'wporg-themes' ), |
---|
48 | /* translators: localized date format, see http://php.net/date */ |
---|
49 | '<strong>' . date_i18n( _x( 'F j, Y', 'last update date format', 'wporg-themes' ), strtotime( $theme->last_updated ) ) . '</strong>' |
---|
50 | ); ?> |
---|
51 | </p> |
---|
52 | <?php |
---|
53 | $active_installs = $theme->active_installs; |
---|
54 | if ( $active_installs < 10 ) { |
---|
55 | $active_installs = __( 'Less than 10', 'wporg-themes' ); |
---|
56 | } elseif ( $active_installs >= 1000000 ) { |
---|
57 | $active_installs = __( '1+ million', 'wporg-themes' ); |
---|
58 | } else { |
---|
59 | $active_installs = number_format_i18n( $active_installs ) . '+'; |
---|
60 | } |
---|
61 | ?> |
---|
62 | <p class="active_installs"><?php printf( __( 'Active Installations: %s', 'wporg-themes' ), '<strong>' . $active_installs . '</strong>' ); ?></p> |
---|
63 | <?php if ( ! empty( $theme->requires ) ) { ?> |
---|
64 | <p class="requires"> |
---|
65 | <?php printf( __( 'WordPress Version: %s', 'wporg-themes' ), '<strong>' . sprintf( __( '%s or higher', 'wporg-themes' ), esc_html( $theme->requires ) ) . '</strong>' ); ?> |
---|
66 | </p> |
---|
67 | <?php } ?> |
---|
68 | <?php if ( ! empty( $theme->requires_php ) ) { ?> |
---|
69 | <p class="requires_php"> |
---|
70 | <?php printf( __( 'PHP Version: %s', 'wporg-themes' ), '<strong>' . sprintf( __( '%s or higher', 'wporg-themes' ), esc_html( $theme->requires_php ) ) . '</strong>' ); ?> |
---|
71 | </p> |
---|
72 | <?php } ?> |
---|
73 | <?php if ( $theme->theme_url ) { ?> |
---|
74 | <p class="theme_homapge"><a href="<?php echo esc_url( $theme->theme_url ); ?>"><?php _e( 'Theme Homepage', 'wporg-themes' ); ?></a></p> |
---|
75 | <?php } ?> |
---|
76 | </div> |
---|
77 | </div><!-- .theme-head --> |
---|
78 | |
---|
79 | <div class="theme-info"> |
---|
80 | <?php if ( $theme->screenshot_url ) { ?> |
---|
81 | <?php $escaped_screenshot_url = esc_url( $theme->screenshot_url ); ?> |
---|
82 | <div class="screenshot"> |
---|
83 | <picture> |
---|
84 | <source media="(min-width: 782px)" srcset="<?php echo $escaped_screenshot_url; ?>?w=572&strip=all, <?php echo $escaped_screenshot_url; ?>?w=1144&strip=all 2x"> |
---|
85 | <source media="(min-width: 481px) and (max-width: 782px)" srcset="<?php echo $escaped_screenshot_url; ?>?w=700&strip=all, <?php echo $escaped_screenshot_url; ?>?w=1400&strip=all 2x"> |
---|
86 | <source media="(min-width: 401px) and (max-width: 480px)" srcset="<?php echo $escaped_screenshot_url; ?>?w=420&strip=all, <?php echo $escaped_screenshot_url; ?>?w=840&strip=all 2x"> |
---|
87 | <source media="(max-width: 400px)" srcset="<?php echo $escaped_screenshot_url; ?>?w=344&strip=all, <?php echo $escaped_screenshot_url; ?>?w=688&strip=all 2x"> |
---|
88 | <img src="<?php echo $escaped_screenshot_url; ?>?w=572&strip=all" srcset="<?php echo $escaped_screenshot_url; ?>?w=1144&strip=all 2x" loading="lazy" alt=""> |
---|
89 | </picture> |
---|
90 | </div> |
---|
91 | <?php } else { ?> |
---|
92 | <div class="screenshot blank"></div> |
---|
93 | <?php } ?> |
---|
94 | |
---|
95 | <div class="theme-description entry-summary"><p><?php echo esc_html( $theme->description ); ?></p></div> |
---|
96 | |
---|
97 | <?php if ( $theme->tags ) { ?> |
---|
98 | <div class="theme-tags"> |
---|
99 | <h2><?php _e( 'Tags:', 'wporg-themes' ); ?></h2> |
---|
100 | <?php |
---|
101 | $tag_links = array(); |
---|
102 | foreach ( $theme->tags as $slug => $tagname ) { |
---|
103 | $tag_links[] = sprintf( |
---|
104 | "<a href='%s'>%s</a>", |
---|
105 | esc_url( home_url( "/tags/$slug/" ) ), |
---|
106 | esc_html( translate( $tagname, 'wporg-themes' ) ) |
---|
107 | ); |
---|
108 | } |
---|
109 | echo implode( ', ', $tag_links ); |
---|
110 | ?> |
---|
111 | </div><!-- .theme-tags --> |
---|
112 | <?php } ?> |
---|
113 | |
---|
114 | <div class="theme-downloads"> |
---|
115 | </div><!-- .theme-downloads --> |
---|
116 | </div> |
---|
117 | |
---|
118 | <div class="theme-meta"> |
---|
119 | <div class="theme-ratings"> |
---|
120 | <h2><?php _e( 'Ratings', 'wporg-themes' ); ?></h2> |
---|
121 | |
---|
122 | <a class="reviews-link" href="//wordpress.org/support/theme/<?php echo $theme->slug; ?>/reviews/"><?php esc_html_e( 'See all', 'wporg-themes' ); ?></a> |
---|
123 | |
---|
124 | <?php if ( $theme->rating ) { ?> |
---|
125 | <div class="rating rating-<?php echo round( $theme->rating / 10 ) * 10; ?>"> |
---|
126 | <span class="one"></span> |
---|
127 | <span class="two"></span> |
---|
128 | <span class="three"></span> |
---|
129 | <span class="four"></span> |
---|
130 | <span class="five"></span> |
---|
131 | <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span>' . round( $theme->rating / 20 / 0.5 )*0.5 . '</span>' ); ?></p> |
---|
132 | </div> |
---|
133 | <?php } else { ?> |
---|
134 | <div class="rating"> |
---|
135 | <div class="ratings"><?php _e( 'This theme has not been rated yet.', 'wporg-themes' ); ?></div> |
---|
136 | </div> |
---|
137 | <?php } ?> |
---|
138 | |
---|
139 | <?php if ( $theme->ratings ) { ?> |
---|
140 | <ul> |
---|
141 | <?php foreach ( range( 5, 1 ) as $stars ) : |
---|
142 | $rating_bar_width = $theme->num_ratings ? 100 * $theme->ratings[$stars] / $theme->num_ratings : 0; |
---|
143 | ?> |
---|
144 | <li class="counter-container"> |
---|
145 | <a href="//wordpress.org/support/theme/<?php echo $theme->slug; ?>/reviews/?filter=<?php echo $stars; ?>" 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', $stars, 'wporg-themes' ), $stars ) ); ?>"> |
---|
146 | <span class="counter-label"><?php printf( _n( '%d star', '%d stars', $stars, 'wporg-themes' ), $stars ); ?></span> |
---|
147 | <span class="counter-back"> |
---|
148 | <span class="counter-bar" style="width: <?php echo $rating_bar_width; ?>%;"></span> |
---|
149 | </span> |
---|
150 | <span class="counter-count"><?php echo $theme->ratings[$stars]; ?></span> |
---|
151 | </a> |
---|
152 | </li> |
---|
153 | <?php endforeach; ?> |
---|
154 | </ul> |
---|
155 | <?php } ?> |
---|
156 | |
---|
157 | <a class="button button-secondary" href="https://wordpress.org/support/theme/<?php echo $theme->slug; ?>/reviews/#new-post"><?php _e( 'Add my review', 'wporg-themes' ); ?></a> |
---|
158 | </div><!-- .theme-rating --> |
---|
159 | |
---|
160 | <div class="theme-support"> |
---|
161 | <h2><?php _e( 'Support', 'wporg-themes' ); ?></h2> |
---|
162 | <p><?php _e( 'Got something to say? Need help?', 'wporg-themes' ); ?></p> |
---|
163 | <a href="//wordpress.org/support/theme/<?php echo $theme->slug; ?>" class="button button-secondary"><?php _e( 'View support forum', 'wporg-themes' ); ?></a> |
---|
164 | </div><!-- .theme-support --> |
---|
165 | |
---|
166 | <div class="theme-report"> |
---|
167 | <h2><?php _e( 'Report', 'wporg-themes' ); ?></h2> |
---|
168 | <p><?php _e( 'Does this theme have major issues?', 'wporg-themes' ); ?></p> |
---|
169 | <?php |
---|
170 | $report_url = add_query_arg( |
---|
171 | urlencode_deep( array_filter( array( |
---|
172 | 'rep-theme' => "https://wordpress.org/themes/{$theme->slug}/", |
---|
173 | 'rep-subject' => "Reported Theme: {$theme->name}", // Not translated, email subject. |
---|
174 | 'rep-name' => wp_get_current_user()->user_login, |
---|
175 | ) ) ), |
---|
176 | 'https://make.wordpress.org/themes/report-theme/' |
---|
177 | ); |
---|
178 | ?> |
---|
179 | <a rel="nofollow" href="<?php echo esc_url( $report_url ); ?>" class="button button-secondary"><?php _e( 'Report this theme', 'wporg-themes' ); ?></a> |
---|
180 | </div><!-- .theme-report --> |
---|
181 | |
---|
182 | <div class="theme-translations"> |
---|
183 | <h2><?php _e( 'Translations', 'wporg-themes' ); ?></h2> |
---|
184 | <p> |
---|
185 | <a href="<?php echo esc_url( "https://translate.wordpress.org/projects/wp-themes/{$theme->slug}" ); ?>"> |
---|
186 | <?php printf( __( 'Translate %s', 'wporg-themes' ), $theme->name ); ?> |
---|
187 | </a> |
---|
188 | </p> |
---|
189 | </div><!-- .theme-translations --> |
---|
190 | |
---|
191 | <div class="theme-devs"> |
---|
192 | <h2><?php _e( 'Subscribe', 'wporg-themes' ); ?></h2> |
---|
193 | <ul class="unmarked-list"> |
---|
194 | <li> |
---|
195 | <a href="//themes.trac.wordpress.org/log/<?php echo $theme->slug; ?>?limit=100&mode=stop_on_copy&format=rss"> |
---|
196 | <span class="dashicons dashicons-rss"></span><?php _e( 'Development Log', 'wporg-themes' ); ?> |
---|
197 | </a> |
---|
198 | </li> |
---|
199 | </ul> |
---|
200 | |
---|
201 | <h2><?php _e( 'Browse the Code', 'wporg-themes' ); ?></h2> |
---|
202 | <ul class="unmarked-list"> |
---|
203 | <li><a href="//themes.trac.wordpress.org/log/<?php echo $theme->slug; ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li> |
---|
204 | <li><a href="//themes.svn.wordpress.org/<?php echo $theme->slug; ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li> |
---|
205 | <li><a href="//themes.trac.wordpress.org/browser/<?php echo $theme->slug; ?>/" rel="nofollow"><?php _e( 'Browse in Trac', 'wporg-themes' ); ?></a></li> |
---|
206 | <li><a href="//themes.trac.wordpress.org/query?keywords=~theme-<?php echo $theme->slug; ?>" rel="nofollow"><?php _e( 'Trac Tickets', 'wporg-themes' ); ?></a></li> |
---|
207 | </ul> |
---|
208 | </div><!-- .theme-devs --> |
---|
209 | </div> |
---|
210 | </div> |
---|
211 | </div> |
---|
212 | </div> |
---|