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
This commit is contained in:
Andrew Nacin 2012-09-22 02:11:09 +00:00
parent 991be145a9
commit 620b94181c
1 changed files with 0 additions and 10 deletions

View File

@ -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() );