From f89abfffd2cea753f4aedea94a5dcac1044c83ed Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 5 Mar 2009 18:45:26 +0000 Subject: [PATCH] Add theme delete link. Stub action. see #8678 git-svn-id: https://develop.svn.wordpress.org/trunk@10714 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/themes.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 4fd1883edb..80f18fa911 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 );