WordPress.org

Make WordPress Core

Changeset 32477


Ignore:
Timestamp:
05/09/2015 09:08:57 PM (5 years ago)
Author:
ocean90
Message:

Merge similar error strings for invalid data.

props pavelevap.
fixes #32329.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r32209 r32477  
    22452245
    22462246        if ( ! $user_data )
    2247             return new IXR_Error( 404, __( 'Invalid user ID' ) );
     2247            return new IXR_Error( 404, __( 'Invalid user ID.' ) );
    22482248
    22492249        return $this->_prepare_user( $user_data, $fields );
     
    38183818
    38193819        if ( ! $post = get_post( $post_id ) )
    3820             return new IXR_Error( 404, __( 'Invalid post ID' ) );
     3820            return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    38213821
    38223822        if ( ! current_user_can( 'edit_post', $post_id ) )
     
    38793879
    38803880        if ( ! $revision = wp_get_post_revision( $revision_id ) )
    3881             return new IXR_Error( 404, __( 'Invalid post ID' ) );
     3881            return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    38823882
    38833883        if ( wp_is_post_autosave( $revision ) )
    3884             return new IXR_Error( 404, __( 'Invalid post ID' ) );
     3884            return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    38853885
    38863886        if ( ! $post = get_post( $revision->post_parent ) )
    3887             return new IXR_Error( 404, __( 'Invalid post ID' ) );
     3887            return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    38883888
    38893889        if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
  • trunk/src/wp-includes/post-formats.php

    r31829 r32477  
    6666
    6767    if ( empty( $post ) )
    68         return new WP_Error( 'invalid_post', __( 'Invalid post' ) );
     68        return new WP_Error( 'invalid_post', __( 'Invalid post.' ) );
    6969
    7070    if ( ! empty( $format ) ) {
  • trunk/src/wp-includes/revision.php

    r30673 r32477  
    261261
    262262    if ( ! $post || empty($post['ID']) )
    263         return new WP_Error( 'invalid_post', __( 'Invalid post ID' ) );
     263        return new WP_Error( 'invalid_post', __( 'Invalid post ID.' ) );
    264264
    265265    if ( isset($post['post_type']) && 'revision' == $post['post_type'] )
Note: See TracChangeset for help on using the changeset viewer.