Changeset 26726 for trunk/src/wp-admin/themes.php
- Timestamp:
- 12/06/2013 04:10:25 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/themes.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/themes.php
r26725 r26726 117 117 <div class="wrap"> 118 118 <h2><?php esc_html_e( 'Themes' ); ?> 119 <span class="theme-count">< /span>119 <span class="theme-count"><?php echo count( $themes ); ?></span> 120 120 <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?> 121 121 <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="add-new-h2"><?php echo esc_html( _x( 'Add New', 'Add new theme' ) ); ?></a> … … 180 180 ?> 181 181 182 <div class="theme-browser"></div> 182 <div class="theme-browser"> 183 <div class="themes"> 184 185 <?php 186 /* 187 * This PHP is synchronized with the tmpl-theme template below! 188 */ 189 190 foreach ( $themes as $theme ) : ?> 191 <div class="theme<?php if ( $theme['active'] ) echo ' active'; ?>"> 192 <?php if ( ! empty( $theme['screenshot'][0] ) ) { ?> 193 <div class="theme-screenshot"> 194 <img src="<?php echo $theme['screenshot'][0]; ?>" alt="" /> 195 </div> 196 <?php } else { ?> 197 <div class="theme-screenshot blank"></div> 198 <?php } ?> 199 <span class="more-details"><?php _e( 'Theme Details' ); ?></span> 200 <div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div> 201 202 <?php if ( $theme['active'] ) { ?> 203 <h3 class="theme-name"><span><?php _ex( 'Active:', 'theme' ); ?></span> <?php echo $theme['name']; ?></h3> 204 <?php } else { ?> 205 <h3 class="theme-name"><?php echo $theme['name']; ?></h3> 206 <?php } ?> 207 208 <div class="theme-actions"> 209 210 <?php if ( $theme['active'] ) { ?> 211 <?php if ( $theme['actions']['customize'] ) { ?> 212 <a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a> 213 <?php } ?> 214 <?php } else { ?> 215 <a class="button button-primary activate" href="<?php echo $theme['actions']['activate']; ?>"><?php _e( 'Activate' ); ?></a> 216 <a class="button button-secondary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a> 217 <a class="button button-secondary hide-if-customize" href="<?php echo $theme['actions']['preview']; ?>"><?php _e( 'Preview' ); ?></a> 218 <?php } ?> 219 220 </div> 221 222 <?php if ( $theme['hasUpdate'] ) { ?> 223 <div class="theme-update"><?php _e( 'Update Available' ); ?></div> 224 <?php } ?> 225 </div> 226 <?php endforeach; ?> 227 <br class="clear" /> 228 </div> 229 </div> 183 230 184 231 <?php … … 213 260 </div><!-- .wrap --> 214 261 262 <?php 263 /* 264 * The tmpl-theme template is synchronized with PHP above! 265 */ 266 ?> 215 267 <script id="tmpl-theme" type="text/template"> 216 268 <# if ( data.screenshot[0] ) { #> … … 234 286 <# if ( data.active ) { #> 235 287 <# if ( data.actions.customize ) { #> 236 <a class="button button-primary hide-if-no-customize" href="{{ data.actions.customize }}"><?php _e( 'Customize' ); ?></a>288 <a class="button button-primary customize load-customize hide-if-no-customize" href="{{ data.actions.customize }}"><?php _e( 'Customize' ); ?></a> 237 289 <# } #> 238 290 <# } else { #> 239 291 <a class="button button-primary activate" href="{{{ data.actions.activate }}}"><?php _e( 'Activate' ); ?></a> 240 <a class="button button-secondary preview" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a> 292 <a class="button button-secondary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a> 293 <a class="button button-secondary hide-if-customize" href="{{{ data.actions.preview }}}"><?php _e( 'Preview' ); ?></a> 241 294 <# } #> 242 295 … … 297 350 <div class="theme-actions"> 298 351 <div class="active-theme"> 299 <a href="{{{ data.actions.customize }}}" class="button button-primary hide-if-no-customize"><?php _e( 'Customize' ); ?></a>352 <a href="{{{ data.actions.customize }}}" class="button button-primary customize load-customize hide-if-no-customize"><?php _e( 'Customize' ); ?></a> 300 353 <?php echo implode( ' ', $current_theme_actions ); ?> 301 354 </div> 302 355 <div class="inactive-theme"> 303 356 <# if ( data.actions.activate ) { #> 304 <a href="{{{ data.actions.activate }}}" class="button button-primary"><?php _e( 'Activate' ); ?></a> 305 <# } #> 306 <a href="{{{ data.actions.customize }}}" class="button button-secondary"><?php _e( 'Live Preview' ); ?></a> 357 <a href="{{{ data.actions.activate }}}" class="button button-primary activate"><?php _e( 'Activate' ); ?></a> 358 <# } #> 359 <a href="{{{ data.actions.customize }}}" class="button button-secondary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a> 360 <a href="{{{ data.actions.preview }}}" class="button button-secondary hide-if-customize"><?php _e( 'Preview' ); ?></a> 307 361 </div> 308 362
Note: See TracChangeset
for help on using the changeset viewer.