WordPress.org

Make WordPress Core

Changeset 39648


Ignore:
Timestamp:
12/29/16 18:44:59 (4 months ago)
Author:
rachelbaker
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r39621 r39648  
    322322 
    323323        if ( ! $term || $term->taxonomy !== $this->taxonomy ) { 
    324             return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) ); 
     324            return new WP_Error( 'rest_term_invalid', __( 'Term does not exist.' ), array( 'status' => 404 ) ); 
    325325        } 
    326326 
     
    375375 
    376376            if ( ! $parent ) { 
    377                 return new WP_Error( 'rest_term_invalid', __( "Parent term doesn't exist." ), array( 'status' => 400 ) ); 
     377                return new WP_Error( 'rest_term_invalid', __( 'Parent term does not exist.' ), array( 'status' => 400 ) ); 
    378378            } 
    379379        } 
     
    454454 
    455455        if ( ! $term ) { 
    456             return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) ); 
     456            return new WP_Error( 'rest_term_invalid', __( 'Term does not exist.' ), array( 'status' => 404 ) ); 
    457457        } 
    458458 
     
    482482 
    483483            if ( ! $parent ) { 
    484                 return new WP_Error( 'rest_term_invalid', __( "Parent term doesn't exist." ), array( 'status' => 400 ) ); 
     484                return new WP_Error( 'rest_term_invalid', __( 'Parent term does not exist.' ), array( 'status' => 400 ) ); 
    485485            } 
    486486        } 
     
    543543 
    544544        if ( ! $term ) { 
    545             return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) ); 
     545            return new WP_Error( 'rest_term_invalid', __( 'Term does not exist.' ), array( 'status' => 404 ) ); 
    546546        } 
    547547 
Note: See TracChangeset for help on using the changeset viewer.