]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/network/themes.php
Wordpress 3.6
[autoinstalls/wordpress.git] / wp-admin / network / themes.php
index ba56a4a483e9eab02dc2a274fe267747d7ceafc3..711b44e0f210ab050248c4bacb34e9cf4d7c80cb 100644 (file)
@@ -13,11 +13,6 @@ require_once( './admin.php' );
 if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
-$menu_perms = get_site_option( 'menu_items', array() );
-
-if ( empty( $menu_perms['themes'] ) && ! is_super_admin() )
-       wp_die( __( 'Cheatin’ uh?' ) );
-
 if ( !current_user_can('manage_network_themes') )
        wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
 
 if ( !current_user_can('manage_network_themes') )
        wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
 
@@ -181,10 +176,21 @@ if ( $action ) {
                                exit;
                        } // Endif verify-delete
 
                                exit;
                        } // Endif verify-delete
 
-                       foreach ( $themes as $theme )
-                               $delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) );
+                       foreach ( $themes as $theme ) {
+                               $delete_result = delete_theme( $theme, esc_url( add_query_arg( array(
+                                       'verify-delete' => 1,
+                                       'action' => 'delete-selected',
+                                       'checked' => $_REQUEST['checked'],
+                                       '_wpnonce' => $_REQUEST['_wpnonce']
+                               ), network_admin_url( 'themes.php' ) ) ) );
+                       }
+                       
                        $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
                        $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
-                       wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) );
+                       wp_redirect( add_query_arg( array(
+                               'deleted' => count( $themes ),
+                               'paged' => $paged,
+                               's' => $s
+                       ), network_admin_url( 'themes.php' ) ) );
                        exit;
                        break;
        }
                        exit;
                        break;
        }
@@ -214,6 +220,8 @@ get_current_screen()->set_help_sidebar(
 $title = __('Themes');
 $parent_file = 'themes.php';
 
 $title = __('Themes');
 $parent_file = 'themes.php';
 
+wp_enqueue_script( 'theme' );
+
 require_once(ABSPATH . 'wp-admin/admin-header.php');
 
 ?>
 require_once(ABSPATH . 'wp-admin/admin-header.php');
 
 ?>