Changeset 22908 for trunk/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 11/28/2012 10:28:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r22622 r22908 1017 1017 return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); 1018 1018 } else { 1019 if ( ! current_user_can( $post_type->cap-> edit_posts ) )1019 if ( ! current_user_can( $post_type->cap->create_posts ) || ! current_user_can( $post_type->cap->edit_posts ) ) 1020 1020 return new IXR_Error( 401, __( 'Sorry, you are not allowed to post on this site.' ) ); 1021 1021 } … … 3929 3929 3930 3930 $cap = ($publish) ? 'publish_posts' : 'edit_posts'; 3931 if ( ! current_user_can($cap) )3931 if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) || !current_user_can($cap) ) 3932 3932 return new IXR_Error(401, __('Sorry, you are not allowed to post on this site.')); 3933 3933 … … 4144 4144 } 4145 4145 4146 if ( ! current_user_can( get_post_type_object( $post_type )->cap->create_posts ) ) 4147 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts on this site.' ) ); 4146 4148 if ( !current_user_can( $cap ) ) 4147 4149 return new IXR_Error( 401, $error_message );
Note: See TracChangeset
for help on using the changeset viewer.