bulk-themes nonce for network/themes.php deletion. props PeteMall, see #15969.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-23 18:53:44 +00:00
parent 7eab7be110
commit c7677394b7
1 changed files with 1 additions and 8 deletions

View File

@ -69,17 +69,10 @@ if ( $action ) {
unset( $allowed_themes[ $theme ] );
update_site_option( 'allowedthemes', $allowed_themes );
break;
case 'delete':
check_admin_referer('delete-theme_' . $_GET['template']);
if ( !current_user_can('delete_themes') )
wp_die( __( 'Cheatin’ uh?' ) );
delete_theme($_GET['template']);
wp_redirect( network_admin_url('themes.php?deleted=true') );
exit;
break;
case 'delete-selected':
if ( ! current_user_can( 'delete_themes' ) )
wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
check_admin_referer( 'bulk-themes' );
$themes = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
if ( empty( $themes ) ) {