REST API: Unify permission error messages.

Props ramiy.
See #38791, #34521.
Built from https://develop.svn.wordpress.org/trunk@39251


git-svn-id: http://core.svn.wordpress.org/trunk@39191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2016-11-15 20:37:32 +00:00
parent d049f72459
commit cc14606094
3 changed files with 10 additions and 10 deletions

View File

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