REST API: Use the correct error message when editing a single term.

Props ramiy, johnbillion.
Fixes #39017.


Built from https://develop.svn.wordpress.org/trunk@39460


git-svn-id: http://core.svn.wordpress.org/trunk@39400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2016-12-03 04:42:41 +00:00
parent e8042cfef7
commit f2a4d010cd
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39457';
$wp_version = '4.8-alpha-39460';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.