From 620b94181c78378c9def3e8cb5da221d37bacf25 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 22 Sep 2012 02:11:09 +0000 Subject: [PATCH] Remove old autosave collision code from edit_post(). props miqrogroove. This code, which could block autosaves when drafts had future timestamps, dates to before autosaves were saved as revisions and is no longer necessary. fixes #21858. git-svn-id: https://develop.svn.wordpress.org/trunk@21949 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/post.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index ef7f4358e0..44bc7c231c 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -162,16 +162,6 @@ function edit_post( $post_data = null ) { wp_die( __('You are not allowed to edit this post.' )); } - // Autosave shouldn't save too soon after a real save - if ( 'autosave' == $post_data['action'] ) { - $post = get_post( $post_ID ); - $now = time(); - $then = strtotime($post->post_date_gmt . ' +0000'); - $delta = AUTOSAVE_INTERVAL / 2; - if ( ($now - $then) < $delta ) - return $post_ID; - } - $post_data = _wp_translate_postdata( true, $post_data ); if ( is_wp_error($post_data) ) wp_die( $post_data->get_error_message() );