REST API: Unify permission error messages.

Props ramiy.
See #38791, #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@39251 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2016-11-15 20:36:27 +00:00
parent d76017c51e
commit 4230b2a17c
2 changed files with 9 additions and 9 deletions
@@ -177,7 +177,7 @@ abstract class WP_REST_Meta_Fields {
return new WP_Error(
'rest_cannot_delete',
/* translators: %s: custom field key */
sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),
sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ),
array( 'key' => $name, 'status' => rest_authorization_required_code() )
);
}
@@ -212,7 +212,7 @@ abstract class WP_REST_Meta_Fields {
return new WP_Error(
'rest_cannot_update',
/* translators: %s: custom field key */
sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),
sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ),
array( 'key' => $name, 'status' => rest_authorization_required_code() )
);
}
@@ -283,7 +283,7 @@ abstract class WP_REST_Meta_Fields {
return new WP_Error(
'rest_cannot_update',
/* translators: %s: custom field key */
sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),
sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ),
array( 'key' => $name, 'status' => rest_authorization_required_code() )
);
}