diff --git a/wp-admin/themes.php b/wp-admin/themes.php
index 4fd1883ed..80f18fa91 100644
--- a/wp-admin/themes.php
+++ b/wp-admin/themes.php
@@ -10,12 +10,14 @@
require_once('admin.php');
if ( isset($_GET['action']) ) {
- check_admin_referer('switch-theme_' . $_GET['template']);
-
- if ('activate' == $_GET['action']) {
+ if ( 'activate' == $_GET['action'] ) {
+ check_admin_referer('switch-theme_' . $_GET['template']);
switch_theme($_GET['template'], $_GET['stylesheet']);
wp_redirect('themes.php?activated=true');
exit;
+ } else if ( 'delete' == $_GET['action'] ) {
+ check_admin_referer('delete-theme_' . $_GET['template']);
+ die('Not implemented');
}
}
@@ -182,6 +184,8 @@ foreach ( $cols as $col => $theme_name ) {
$actions = array();
$actions[] = '' . __('Activate') . '';
$actions[] = '' . __('Preview') . '';
+ if ( current_user_can('update_themes') )
+ $actions[] = '' . __('Delete') . '';
$actions = apply_filters('theme_action_links', $actions, $themes[$theme_name]);
$actions = implode ( ' | ', $actions );