mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 13:20:20 +00:00
REST API: Unify permission error messages.
Props ramiy. Fixes #38803. git-svn-id: https://develop.svn.wordpress.org/trunk@39257 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -78,7 +78,7 @@ class WP_REST_Post_Statuses_Controller extends WP_REST_Controller {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return new WP_Error( 'rest_cannot_view', __( 'Sorry, you cannot view this resource with edit context.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to view this resource with edit context.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user