WordPress.org

Make WordPress Core

Ticket #15969: delete.diff

File delete.diff, 952 bytes (added by PeteMall, 7 years ago)
  • wp-admin/network/themes.php

     
    6969                                unset( $allowed_themes[ $theme ] );
    7070                        update_site_option( 'allowedthemes', $allowed_themes );
    7171                        break;
    72                 case 'delete':
    73                         check_admin_referer('delete-theme_' . $_GET['template']);
    74                         if ( !current_user_can('delete_themes') )
    75                                 wp_die( __( 'Cheatin’ uh?' ) );
    76                         delete_theme($_GET['template']);
    77                         wp_redirect( network_admin_url('themes.php?deleted=true') );
    78                         exit;
    79                         break;
    8072                case 'delete-selected':
    8173                        if ( ! current_user_can( 'delete_themes' ) )
    8274                                wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
     75                        check_admin_referer( 'bulk-themes' );
    8376
    8477                        $themes = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
    8578                        if ( empty( $themes ) ) {