Changeset 20455
- Timestamp:
- 04/12/2012 09:10:40 PM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.dev.css
r20446 r20455 4313 4313 .available-theme .action-links { 4314 4314 margin-top: 10px; 4315 overflow: hidden; 4316 } 4317 4318 .available-theme .action-links li { 4319 float: left; 4320 padding-right: 10px; 4321 margin-right: 10px; 4322 border-right: 1px solid #dfdfdf; 4323 } 4324 4325 .available-theme .action-links li:last-child { 4326 padding-right: 0; 4327 margin-right: 0; 4328 border-right: 0; 4329 } 4330 4331 .available-theme .action-links .delete-theme { 4332 float: right; 4333 margin-right: 0; 4334 } 4335 4336 .available-theme .action-links .delete-theme a { 4337 color: red; 4338 padding: 2px; 4339 } 4340 4341 .available-theme .action-links .delete-theme a:hover { 4342 background: red; 4343 color: #fff; 4344 text-decoration: none; 4345 } 4346 4347 .available-theme .action-links p { 4348 float: left; 4315 4349 } 4316 4350 -
trunk/wp-admin/includes/class-wp-themes-list-table.php
r20414 r20455 142 142 . '<a href="#" class="load-customize hide-if-no-js" ' . $customize_attributes . '>' . __( 'Customize' ) . '</a>'; 143 143 if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) 144 $actions[ ] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&template=$stylesheet", 'delete-theme_' . $stylesheet )144 $actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&template=$stylesheet", 'delete-theme_' . $stylesheet ) 145 145 . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete." ), $title ) ) 146 146 . "' );" . '">' . __( 'Delete' ) . '</a>'; 147 147 148 $actions = apply_filters( 'theme_action_links', $actions, $theme ); 149 150 $actions = implode ( ' | ', $actions ); 148 $actions = apply_filters( 'theme_action_links', $actions, $theme ); 149 $delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : ''; 150 unset( $actions['delete'] ); 151 151 152 ?> 152 153 <a href="<?php echo $preview_link; ?>" class="load-customize screenshot" <?php echo $customize_attributes; ?>> … … 158 159 <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 159 160 <div class="action-links"> 160 <?php echo $actions; ?> 161 <span class="separator hide-if-no-js">| </span><a href="#" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a> 161 <ul> 162 <?php foreach ( $actions as $action ): ?> 163 <li><?php echo $action; ?></li> 164 <?php endforeach; ?> 165 <li class="hide-if-no-js"><a href="#" class="theme-detail" tabindex='4'><?php _e('Details') ?></a></li> 166 </ul> 167 <?php echo $delete_action; ?> 168 169 <?php theme_update_available( $theme ); ?> 162 170 </div> 163 171 … … 176 184 </div> 177 185 178 <?php theme_update_available( $theme ); ?>179 180 186 </div> 181 187 <?php -
trunk/wp-admin/js/theme.dev.js
r20415 r20455 6 6 jQuery( function($) { 7 7 $('#availablethemes').on( 'click', '.theme-detail', function (event) { 8 $(this).parent ().siblings('.themedetaildiv').toggle();8 $(this).parents('.action-links').siblings('.themedetaildiv').toggle(); 9 9 event.preventDefault(); 10 10 });
Note: See TracChangeset
for help on using the changeset viewer.