Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php	(revision 8796)
+++ wp-admin/includes/media.php	(working copy)
@@ -55,10 +55,11 @@
 
 	$html = get_image_tag($id, $alt, $title, $align, $size);
 
+
 	$rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';
 
 	if ( $url )
-		$html = '<a href="' . clean_url($url) . "\"$rel>$html</a>";
+		$html = '<a href="' . clean_url($url) . "\" title=\"". attribute_escape($title) ."\"$rel>$html</a>";
 
 	$html = apply_filters( 'image_send_to_editor', $html, $id, $alt, $title, $align, $url, $size );
 
@@ -256,6 +257,8 @@
 			$post['post_title'] = $attachment['post_title'];
 		if ( isset($attachment['post_excerpt']) )
 			$post['post_excerpt'] = $attachment['post_excerpt'];
+		if ( isset($attachment['group_number']) )
+			$post['group_number'] = $attachment['group_number'];
 		if ( isset($attachment['menu_order']) )
 			$post['menu_order'] = $attachment['menu_order'];
 
@@ -274,9 +277,21 @@
 				wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false);
 	}
 
-	if ( isset($_POST['insert-gallery']) )
-		return media_send_to_editor('[gallery]');
-
+	if ( isset($_POST['insert-gallery']) ) {
+		if ( isset($_POST['gallery_insert']) ) {
+			return media_send_to_editor('[gallery group="'.$_POST['gallery_insert'].'"]');
+		} else {
+			return media_send_to_editor('[gallery]');
+		}
+		
+	}
+	
+	if ( isset($_POST['gallery_delete']) && !is_null($_POST['gallery_delete']) )
+		wp_delete_gallery($post, $_POST['gallery_delete']);
+	
+	if ( isset($_POST['new-gallery']) )
+		wp_new_gallery($post);
+		
 	if ( isset($_POST['send']) ) {
 		$keys = array_keys($_POST['send']);
 		$send_id = (int) array_shift($keys);
@@ -317,8 +332,11 @@
 			$align = attribute_escape($_POST['insertonly']['align']);
 			$class = " class='align$align'";
 		}
+		if ( isset($_POST['insertonly']['title']) ) {
+			$title = " title='".attribute_escape($_POST['insertonly']['title'])."'";
+		}
 		if ( !empty($src) )
-			$html = "<img src='$src' alt='$alt'$class />";
+			$html = "<img src='$src' alt='$alt'$title$class />";
 		return media_send_to_editor($html);
 	}
 
@@ -637,6 +655,7 @@
 add_filter('attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2);
 
 function image_media_send_to_editor($html, $attachment_id, $attachment) {
+
 	$post =& get_post($attachment_id);
 	if ( substr($post->post_mime_type, 0, 5) == 'image' ) {
 		$url = $attachment['url'];
@@ -662,6 +681,7 @@
 add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3);
 
 function get_attachment_fields_to_edit($post, $errors = null) {
+	
 	if ( is_int($post) )
 		$post =& get_post($post);
 	if ( is_array($post) )
@@ -691,6 +711,9 @@
 			'html'       => image_link_input_fields($post, get_option('image_default_link_type')),
 			'helps'      => __('Enter a link URL or click above for presets.'),
 		),
+    	'group_number'   => array(
+			'value'      => $edit_post->group_number
+		),
     	'menu_order'   => array(
 			'label'      => __('Order'),
 			'value'      => $edit_post->menu_order
@@ -726,13 +749,21 @@
 	return $form_fields;
 }
 
-function get_media_items( $post_id, $errors ) {
+function get_media_items( $post_id, $group, $errors ) {
+	global $wpdb;
 	if ( $post_id ) {
 		$post = get_post($post_id);
-		if ( $post && $post->post_type == 'attachment' )
+		if ( $post && $post->post_type == 'attachment' ) {
 			$attachments = array($post->ID => $post);
-		else
-			$attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') );
+		} else {
+			$attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'group_number' => $group, 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC'));		
+			$images_in_group = intval($wpdb->get_var($wpdb->prepare("SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent = '%d' AND group_number = %d", $post_id, $group)));
+			
+			if ($images_in_group == 0) {
+				$output = "\n<div class='media-item media-no-items child-of-$post_id preloaded'><div class='progress'><div class='bar'></div></div><div id='media-upload-error-$id'></div><div class='filename'></div><div class='filename new'>". __("No images in this group. Move items to this group.") ."</div></div>";
+				return $output;
+			}
+		}
 	} else {
 		if ( is_array($GLOBALS['wp_the_query']->posts) )
 			foreach ( $GLOBALS['wp_the_query']->posts as $attachment )
@@ -743,13 +774,13 @@
 		return '';
 
 	foreach ( $attachments as $id => $attachment )
-		if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) )
+		if ( $item = get_media_item( $id, $group, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) )
 			$output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div class='progress'><div class='bar'></div></div><div id='media-upload-error-$id'></div><div class='filename'></div>$item\n</div>";
 
 	return $output;
 }
 
-function get_media_item( $attachment_id, $args = null ) {
+function get_media_item( $attachment_id, $group = null, $args = null ) {
 	global $redir_tab;
 
 	$default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true );
@@ -771,6 +802,8 @@
 
 	$post = get_post($attachment_id);
 
+	if (!is_null($group) && ($post->group_number != $group)) { return; }
+
 	$filename = basename($post->guid);
 	$title = attribute_escape($post->post_title);
 	$description = attribute_escape($post->post_content);
@@ -804,7 +837,8 @@
 	$gallery = ( (isset($_REQUEST['tab']) && 'gallery' == $_REQUEST['tab']) || (isset($redir_tab) && 'gallery' == $redir_tab) ) ? true : false;
 	$order = '';
 
-	foreach ( $form_fields as $key => $val ) {
+	foreach ( $form_fields as $key => $val ) {		
+		
 		if ( 'menu_order' == $key ) {
 			if ( $gallery )
 				$order = '<div class="menu_order"> <input class="menu_order_input" type="text" id="attachments['.$attachment_id.'][menu_order]" name="attachments['.$attachment_id.'][menu_order]" value="'.$val['value'].'" /></div>';
@@ -812,14 +846,19 @@
 				$order = '<input type="hidden" name="attachments['.$attachment_id.'][menu_order]" value="'.$val['value'].'" />';
 
 			unset($form_fields['menu_order']);
-			break;
 		}
+		
+		if ( 'group_number' == $key ) {			
+			$groupnum = '<input type="hidden" class="group-value" name="attachments['.$attachment_id.'][group_number]" value="'.$val['value'].'" />';
+			unset($form_fields['group_number']);
+		}
 	}
-
+	
 	$item = "
 	$type
 	$toggle_links
 	$order
+	$groupnum
 	<div class='filename new'>$display_title</div>
 	<table class='slidetoggle describe $class'>
 		<thead class='media-item-info'>
@@ -1000,7 +1039,6 @@
 	<p>
 	<input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php echo attribute_escape(__('Upload')); ?>" /> <a href="#" onclick="return top.tb_remove();"><?php _e('Cancel'); ?></a>
 	</p>
-
 	<br class="clear" />
 	<?php if ( is_lighttpd_before_150() ): ?>
 	<p><?php _e('If you want to use all capabilities of the uploader, like uploading multiple files at once, please upgrade to lighttpd 1.5.'); ?></p>
@@ -1082,7 +1120,7 @@
 		html = '<img alt="'+alt+'" src="'+f.src.value+'"'+title+cls+' width="'+t.width+'" height="'+t.height+'" />';
 
 		if ( f.url.value )
-			html = '<a href="'+f.url.value+'">'+html+'</a>';
+			html = '<a href="'+f.url.value+'"'+title+'>'+html+'</a>';
 
 		if ( caption )
 			html = '[caption id="" align="'+t.align+'" width="'+t.width+'" caption="'+caption+'"]'+html+'[/caption]';
@@ -1139,12 +1177,15 @@
 }
 
 function media_upload_gallery_form($errors) {
-	global $redir_tab;
+	global $wpdb, $redir_tab;
 
 	$redir_tab = 'gallery';
 	media_upload_header();
 
 	$post_id = intval($_REQUEST['post_id']);
+	$group_results = $wpdb->get_row($wpdb->prepare("SELECT groups FROM $wpdb->posts WHERE ID = %d", $post_id));
+	$groups = split(",", $group_results->groups);
+	
 	$form_action_url = admin_url("media-upload.php?type={$GLOBALS['type']}&tab=gallery&post_id=$post_id");
 ?>
 
@@ -1154,8 +1195,30 @@
 	var preloaded = $(".media-item.preloaded");
 	if ( preloaded.length > 0 ) {
 		preloaded.each(function(){prepareMediaItem({id:this.id.replace(/[^0-9]/g, '')},'');});
-		updateMediaForm();
 	}
+	
+	jQuery("a.del-group").click(function () {
+		
+		var deleteConfirmation = confirm('<?php _e("Are you sure you want to delete this gallery group?"); ?>');
+		if (!deleteConfirmation) { return; }
+		if (jQuery("#media-group-" + jQuery(this).attr('value') + " .media-item input.group-value").length)
+		{
+			jQuery.each(jQuery("#media-group-delete-" + jQuery(this).attr('value') + " .media-item input.group-value"), function(i, id) {
+				jQuery(id)[0].value = 0;	//	we are going to set all the items to group 0		
+			});
+		}
+		jQuery("#gallery-delete").val( jQuery(this).attr('value') );	//	set the gallery we are deleting
+		jQuery("#media-group-" + jQuery(this).attr('value')).hide();	//	hide the gallery and then...
+		jQuery(".savebutton").click();
+		
+	});
+	
+	jQuery("a.insert-group").click(function () {
+		jQuery("#gallery-insert").val( jQuery(this).attr('value') );	//	set the gallery we are inserting
+		jQuery(".insert-gallery").click();		
+	});
+	
+	
 });
 -->
 </script>
@@ -1163,23 +1226,57 @@
 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="gallery-form">
 <?php wp_nonce_field('media-form'); ?>
 <?php //media_upload_form( $errors ); ?>
+
+<div id="media-items">
+<?php
+foreach ($groups as $group => $group_number)
+{
+?>
+<div id="media-group-<?php echo $group_number; ?>" class="media-groups">
+<input type="hidden" id="media-group-value-<?php echo $group_number; ?>" value="<?php echo $group_number; ?>" />
 <table class="widefat">
 <thead><tr>
-<th><?php _e('Media'); ?></th>
+<th>
+<?php 
+	if ($group_number > 0) { 
+		
+		$delete = "<a href=\"#media-group-delete-value-".$group_number."\" value=\"".$group_number."\" class=\"del-group\">" . __('Delete Group') . "</a>";
+		$insert = "<a href=\"#media-group-insert-value-".$group_number."\" value=\"".$group_number."\" class=\"insert-group\">" . __('Insert Group') . "</a>";
+		$group_link = "<small>(".$delete." | " .$insert.")</small>";
+		
+		_e('Media Group ('.$group_number.'): ' . $group_link); 
+	} else { 
+		_e('Media: Non-grouped items.'); 
+	}
+?>
+</th>
 <th class="order-head"><?php _e('Order'); ?></th>
 </tr></thead>
 </table>
-<div id="media-items">
-<?php echo get_media_items($post_id, $errors); ?>
+<?php echo get_media_items($post_id, $group_number, $errors); ?>
 </div>
+<?php
+}
+?>
+</div>
 <p class="ml-submit">
 <input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" />
-<input type="submit" class="button insert-gallery" name="insert-gallery" value="<?php echo attribute_escape( __( 'Insert gallery into post' ) ); ?>" />
+<input type="submit" class="button new-gallery" name="new-gallery" value="<?php echo attribute_escape( __( 'Create new gallery' ) ); ?>" />
+<input type="submit" class="button insert-gallery" name="insert-gallery" value="<?php echo attribute_escape( __( 'Insert full gallery into post' ) ); ?>" />
+<input type="hidden" name="gallery_delete" id="gallery-delete" value="" />
+<input type="hidden" name="gallery_insert" id="gallery-insert" value="" />
 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
 <input type="hidden" name="type" value="<?php echo attribute_escape( $GLOBALS['type'] ); ?>" />
 <input type="hidden" name="tab" value="<?php echo attribute_escape( $GLOBALS['tab'] ); ?>" />
 </p>
 </form>
+
+<script type="text/javascript">
+<!--
+	updateMediaForm();
+-->
+</script>
+
 <?php
 }
 
@@ -1319,7 +1416,7 @@
 </script>
 
 <div id="media-items">
-<?php echo get_media_items(null, $errors); ?>
+<?php echo get_media_items(null, null, $errors); ?>
 </div>
 <p class="ml-submit">
 <input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" />
Index: wp-admin/includes/schema.php
===================================================================
--- wp-admin/includes/schema.php	(revision 8796)
+++ wp-admin/includes/schema.php	(working copy)
@@ -119,6 +119,8 @@
   post_content_filtered text NOT NULL,
   post_parent bigint(20) NOT NULL default '0',
   guid varchar(255) NOT NULL default '',
+  groups varchar(255) NOT NULL default '0',
+  group_number int(11) NOT NULL default '0',
   menu_order int(11) NOT NULL default '0',
   post_type varchar(20) NOT NULL default 'post',
   post_mime_type varchar(100) NOT NULL default '',
Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 8796)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -764,6 +764,9 @@
 function upgrade_270() {
 	if ( $wp_current_db_version < 8530 )
 		populate_roles_270();
+	
+	add_clean_index($wpdb->posts, 'groups');
+	add_clean_index($wpdb->posts, 'group_number');
 }
 
 
Index: wp-admin/js/gallery.js
===================================================================
--- wp-admin/js/gallery.js	(revision 8796)
+++ wp-admin/js/gallery.js	(working copy)
@@ -1,22 +1,44 @@
 jQuery(function($) {
 	var gallerySortable;
+
 	var gallerySortableInit = function() {
 		gallerySortable = $('#media-items').sortable( {
 			items: '.media-item',
 			placeholder: 'sorthelper',
 			axis: 'y',
 			distance: 2,
-			update: galleryReorder
+			update: galleryHandle,
 		} );
 	}
-
-	// When an update has occurred, adjust the order for each item
+	
+	var galleryHandle = function (e, sort) {
+		galleryReorder(e, sort); 
+		gallerySortGroups();
+	}
+	
+	// @todo: fix me!
+	// When an update has occurred, adjust the order for each item.. 
 	var galleryReorder = function(e, sort) {
+		var o = 0;
 		jQuery.each(sort['element'].sortable('toArray'), function(i, id) {
-			jQuery('#' + id + ' .menu_order input')[0].value = (1+i);
+			if (id)
+			{
+				o++;
+				jQuery('#' + id + ' .menu_order input')[0].value = o;
+			}
 		});
 	}
-
+	
+	var gallerySortGroups = function () {
+		var mediaGroups = jQuery(".media-groups").length;
+		for (g = 0; g < mediaGroups; g++)
+		{
+			jQuery.each(jQuery("#media-group-" + g + " .media-item input.group-value"), function(i, id) {
+				jQuery(id)[0].value = g;		
+			});
+		}
+	}
+	
 	// initialize sortable
 	gallerySortableInit();
 });
Index: wp-admin/post.php
===================================================================
--- wp-admin/post.php	(revision 8796)
+++ wp-admin/post.php	(working copy)
@@ -83,6 +83,10 @@
 	check_admin_referer('add-post');
 
 	if ( 'post-quickpress-publish' == $action )
+		
+		$_POST['comment_status'] = get_option('default_comment_status');
+		$_POST['ping_status'] = get_option('default_ping_status');
+		
 		$_POST['publish'] = 'publish'; // tell write_post() to publish
 
 	if ( !empty( $_POST['quickpress_post_ID'] ) ) {
Index: wp-includes/js/swfupload/handlers.js
===================================================================
--- wp-includes/js/swfupload/handlers.js	(revision 8796)
+++ wp-includes/js/swfupload/handlers.js	(working copy)
@@ -125,16 +125,23 @@
 	}
 
 	// Only show Save buttons when there is at least one file.
-	if ( jQuery('#media-items>*').not('.media-blank').length > 0 )
+	if ( jQuery('#media-items .media-item').not('.media-no-items').length > 0 )
 		jQuery('.savebutton').show();
 	else
 		jQuery('.savebutton').hide();
 
+	// Only show new Gallery button when there are at least two files.
+	if ( jQuery('#media-items .media-item').not('.media-no-items').length > 1 )
+		jQuery('.new-gallery').show();
+	else
+		jQuery('.new-gallery').hide();
+
 	// Only show Gallery button when there are at least two files.
-	if ( jQuery('#media-items>*').length > 1 )
+	if ( jQuery('#media-items .media-groups').length > 1 )
 		jQuery('.insert-gallery').show();
 	else
 		jQuery('.insert-gallery').hide();
+		
 }
 
 function uploadSuccess(fileObj, serverData) {
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 8796)
+++ wp-includes/media.php	(working copy)
@@ -487,6 +487,7 @@
 		'icontag'    => 'dt',
 		'captiontag' => 'dd',
 		'columns'    => 3,
+		'group'		 => null,
 		'size'       => 'thumbnail',
 	), $attr));
 
@@ -508,7 +509,7 @@
 	$captiontag = tag_escape($captiontag);
 	$columns = intval($columns);
 	$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
-
+	
 	$output = apply_filters('gallery_style', "
 		<style type='text/css'>
 			.gallery {
@@ -528,23 +529,34 @@
 		</style>
 		<!-- see gallery_shortcode() in wp-includes/media.php -->
 		<div class='gallery'>");
-
+	
 	foreach ( $attachments as $id => $attachment ) {
-		$link = wp_get_attachment_link($id, $size, true);
-		$output .= "<{$itemtag} class='gallery-item'>";
-		$output .= "
-			<{$icontag} class='gallery-icon'>
-				$link
-			</{$icontag}>";
-		if ( $captiontag && trim($attachment->post_excerpt) ) {
+	
+			if (!is_null($group)) {
+				if ($attachment->group_number != $group) {
+					continue;
+				}
+			} else {
+				if ($attachment->group_number == 0) {
+					continue;
+				}
+			}
+	
+			$link = wp_get_attachment_link($id, $size, true);
+			$output .= "<{$itemtag} class='gallery-item'>";
 			$output .= "
-				<{$captiontag} class='gallery-caption'>
-				{$attachment->post_excerpt}
-				</{$captiontag}>";
-		}
-		$output .= "</{$itemtag}>";
-		if ( $columns > 0 && ++$i % $columns == 0 )
-			$output .= '<br style="clear: both" />';
+				<{$icontag} class='gallery-icon'>
+					$link
+				</{$icontag}>";
+			if ( $captiontag && trim($attachment->post_excerpt) ) {
+				$output .= "
+					<{$captiontag} class='gallery-caption'>
+					{$attachment->post_excerpt}
+					</{$captiontag}>";
+			}
+			$output .= "</{$itemtag}>";
+			if ( $columns > 0 && ++$i % $columns == 0 )
+				$output .= '<br style="clear: both" />';
 	}
 
 	$output .= "
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 8796)
+++ wp-includes/post.php	(working copy)
@@ -1440,7 +1440,7 @@
 	}
 
 	// expected_slashed (everything!)
-	$data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid' ) );
+	$data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid', 'groups' ) );
 	$data = apply_filters('wp_insert_post_data', $data, $postarr);
 	$data = stripslashes_deep( $data );
 	$where = array( 'ID' => $post_ID );
@@ -1513,6 +1513,74 @@
 }
 
 /**
+ * Insert a new gallery into the post.
+ *
+ * @since 2.7.0
+ *
+ * @param array $postarr post data
+ */
+function wp_new_gallery($postarr = array())
+{
+	if ( is_object($postarr) )
+		$postarr = get_object_vars($postarr);
+
+	// First, get all of the original fields
+	$post = wp_get_single_post($postarr['post_parent'], ARRAY_A);
+
+	// create new group
+	$last_group = split(",", $post['groups']);
+	$new_groups = array(count($last_group) => count($last_group));
+	$post_newgroup['groups'] = implode(",", array_merge($last_group, $new_groups));
+	
+	// Merge old and new fields with new fields overwriting old ones.
+	$postarr = array_merge($post, $post_newgroup);
+	
+	// update the post
+	wp_update_post($postarr);
+	
+}
+
+/**
+ * 
+ * Delete a gallery and reset the gallery numbers of those items inside the gallery.
+ *
+ * @since 2.7.0
+ *
+ * @param array $postarr post data
+ * @param int $gallery_number data
+ */
+function wp_delete_gallery($postarr = array(), $gallery_number)
+{
+	global $wpdb;
+
+	if ( is_object($postarr) )
+		$postarr = get_object_vars($postarr);
+
+	// First, get all of the original fields
+	$post = wp_get_single_post($postarr['post_parent'], ARRAY_A);
+	
+	// groups
+	$current_groups = split(",", $post['groups']);
+	$i = 0;
+	foreach ($current_groups as $item => $value)
+	{
+		if ($gallery_number != $value) {
+			$new_groupnumber = $i;
+			$newgroup[] = $new_groupnumber;
+			$wpdb->query($wpdb->prepare("UPDATE $wpdb->posts SET group_number = %d WHERE post_parent = %d AND group_number = %d", $new_groupnumber, $post['ID'], $value));
+			$i++;
+		}
+	}
+	$new_groups_update = array("groups" => implode(",", $newgroup));
+
+	// Merge old and new fields with new fields overwriting old ones.
+	$postarr = array_merge($post, $new_groups_update);
+	
+	// update the post
+	wp_update_post($postarr);
+}
+
+/**
  * Update a post with new post data.
  *
  * The date does not have to be set for drafts. You can set the date and it will
@@ -2316,7 +2384,7 @@
 		$pinged = '';
 
 	// expected_slashed (everything!)
-	$data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid' ) );
+	$data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid', 'group_number' ) );
 	$data = stripslashes_deep( $data );
 
 	if ( $update ) {

