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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Rachel Baker 2016-12-29 18:45:40 +00:00
parent 158f302112
commit c6f8182eb0
2 changed files with 6 additions and 6 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 ) ) {

View File

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