mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user