mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 20:15:08 +00:00
REST API: Use the correct error message when editing a single term.
Merges [39460] to the 4.7 branch. Props ramiy, johnbillion. Fixes #39017. Built from https://develop.svn.wordpress.org/branches/4.7@39461 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b41001d4a1
commit
250f92a59e
@ -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;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-RC1-39459';
|
||||
$wp_version = '4.7-RC1-39461';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user