Ticket #6266: 6266-2.diff
| File 6266-2.diff, 1.4 KB (added by , 18 years ago) |
|---|
-
wp-includes/pluggable.php
953 953 * @return int 954 954 */ 955 955 function wp_nonce_tick() { 956 $nonce_life = apply_filters('nonce_life', 86400) / 2;956 $nonce_life = apply_filters('nonce_life', 86400); 957 957 958 958 return ceil(time() / ( $nonce_life / 2 )); 959 959 } -
wp-admin/admin-ajax.php
520 520 if ( $do_lock && $id && is_numeric($id) ) 521 521 wp_set_post_lock( $id ); 522 522 523 if ( $nonce_age == 2 ) 523 if ( $nonce_age == 2 ) { 524 524 $supplemental['replace-autosavenonce'] = wp_create_nonce('autosave'); 525 $supplemental['replace-getpermalinknonce'] = wp_create_nonce('getpermalink'); 526 $supplemental['replace-samplepermalinknonce'] = wp_create_nonce('samplepermalink'); 527 $supplemental['replace-closedpostboxesnonce'] = wp_create_nonce('closedpostboxes'); 528 if ( $id ) { 529 if ( $_POST['post_type'] == 'post' ) 530 $supplemental['replace-_wpnonce'] = wp_create_nonce('update-post_' . $id); 531 elseif ( $_POST['post_type'] == 'page' ) 532 $supplemental['replace-_wpnonce'] = wp_create_nonce('update-page_' . $id); 533 } 534 } 525 535 526 536 $x = new WP_Ajax_Response( array( 527 537 'what' => 'autosave',