Make WordPress Core


Ignore:
Timestamp:
11/17/2016 03:52:18 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.

Props ramiy, SergeyBiryukov.
Fixes #38808.

File:
1 edited

Legend:

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

    r39266 r39278  
    388388
    389389        if ( ! current_user_can( 'create_users' ) ) {
    390             return new WP_Error( 'rest_cannot_create_user', __( 'Sorry, you are not allowed to create resource.' ), array( 'status' => rest_authorization_required_code() ) );
     390            return new WP_Error( 'rest_cannot_create_user', __( 'Sorry, you are not allowed to create new resource.' ), array( 'status' => rest_authorization_required_code() ) );
    391391        }
    392392
     
    544544
    545545        if ( email_exists( $request['email'] ) && $request['email'] !== $user->user_email ) {
    546             return new WP_Error( 'rest_user_invalid_email', __( 'Email address is invalid.' ), array( 'status' => 400 ) );
     546            return new WP_Error( 'rest_user_invalid_email', __( 'Invalid email address.' ), array( 'status' => 400 ) );
    547547        }
    548548
     
    552552
    553553        if ( ! empty( $request['slug'] ) && $request['slug'] !== $user->user_nicename && get_user_by( 'slug', $request['slug'] ) ) {
    554             return new WP_Error( 'rest_user_invalid_slug', __( 'Slug is invalid.' ), array( 'status' => 400 ) );
     554            return new WP_Error( 'rest_user_invalid_slug', __( 'Invalid slug.' ), array( 'status' => 400 ) );
    555555        }
    556556
     
    11401140                ),
    11411141                'link'        => array(
    1142                     'description' => __( 'Author URL to the resource.' ),
     1142                    'description' => __( 'Author URL of the resource.' ),
    11431143                    'type'        => 'string',
    11441144                    'format'      => 'uri',
Note: See TracChangeset for help on using the changeset viewer.