Changeset 11851
- Timestamp:
- 08/20/2009 04:57:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r11841 r11851 958 958 check_ajax_referer( 'autosave', 'autosavenonce' ); 959 959 $ID = (int) $_POST['post_ID']; 960 if ($_POST['post_type'] == 'post') {961 if (current_user_can('edit_post', $ID))960 if ( $_POST['post_type'] == 'post' ) { 961 if ( current_user_can('edit_post', $ID) ) 962 962 die(wp_create_nonce('update-post_' . $ID)); 963 } 964 if($_POST['post_type'] == 'page') { 965 if(current_user_can('edit_page', $ID)) { 963 } elseif ( $_POST['post_type'] == 'page' ) { 964 if ( current_user_can('edit_page', $ID) ) 966 965 die(wp_create_nonce('update-page_' . $ID)); 967 968 }966 } 967 do_action('autosave_generate_nonces'); 969 968 die('0'); 970 969 break;
Note: See TracChangeset
for help on using the changeset viewer.