Combine some strings. props pavelevap. fixes #21087.
git-svn-id: http://core.svn.wordpress.org/trunk@21857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b523c3d597
commit
f431b408da
|
@ -62,7 +62,7 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
|
||||||
} else {
|
} else {
|
||||||
return new WP_Error( 'edit_others_posts', $update ?
|
return new WP_Error( 'edit_others_posts', $update ?
|
||||||
__( 'You are not allowed to edit posts as this user.' ) :
|
__( '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.' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4055,18 +4055,18 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$post_author = $user->ID;
|
$post_author = $user->ID;
|
||||||
|
|
||||||
// If an author id was provided then use it instead.
|
// 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 ) {
|
switch ( $post_type ) {
|
||||||
case "post":
|
case "post":
|
||||||
if ( !current_user_can('edit_others_posts') )
|
if ( !current_user_can( 'edit_others_posts' ) )
|
||||||
return(new IXR_Error(401, __('You are not allowed to post as this user')));
|
return( new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) ) );
|
||||||
break;
|
break;
|
||||||
case "page":
|
case "page":
|
||||||
if ( !current_user_can('edit_others_pages') )
|
if ( !current_user_can( 'edit_others_pages' ) )
|
||||||
return(new IXR_Error(401, __('You are not allowed to create pages as this user')));
|
return( new IXR_Error( 401, __( 'You are not allowed to create pages as this user.' ) ) );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return(new IXR_Error(401, __('Invalid post type')));
|
return( new IXR_Error( 401, __( 'Invalid post type' ) ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$author = get_userdata( $content_struct['wp_author_id'] );
|
$author = get_userdata( $content_struct['wp_author_id'] );
|
||||||
|
|
Loading…
Reference in New Issue