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:
Andrew Ozz
2013-03-14 03:06:07 +00:00
parent d46102d258
commit a224d8aaf7
2 changed files with 24 additions and 37 deletions

View File

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