REST API: Merge similiar error message strings in the Terms Controller.

Replaces the "doesn't" contraction with "does not" to be consistent with similar strings in `WP_Error` messages when a specified term or parent term is missing in `WP_REST_Terms_Controller`.

Props ramiy, ocean90.
Fixes #39176.


git-svn-id: https://develop.svn.wordpress.org/trunk@39648 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Rachel Baker 2016-12-29 18:44:59 +00:00
parent fa3f97449e
commit 70085bd944
1 changed files with 5 additions and 5 deletions

View File

@ -321,7 +321,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
$term = get_term( (int) $request['id'], $this->taxonomy );
if ( ! $term || $term->taxonomy !== $this->taxonomy ) {
return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) );
return new WP_Error( 'rest_term_invalid', __( 'Term does not exist.' ), array( 'status' => 404 ) );
}
if ( is_wp_error( $term ) ) {
@ -374,7 +374,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
$parent = get_term( (int) $request['parent'], $this->taxonomy );
if ( ! $parent ) {
return new WP_Error( 'rest_term_invalid', __( "Parent term doesn't exist." ), array( 'status' => 400 ) );
return new WP_Error( 'rest_term_invalid', __( 'Parent term does not exist.' ), array( 'status' => 400 ) );
}
}
@ -453,7 +453,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
$term = get_term( (int) $request['id'], $this->taxonomy );
if ( ! $term ) {
return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) );
return new WP_Error( 'rest_term_invalid', __( 'Term does not exist.' ), array( 'status' => 404 ) );
}
if ( ! current_user_can( 'edit_term', $term->term_id ) ) {
@ -481,7 +481,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
$parent = get_term( (int) $request['parent'], $this->taxonomy );
if ( ! $parent ) {
return new WP_Error( 'rest_term_invalid', __( "Parent term doesn't exist." ), array( 'status' => 400 ) );
return new WP_Error( 'rest_term_invalid', __( 'Parent term does not exist.' ), array( 'status' => 400 ) );
}
}
@ -542,7 +542,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
$term = get_term( (int) $request['id'], $this->taxonomy );
if ( ! $term ) {
return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) );
return new WP_Error( 'rest_term_invalid', __( 'Term does not exist.' ), array( 'status' => 404 ) );
}
if ( ! current_user_can( 'delete_term', $term->term_id ) ) {