diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 130edb6cf1..72de1e4fc4 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -62,7 +62,7 @@ function _wp_translate_postdata( $update = false, $post_data = null ) { } else { return new WP_Error( 'edit_others_posts', $update ? __( 'You are not allowed to edit posts as this user.' ) : - __( 'You are not allowed to post as this user.' ) + __( 'You are not allowed to create posts as this user.' ) ); } } diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 222810cefc..1af45e6a12 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -4055,18 +4055,18 @@ class wp_xmlrpc_server extends IXR_Server { $post_author = $user->ID; // If an author id was provided then use it instead. - if ( isset($content_struct['wp_author_id']) && ($user->ID != $content_struct['wp_author_id']) ) { + if ( isset( $content_struct['wp_author_id'] ) && ( $user->ID != $content_struct['wp_author_id'] ) ) { switch ( $post_type ) { case "post": - if ( !current_user_can('edit_others_posts') ) - return(new IXR_Error(401, __('You are not allowed to post as this user'))); + if ( !current_user_can( 'edit_others_posts' ) ) + return( new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) ) ); break; case "page": - if ( !current_user_can('edit_others_pages') ) - return(new IXR_Error(401, __('You are not allowed to create pages as this user'))); + if ( !current_user_can( 'edit_others_pages' ) ) + return( new IXR_Error( 401, __( 'You are not allowed to create pages as this user.' ) ) ); break; default: - return(new IXR_Error(401, __('Invalid post type'))); + return( new IXR_Error( 401, __( 'Invalid post type' ) ) ); break; } $author = get_userdata( $content_struct['wp_author_id'] );