Changeset 30697 for trunk/src/wp-admin/themes.php
- Timestamp:
- 12/02/2014 02:20:14 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/themes.php
r30356 r30697 27 27 if ( !current_user_can('delete_themes') || ! $theme->exists() ) 28 28 wp_die( __( 'Cheatin’ uh?' ), 403 ); 29 delete_theme($_GET['stylesheet']); 30 wp_redirect( admin_url('themes.php?deleted=true') ); 29 $active = wp_get_theme(); 30 if ( $active->get( 'Template' ) == $_GET['stylesheet'] ) { 31 wp_redirect( admin_url( 'themes.php?delete-active-child=true' ) ); 32 } else { 33 delete_theme( $_GET['stylesheet'] ); 34 wp_redirect( admin_url( 'themes.php?deleted=true' ) ); 35 } 31 36 exit; 32 37 } … … 134 139 elseif ( isset($_GET['deleted']) ) : ?> 135 140 <div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div> 141 <?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?> 142 <div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div> 136 143 <?php 137 144 endif;
Note: See TracChangeset
for help on using the changeset viewer.