Changeset 21137
- Timestamp:
- 06/26/2012 07:04:10 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r20996 r21137 1338 1338 1339 1339 $post_type = get_post_type_object( $post['post_type'] ); 1340 if ( ! current_user_can( $post_type->cap->edit_post s, $post_id ) )1340 if ( ! current_user_can( $post_type->cap->edit_post, $post_id ) ) 1341 1341 return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) ); 1342 1342 … … 1395 1395 if ( ! ( (bool) $post_type ) ) 1396 1396 return new IXR_Error( 403, __( 'The post type specified is not valid' ) ); 1397 1398 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 1399 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type' )); 1400 1401 $query['post_type'] = $filter['post_type']; 1402 } 1397 } else { 1398 $post_type = get_post_type_object( 'post' ); 1399 } 1400 1401 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 1402 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type' )); 1403 1404 $query['post_type'] = $post_type->name; 1403 1405 1404 1406 if ( isset( $filter['post_status'] ) ) … … 1428 1430 foreach ( $posts_list as $post ) { 1429 1431 $post_type = get_post_type_object( $post['post_type'] ); 1430 if ( ! current_user_can( $post_type->cap->edit_post s, $post['ID'] ) )1432 if ( ! current_user_can( $post_type->cap->edit_post, $post['ID'] ) ) 1431 1433 continue; 1432 1434
Note: See TracChangeset
for help on using the changeset viewer.