REST API: Merge "not allowed to create new terms" permission error message with an existing string.
Follow-up to [39309], [39313]. See #38857. git-svn-id: https://develop.svn.wordpress.org/trunk@47166 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4e6674c48c
commit
78029013d8
@ -408,7 +408,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
|
|||||||
&& ! current_user_can( $taxonomy_obj->cap->assign_terms ) ) ) {
|
&& ! current_user_can( $taxonomy_obj->cap->assign_terms ) ) ) {
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'rest_cannot_create',
|
'rest_cannot_create',
|
||||||
__( 'Sorry, you are not allowed to create new terms.' ),
|
__( 'Sorry, you are not allowed to create terms in this taxonomy.' ),
|
||||||
array( 'status' => rest_authorization_required_code() )
|
array( 'status' => rest_authorization_required_code() )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user