+ include(ABSPATH . 'wp-admin/admin-footer.php');
+ } elseif ( 'update-selected-themes' == $action ) {
+ if ( ! current_user_can( 'update_themes' ) )
+ wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) );
+
+ check_admin_referer( 'bulk-update-themes' );
+
+ if ( isset( $_GET['themes'] ) )
+ $themes = explode( ',', stripslashes($_GET['themes']) );
+ elseif ( isset( $_POST['checked'] ) )
+ $themes = (array) $_POST['checked'];
+ else
+ $themes = array();
+
+ $themes = array_map('urldecode', $themes);
+
+ $url = 'update.php?action=update-selected-themes&themes=' . urlencode(implode(',', $themes));
+ $nonce = 'bulk-update-themes';
+
+ wp_enqueue_script( 'updates' );
+ iframe_header();
+
+ $upgrader = new Theme_Upgrader( new Bulk_Theme_Upgrader_Skin( compact( 'nonce', 'url' ) ) );
+ $upgrader->bulk_upgrade( $themes );