mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Post locks and autosave:
- Move nonces refreshing from autosave to lock checking. - Do autosave only when there is something to save. See #23295 git-svn-id: https://develop.svn.wordpress.org/trunk@24209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -623,6 +623,17 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) {
|
||||
$send['new_lock'] = implode( ':', $new_lock );
|
||||
}
|
||||
|
||||
if ( ! empty( $received['post_nonce'] ) && 2 === wp_verify_nonce( $received['post_nonce'], 'update-post_' . $post_id ) ) {
|
||||
$send['update_nonces'] = array(
|
||||
'replace-autosavenonce' => wp_create_nonce('autosave'),
|
||||
'replace-getpermalinknonce' => wp_create_nonce('getpermalink'),
|
||||
'replace-samplepermalinknonce' => wp_create_nonce('samplepermalink'),
|
||||
'replace-closedpostboxesnonce' => wp_create_nonce('closedpostboxes'),
|
||||
'replace-_ajax_linking_nonce' => wp_create_nonce( 'internal-linking' ),
|
||||
'replace-_wpnonce' => wp_create_nonce( 'update-post_' . $post_id ),
|
||||
);
|
||||
}
|
||||
|
||||
$response['wp-refresh-post-lock'] = $send;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user