Ticket #20403: 20403.diff
| File 20403.diff, 2.9 KB (added by , 14 years ago) |
|---|
-
wp-admin/js/theme.dev.js
34 34 event.preventDefault(); 35 35 }); 36 36 37 $('#availablethemes').on( 'click', '. installable-theme', function( event ) {37 $('#availablethemes').on( 'click', '.customize-installable-theme', function( event ) { 38 38 var src; 39 39 40 40 info.html( $(this).find('.install-theme-info').html() ); -
wp-admin/includes/class-wp-theme-install-list-table.php
193 193 ) ); 194 194 195 195 ?> 196 <a class="screenshot " href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">196 <a class="screenshot customize-installable-theme" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>"> 197 197 <img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' /> 198 198 </a> 199 199 200 200 <h3><?php echo $name; ?></h3> 201 201 <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 202 <?php 203 $action_links = array(); 202 204 205 if ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) ) { 206 $install_url = add_query_arg( array( 207 'action' => 'install-theme', 208 'theme' => $theme->slug, 209 ), self_admin_url( 'update.php' ) ); 210 $action_links[] = '<a class="install-now" href="' . wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>'; 211 } 212 213 $action_links[] = '<a class="preview-now customize-installable-theme" href="#" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>'; 214 215 $action_links = apply_filters( 'theme_install_action_links', $action_links, $plugin ); 216 ?> 217 <div class="action-links"> 218 <ul> 219 <?php foreach ( $action_links as $action ): ?> 220 <li><?php echo $action; ?></li> 221 <?php endforeach; ?> 222 <li class="hide-if-no-js"><a href="#" class="theme-detail" tabindex='4'><?php _e('Details') ?></a></li> 223 </ul> 224 <?php echo $delete_action; ?> 225 226 <?php theme_update_available( $theme ); ?> 227 </div> 228 203 229 <?php 230 $this->theme_details( $theme ); 204 231 $this->install_theme_info( $theme ); 205 232 } 206 233 … … 292 319 <?php 293 320 } 294 321 322 /* 323 * Prints the details for a theme 324 * 325 * @param object $theme - A WordPress.org Theme API object. 326 */ 327 function theme_details( $theme ) { 328 ?> 329 <div class="themedetaildiv hide-if-js"> 330 <p><strong><?php _e('Version: '); ?></strong><?php echo esc_html( $theme->version ); ?></p> 331 <p><?php echo esc_html( $theme->description ); ?></p> 332 </div> 333 <?php 334 } 335 295 336 /** 296 337 * Send required variables to JavaScript land 297 338 *