Changeset 29924
- Timestamp:
- 10/16/2014 07:45:26 PM (11 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/themes.css
r29674 r29924 581 581 } 582 582 583 .broken-themes a.delete-theme, 583 584 .theme-overlay .theme-actions .delete-theme { 584 585 color: #a00; 585 position: absolute;586 right: 10px;587 bottom: 5px;588 586 text-decoration: none; 589 587 border-color: transparent; … … 593 591 } 594 592 593 .theme-overlay .theme-actions .delete-theme { 594 position: absolute; 595 right: 10px; 596 bottom: 5px; 597 } 598 599 .broken-themes a.delete-theme:hover, 600 .broken-themes a.delete-theme:focus, 595 601 .theme-overlay .theme-actions .delete-theme:hover, 596 602 .theme-overlay .theme-actions .delete-theme:focus { … … 1730 1736 padding: 0; 1731 1737 } 1732 } 1738 1739 .broken-themes table { 1740 width: 100%; 1741 } 1742 } -
trunk/src/wp-admin/js/theme.js
r29786 r29924 1660 1660 themes.Run.init(); 1661 1661 } 1662 1663 $( '.broken-themes .delete-theme' ).on( 'click', function() { 1664 return confirm( _wpThemeSettings.settings.confirmDelete ); 1665 }); 1662 1666 }); 1663 1667 -
trunk/src/wp-admin/themes.php
r29596 r29924 247 247 <p><?php _e('The following themes are installed but incomplete. Themes must have a stylesheet and a template.'); ?></p> 248 248 249 <?php 250 $can_delete = current_user_can( 'delete_themes' ); 251 ?> 249 252 <table> 250 253 <tr> 251 254 <th><?php _ex('Name', 'theme name'); ?></th> 252 255 <th><?php _e('Description'); ?></th> 256 <?php if ( $can_delete ) { ?> 257 <th></th> 258 <?php } ?> 259 </tr> 253 260 </tr> 254 <?php 255 foreach ( $broken_themes as $broken_theme ) { 256 echo " 261 <?php foreach ( $broken_themes as $broken_theme ) : ?> 257 262 <tr> 258 <td>" . ( $broken_theme->get( 'Name' ) ? $broken_theme->get( 'Name' ) : $broken_theme->get_stylesheet() ) . "</td> 259 <td>" . $broken_theme->errors()->get_error_message() . "</td> 260 </tr>"; 261 } 262 ?> 263 <td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td> 264 <td><?php echo $broken_theme->errors()->get_error_message(); ?></td> 265 <?php 266 if ( $can_delete ) { 267 $stylesheet = $broken_theme->get_stylesheet(); 268 $delete_url = add_query_arg( array( 269 'action' => 'delete', 270 'stylesheet' => urlencode( $stylesheet ), 271 ), admin_url( 'themes.php' ) ); 272 $delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet ); 273 ?> 274 <td><a href="<?php echo esc_url( $delete_url ); ?>" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a></td> 275 <?php 276 } 277 ?> 278 </tr> 279 <?php endforeach; ?> 263 280 </table> 264 281 </div>
Note: See TracChangeset
for help on using the changeset viewer.