Separate the nonces update from checking the post lock. Fix scheduling the logged out check. See #23697, see #23295.

git-svn-id: http://core.svn.wordpress.org/trunk@24273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2013-05-16 03:47:09 +00:00
parent 0f72b7c967
commit 2f0c58960a
3 changed files with 65 additions and 10 deletions

View File

@@ -72,11 +72,11 @@
function schedule() {
check = false;
window.clearTimeout( timeout );
timeout = window.setTimeout( function(){ check = true; }, 180000 ); // 3 min.
timeout = window.setTimeout( function(){ check = 1; }, 180000 ); // 3 min.
}
$( document ).on( 'heartbeat-tick.wp-auth-check', function( e, data ) {
if ( check )
if ( check === 2 )
schedule();
if ( data['wp-auth-check'] && wrap.hasClass('hidden') ) {
@@ -103,6 +103,9 @@
if ( check || ! empty )
data['wp-auth-check'] = 1;
if ( check )
check = 2;
});
});