Changeset 23683 for trunk/wp-admin/includes/ajax-actions.php
- Timestamp:
- 03/13/2013 10:08:16 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r23663 r23683 1051 1051 $id = $revision_id = 0; 1052 1052 1053 $post_ ID = (int) $_POST['post_ID'];1054 $_POST['ID'] = $ post_ID;1055 $post = get_post($post_ ID);1053 $post_id = (int) $_POST['post_id']; 1054 $_POST['ID'] = $_POST['post_ID'] = $post_id; 1055 $post = get_post($post_id); 1056 1056 if ( 'auto-draft' == $post->post_status ) 1057 1057 $_POST['post_status'] = 'draft'; … … 1069 1069 1070 1070 if ( 'page' == $post->post_type ) { 1071 if ( !current_user_can('edit_page', $post _ID) )1071 if ( !current_user_can('edit_page', $post->ID) ) 1072 1072 wp_die( __( 'You are not allowed to edit this page.' ) ); 1073 1073 } else { 1074 if ( !current_user_can('edit_post', $post _ID) )1074 if ( !current_user_can('edit_post', $post->ID) ) 1075 1075 wp_die( __( 'You are not allowed to edit this post.' ) ); 1076 1076 }
Note: See TracChangeset
for help on using the changeset viewer.