Fix updating of nonces on the Edit Post screen after the log in expires and the user logs in again.

Props iseulde, azaozz. Fixes #33098.

git-svn-id: https://develop.svn.wordpress.org/trunk@33468 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2015-07-28 22:06:52 +00:00
parent 649d02a16b
commit 1558be9dfa
5 changed files with 43 additions and 35 deletions
+5 -5
View File
@@ -170,13 +170,13 @@ $(document).on( 'heartbeat-send.refresh-lock', function( e, data ) {
}
$(document).on( 'heartbeat-send.wp-refresh-nonces', function( e, data ) {
var nonce, post_id;
var post_id,
$authCheck = $('#wp-auth-check-wrap');
if ( check ) {
if ( ( post_id = $('#post_ID').val() ) && ( nonce = $('#_wpnonce').val() ) ) {
if ( check || ( $authCheck.length && ! $authCheck.hasClass( 'hidden' ) ) ) {
if ( ( post_id = $('#post_ID').val() ) && $('#_wpnonce').val() ) {
data['wp-refresh-post-nonces'] = {
post_id: post_id,
post_nonce: nonce
post_id: post_id
};
}
}