Ticket #21858: miqro-21858-autosave.patch
File miqro-21858-autosave.patch, 730 bytes (added by , 12 years ago) |
---|
-
wp-admin/includes/post.php
158 158 wp_die( __('You are not allowed to edit this post.' )); 159 159 } 160 160 161 // Autosave shouldn't save too soon after a real save162 if ( 'autosave' == $post_data['action'] ) {163 $post = get_post( $post_ID );164 $now = time();165 $then = strtotime($post->post_date_gmt . ' +0000');166 $delta = AUTOSAVE_INTERVAL / 2;167 if ( ($now - $then) < $delta )168 return $post_ID;169 }170 171 161 $post_data = _wp_translate_postdata( true, $post_data ); 172 162 if ( is_wp_error($post_data) ) 173 163 wp_die( $post_data->get_error_message() );