From aed692cddd8f99fa6f4babea133d3a28fc389a7e Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Sat, 3 Dec 2016 04:43:21 +0000 Subject: [PATCH] REST API: Use the correct error message when editing a single term. Merges [39460] to the 4.7 branch. Props ramiy, johnbillion. Fixes #39017. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39461 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/endpoints/class-wp-rest-terms-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index d59fda46fb..130fe3d024 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -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;