Changeset 14984 for trunk/wp-admin/themes.php
- Timestamp:
- 05/27/2010 09:49:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/themes.php
r14951 r14984 21 21 } else if ( 'delete' == $_GET['action'] ) { 22 22 check_admin_referer('delete-theme_' . $_GET['template']); 23 if ( !current_user_can(' update_themes') )23 if ( !current_user_can('delete_themes') ) 24 24 wp_die( __( 'Cheatin’ uh?' ) ); 25 25 delete_theme($_GET['template']); … … 194 194 $actions[] = '<a href="' . $activate_link . '" class="activatelink" title="' . $activate_text . '">' . __('Activate') . '</a>'; 195 195 $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $theme_name)) . '">' . __('Preview') . '</a>'; 196 if ( current_user_can(' update_themes') )197 $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url("themes.php?action=delete&template=$stylesheet", 'delete-theme_' . $stylesheet) . '" onclick="' . " if ( confirm('" . esc_js(sprintf( __("You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete."), $theme_name )) . "') ) {return true;}return false;" . '">' . __('Delete') . '</a>';196 if ( current_user_can('delete_themes') ) 197 $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url("themes.php?action=delete&template=$stylesheet", 'delete-theme_' . $stylesheet) . '" onclick="' . "return confirm('" . esc_js(sprintf( __("You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete."), $theme_name )) . "');" . '">' . __('Delete') . '</a>'; 198 198 $actions = apply_filters('theme_action_links', $actions, $themes[$theme_name]); 199 199
Note: See TracChangeset
for help on using the changeset viewer.