Make WordPress Core

Changeset 21949


Ignore:
Timestamp:
09/22/2012 02:11:09 AM (12 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r21948 r21949  
    161161        else
    162162            wp_die( __('You are not allowed to edit this post.' ));
    163     }
    164 
    165     // Autosave shouldn't save too soon after a real save
    166     if ( 'autosave' == $post_data['action'] ) {
    167         $post = get_post( $post_ID );
    168         $now = time();
    169         $then = strtotime($post->post_date_gmt . ' +0000');
    170         $delta = AUTOSAVE_INTERVAL / 2;
    171         if ( ($now - $then) < $delta )
    172             return $post_ID;
    173163    }
    174164
Note: See TracChangeset for help on using the changeset viewer.