Combine some strings. props pavelevap. fixes #21087.

git-svn-id: https://develop.svn.wordpress.org/trunk@21857 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-15 19:57:05 +00:00
parent eea7a4b8d3
commit afbbc9665a
2 changed files with 7 additions and 7 deletions

View File

@ -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.' )
);
}
}

View File

@ -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'] );