From c6f8182eb0c27a0b3f6c3b7751b6d7f80090e080 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Thu, 29 Dec 2016 18:45:40 +0000 Subject: [PATCH] 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 --- .../endpoints/class-wp-rest-terms-controller.php | 10 +++++----- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index b8a1390d37..0bdf2cd5fb 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -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 ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 3e2ebf3dd7..9e0fc913df 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.