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/ajax-actions.php

    r24206 r24209  
    10391039    define( 'DOING_AUTOSAVE', true );
    10401040
    1041     $nonce_age = check_ajax_referer( 'autosave', 'autosavenonce' );
     1041    check_ajax_referer( 'autosave', 'autosavenonce' );
    10421042
    10431043    $_POST['post_category'] = explode(",", $_POST['catslist']);
     
    10891089        else
    10901090            $id = $post->ID;
    1091     }
    1092 
    1093     if ( $nonce_age == 2 ) {
    1094         $supplemental['replace-autosavenonce'] = wp_create_nonce('autosave');
    1095         $supplemental['replace-getpermalinknonce'] = wp_create_nonce('getpermalink');
    1096         $supplemental['replace-samplepermalinknonce'] = wp_create_nonce('samplepermalink');
    1097         $supplemental['replace-closedpostboxesnonce'] = wp_create_nonce('closedpostboxes');
    1098         $supplemental['replace-_ajax_linking_nonce'] = wp_create_nonce( 'internal-linking' );
    1099         $supplemental['replace-_wpnonce'] = wp_create_nonce( 'update-post_' . $post->ID );
    11001091    }
    11011092
Note: See TracChangeset for help on using the changeset viewer.