Changeset 21857 for trunk/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 09/15/2012 07:57:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r21824 r21857 4056 4056 4057 4057 // If an author id was provided then use it instead. 4058 if ( isset( $content_struct['wp_author_id']) && ($user->ID != $content_struct['wp_author_id']) ) {4058 if ( isset( $content_struct['wp_author_id'] ) && ( $user->ID != $content_struct['wp_author_id'] ) ) { 4059 4059 switch ( $post_type ) { 4060 4060 case "post": 4061 if ( !current_user_can( 'edit_others_posts') )4062 return( new IXR_Error(401, __('You are not allowed to post as this user')));4061 if ( !current_user_can( 'edit_others_posts' ) ) 4062 return( new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) ) ); 4063 4063 break; 4064 4064 case "page": 4065 if ( !current_user_can( 'edit_others_pages') )4066 return( new IXR_Error(401, __('You are not allowed to create pages as this user')));4065 if ( !current_user_can( 'edit_others_pages' ) ) 4066 return( new IXR_Error( 401, __( 'You are not allowed to create pages as this user.' ) ) ); 4067 4067 break; 4068 4068 default: 4069 return( new IXR_Error(401, __('Invalid post type')));4069 return( new IXR_Error( 401, __( 'Invalid post type' ) ) ); 4070 4070 break; 4071 4071 }
Note: See TracChangeset
for help on using the changeset viewer.