XML-RPC: Unify permission error messages in wp_xmlrpc_server
.
Props ramiy. Fixes #42266. git-svn-id: https://develop.svn.wordpress.org/trunk@42764 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c896326c55
commit
3f7b3865f4
@ -3920,7 +3920,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'publish_posts' ) ) {
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
|
||||
}
|
||||
|
||||
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
|
||||
@ -3961,7 +3961,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_post', $post_id ) ) {
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details of this post.' ) );
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details of this post.' ) );
|
||||
}
|
||||
|
||||
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
|
||||
@ -4002,7 +4002,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_posts' ) ) {
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
|
||||
}
|
||||
|
||||
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
|
||||
@ -4036,7 +4036,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_pages' ) ) {
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
|
||||
}
|
||||
|
||||
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
|
||||
@ -4070,7 +4070,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_pages' ) ) {
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
|
||||
}
|
||||
|
||||
$templates = get_page_templates();
|
||||
@ -4331,7 +4331,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_posts' ) ) {
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
|
||||
return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
|
||||
}
|
||||
|
||||
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
|
||||
|
Loading…
Reference in New Issue
Block a user