REST API: Use the correct error message when editing a single term.
Props ramiy, johnbillion. Fixes #39017. git-svn-id: https://develop.svn.wordpress.org/trunk@39460 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f82946ab4a
commit
8e34471a11
@ -457,7 +457,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_term', $term->term_id ) ) {
|
||||
return new WP_Error( 'rest_cannot_update', __( 'Sorry, you are not allowed to edit terms.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
return new WP_Error( 'rest_cannot_update', __( 'Sorry, you are not allowed to edit this term.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user