WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/08/2013 10:52:55 PM (9 years ago)
Author:
azaozz
Message:

Post locks and autosave:

  • Move nonces refreshing from autosave to lock checking.
  • Do autosave only when there is something to save.

See #23295

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/misc.php

    r24207 r24209  
    624624        }
    625625
     626        if ( ! empty( $received['post_nonce'] ) && 2 === wp_verify_nonce( $received['post_nonce'], 'update-post_' . $post_id ) ) {
     627            $send['update_nonces'] = array(
     628                'replace-autosavenonce' => wp_create_nonce('autosave'),
     629                'replace-getpermalinknonce' => wp_create_nonce('getpermalink'),
     630                'replace-samplepermalinknonce' => wp_create_nonce('samplepermalink'),
     631                'replace-closedpostboxesnonce' => wp_create_nonce('closedpostboxes'),
     632                'replace-_ajax_linking_nonce' => wp_create_nonce( 'internal-linking' ),
     633                'replace-_wpnonce' => wp_create_nonce( 'update-post_' . $post_id ),
     634            );
     635        }
     636
    626637        $response['wp-refresh-post-lock'] = $send;
    627638    }
Note: See TracChangeset for help on using the changeset viewer.