Changeset 20730
- Timestamp:
- 05/06/2012 11:06:47 PM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.dev.css
r20716 r20730 5374 5374 } 5375 5375 5376 . install-theme-info.theme-version {5376 .theme-details .theme-version { 5377 5377 margin: 15px 0; 5378 float: right;5379 } 5380 5381 . install-theme-info.theme-rating {5378 float: left; 5379 } 5380 5381 .theme-details .theme-rating { 5382 5382 margin: 14px 0; 5383 5383 width: 100px; 5384 5384 height: 17px; 5385 float: left;5385 float: right; 5386 5386 background: url('../images/stars.png?ver=20120307') repeat-x bottom left; 5387 5387 } 5388 5388 5389 . install-theme-info.theme-rating div {5389 .theme-details .theme-rating div { 5390 5390 background: url('../images/stars.png?ver=20120307') repeat-x top left; 5391 5391 height: 17px; … … 5393 5393 } 5394 5394 5395 .install-theme-info .theme-description { 5396 margin-top: 34px; 5397 padding-top: 1em; 5395 .theme-details .theme-description { 5396 float: left; 5398 5397 color: #777; 5399 5398 line-height: 20px; -
trunk/wp-admin/includes/class-wp-theme-install-list-table.php
r20639 r20730 193 193 ) ); 194 194 195 $actions = array(); 196 197 $install_url = add_query_arg( array( 198 'action' => 'install-theme', 199 'theme' => $theme->slug, 200 ), self_admin_url( 'update.php' ) ); 201 $actions[] = '<a class="install-now" href="' . wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>'; 202 203 $actions[] = '<a class="install-theme-preview" href="#" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>'; 204 205 $actions = apply_filters( 'theme_install_actions', $actions, $theme ); 206 195 207 ?> 196 <a class="screenshot " href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">208 <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>"> 197 209 <img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' /> 198 210 </a> … … 200 212 <h3><?php echo $name; ?></h3> 201 213 <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 214 215 <div class="action-links"> 216 <ul> 217 <?php foreach ( $actions as $action ): ?> 218 <li><?php echo $action; ?></li> 219 <?php endforeach; ?> 220 <li class="hide-if-no-js"><a href="#" class="theme-detail" tabindex='4'><?php _e('Details') ?></a></li> 221 </ul> 222 </div> 202 223 203 224 <?php … … 278 299 <img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" /> 279 300 <?php endif; ?> 280 <div class="theme-rating" title="<?php echo esc_attr( $num_ratings ); ?>"> 281 <div style="width:<?php echo esc_attr( intval( $theme->rating ) . 'px' ); ?>;"></div> 282 </div> 283 <div class="theme-version"> 284 <strong><?php _e('Version:') ?> </strong> 285 <?php echo wp_kses( $theme->version, $themes_allowedtags ); ?> 286 </div> 287 <div class="theme-description"> 288 <?php echo wp_kses( $theme->description, $themes_allowedtags ); ?> 301 <div class="theme-details"> 302 <div class="theme-rating" title="<?php echo esc_attr( $num_ratings ); ?>"> 303 <div style="width:<?php echo esc_attr( intval( $theme->rating ) . 'px' ); ?>;"></div> 304 </div> 305 <div class="theme-version"> 306 <strong><?php _e('Version:') ?> </strong> 307 <?php echo wp_kses( $theme->version, $themes_allowedtags ); ?> 308 </div> 309 <div class="theme-description"> 310 <?php echo wp_kses( $theme->description, $themes_allowedtags ); ?> 311 </div> 289 312 </div> 290 313 <input class="theme-preview-url" type="hidden" value="<?php echo esc_url( $theme->preview_url ); ?>" /> -
trunk/wp-admin/js/theme.dev.js
r20455 r20730 6 6 jQuery( function($) { 7 7 $('#availablethemes').on( 'click', '.theme-detail', function (event) { 8 $(this).parents('.action-links').siblings('.themedetaildiv').toggle(); 8 var theme = $(this).closest('.available-theme'), 9 details = theme.find('.themedetaildiv'); 10 11 if ( ! details.length ) { 12 details = theme.find('.install-theme-info .theme-details'); 13 details = details.clone().addClass('themedetaildiv').appendTo( theme ).hide(); 14 } 15 16 details.toggle(); 9 17 event.preventDefault(); 10 18 }); … … 35 43 }); 36 44 37 $('#availablethemes').on( 'click', '.install able-theme', function( event ) {45 $('#availablethemes').on( 'click', '.install-theme-preview', function( event ) { 38 46 var src; 39 47 40 info.html( $(this). find('.install-theme-info').html() );48 info.html( $(this).closest('.installable-theme').find('.install-theme-info').html() ); 41 49 src = info.find( '.theme-preview-url' ).val(); 42 50 panel.html( '<iframe src="' + src + '" />');
Note: See TracChangeset
for help on using the changeset viewer.