Ticket #15707: 15707.patch
File 15707.patch, 2.1 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/class-wp-ms-themes-list-table.php
281 281 282 282 if ( current_user_can('edit_themes') ) 283 283 $actions['edit'] = '<a href="theme-editor.php?theme=' . $theme['Name'] . '" title="' . __('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>'; 284 285 if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes ) 286 $actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&template=$theme_key", 'delete-theme_' . $theme_key ) . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'.\nWarning: Other sites may be using that theme still!\n'Cancel' to stop, 'OK' to delete." ), $theme['Name'] ) ) . "' );" . '">' . __( 'Delete' ) . '</a>'; 284 287 285 288 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context ); 286 289 $actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context ); -
wp-admin/network/themes.php
58 58 unset( $allowed_themes[ $theme ] ); 59 59 update_site_option( 'allowedthemes', $allowed_themes ); 60 60 break; 61 case 'delete': 62 check_admin_referer('delete-theme_' . $_GET['template']); 63 if ( !current_user_can('delete_themes') ) 64 wp_die( __( 'Cheatin’ uh?' ) ); 65 delete_theme($_GET['template']); 66 wp_redirect( self_admin_url('themes.php?deleted=true') ); 67 exit; 68 break; 61 69 } 62 70 } 63 71 … … 80 88 81 89 require_once(ABSPATH . 'wp-admin/admin-header.php'); 82 90 83 ?> 91 if ( isset($_GET['deleted']) ) { ?> 92 <div class="updated"><p><?php _e('Theme deleted.') ?></p></div> 93 <?php } ?> 84 94 85 95 <div class="wrap"> 86 96 <?php screen_icon('themes'); ?>