Make WordPress Core


Ignore:
Timestamp:
03/14/2013 03:06:07 AM (12 years ago)
Author:
azaozz
Message:

Local autosave: set a temp cookie on submitting the form and change it on redirecting after the post is saved/updated, then use it to determine if saving worked properly. Removes the chance for false positives after saving/updating a post. See #23220

File:
1 edited

Legend:

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

    r23661 r23693  
    211211    $post_id = edit_post();
    212212
     213    // Session cookie flag that the post was saved
     214    if ( isset( $_COOKIE['wp-saving-post-' . $post_id] ) )
     215        setcookie( 'wp-saving-post-' . $post_id, 'saved' );
     216
    213217    redirect_post($post_id); // Send user on their way while we keep working
    214218
Note: See TracChangeset for help on using the changeset viewer.