- if ( isset( $_COOKIE['wp-saving-post-' . $post_id] ) )
- setcookie( 'wp-saving-post-' . $post_id, 'saved' );
+ if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) {
+ setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS );
+ }