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
git-svn-id: http://core.svn.wordpress.org/trunk@23693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -210,6 +210,10 @@ case 'editpost':
|
||||
|
||||
$post_id = edit_post();
|
||||
|
||||
// Session cookie flag that the post was saved
|
||||
if ( isset( $_COOKIE['wp-saving-post-' . $post_id] ) )
|
||||
setcookie( 'wp-saving-post-' . $post_id, 'saved' );
|
||||
|
||||
redirect_post($post_id); // Send user on their way while we keep working
|
||||
|
||||
exit();
|
||||
|
||||
Reference in New Issue
Block a user