Changeset 10714
- Timestamp:
- 03/05/2009 06:45:26 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/themes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/themes.php
r10713 r10714 11 11 12 12 if ( isset($_GET['action']) ) { 13 check_admin_referer('switch-theme_' . $_GET['template']); 14 15 if ('activate' == $_GET['action']) { 13 if ( 'activate' == $_GET['action'] ) { 14 check_admin_referer('switch-theme_' . $_GET['template']); 16 15 switch_theme($_GET['template'], $_GET['stylesheet']); 17 16 wp_redirect('themes.php?activated=true'); 18 17 exit; 18 } else if ( 'delete' == $_GET['action'] ) { 19 check_admin_referer('delete-theme_' . $_GET['template']); 20 die('Not implemented'); 19 21 } 20 22 } … … 183 185 $actions[] = '<a href="' . $activate_link . '" title="' . $activate_text . '">' . __('Activate') . '</a>'; 184 186 $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . attribute_escape(sprintf(__('Preview "%s"'), $theme_name)) . '">' . __('Preview') . '</a>'; 187 if ( current_user_can('update_themes') ) 188 $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url("themes.php?action=delete&template=$template", 'delete-theme_' . $template) . '" onclick="' . "if ( confirm('" . js_escape(sprintf( __("You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete."), $theme_name )) . "') ) {return true;}return false;" . '">' . __('Delete') . '</a>'; 185 189 $actions = apply_filters('theme_action_links', $actions, $themes[$theme_name]); 186 190
Note: See TracChangeset
for help on using the changeset viewer.