Changeset 24593 for trunk/wp-admin/includes/post.php
- Timestamp:
- 07/08/2013 08:05:42 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/post.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r24527 r24593 29 29 $ptype = get_post_type_object( $post_data['post_type'] ); 30 30 31 if ( $update && ! current_user_can( $ptype->cap->edit_post, $post_data['ID'] ) ) {31 if ( $update && ! current_user_can( 'edit_post', $post_data['ID'] ) ) { 32 32 if ( 'page' == $post_data['post_type'] ) 33 33 return new WP_Error( 'edit_others_pages', __( 'You are not allowed to edit pages as this user.' ) ); … … 173 173 174 174 $ptype = get_post_type_object($post_data['post_type']); 175 if ( !current_user_can( $ptype->cap->edit_post, $post_ID ) ) {175 if ( !current_user_can( 'edit_post', $post_ID ) ) { 176 176 if ( 'page' == $post_data['post_type'] ) 177 177 wp_die( __('You are not allowed to edit this page.' )); … … 375 375 $post_type_object = get_post_type_object( get_post_type( $post_ID ) ); 376 376 377 if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( $post_type_object->cap->edit_post, $post_ID ) ) {377 if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( 'edit_post', $post_ID ) ) { 378 378 $skipped[] = $post_ID; 379 379 continue;
Note: See TracChangeset
for help on using the changeset viewer.