Make WordPress Core

Changeset 38076


Ignore:
Timestamp:
07/17/2016 04:04:50 PM (8 years ago)
Author:
SergeyBiryukov
Message:

I18N: Combine two duplicate "Invalid post type" strings.

Props @ramiy.
See #18218.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit.php

    r37914 r38076  
    1111
    1212if ( ! $typenow )
    13     wp_die( __( 'Invalid post type' ) );
     13    wp_die( __( 'Invalid post type.' ) );
    1414
    1515if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
     
    3333
    3434if ( ! $post_type_object )
    35     wp_die( __( 'Invalid post type' ) );
     35    wp_die( __( 'Invalid post type.' ) );
    3636
    3737if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
  • trunk/src/wp-admin/post-new.php

    r37914 r38076  
    2222    $post_type = $_GET['post_type'];
    2323} else {
    24     wp_die( __('Invalid post type') );
     24    wp_die( __( 'Invalid post type.' ) );
    2525}
    2626$post_type_object = get_post_type_object( $post_type );
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r38051 r38076  
    13031303        $post_type = get_post_type_object( $post_data['post_type'] );
    13041304        if ( ! $post_type )
    1305             return new IXR_Error( 403, __( 'Invalid post type' ) );
     1305            return new IXR_Error( 403, __( 'Invalid post type.' ) );
    13061306
    13071307        $update = ! empty( $post_data['ID'] );
     
    40994099
    41004100        if ( ! post_type_exists( $post_type_name ) )
    4101             return new IXR_Error( 403, __( 'Invalid post type' ) );
     4101            return new IXR_Error( 403, __( 'Invalid post type.' ) );
    41024102
    41034103        $post_type = get_post_type_object( $post_type_name );
     
    48584858            } else {
    48594859                // No other post_type values are allowed here
    4860                 return new IXR_Error( 401, __( 'Invalid post type' ) );
     4860                return new IXR_Error( 401, __( 'Invalid post type.' ) );
    48614861            }
    48624862        } else {
     
    49164916                    break;
    49174917                default:
    4918                     return new IXR_Error( 401, __( 'Invalid post type' ) );
     4918                    return new IXR_Error( 401, __( 'Invalid post type.' ) );
    49194919            }
    49204920            $author = get_userdata( $content_struct['wp_author_id'] );
     
    51945194        // Use wp.editPost to edit post types other than post and page.
    51955195        if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) )
    5196             return new IXR_Error( 401, __( 'Invalid post type' ) );
     5196            return new IXR_Error( 401, __( 'Invalid post type.' ) );
    51975197
    51985198        // Thwart attempt to change the post type.
     
    52585258                        break;
    52595259                    default:
    5260                         return new IXR_Error( 401, __( 'Invalid post type' ) );
     5260                        return new IXR_Error( 401, __( 'Invalid post type.' ) );
    52615261                }
    52625262                $post_author = $content_struct['wp_author_id'];
  • trunk/src/wp-includes/post.php

    r38068 r38076  
    10701070
    10711071    if ( ! post_type_exists( $post_type ) ) {
    1072         return new WP_Error( 'invalid_post_type', __( 'Invalid post type' ) );
     1072        return new WP_Error( 'invalid_post_type', __( 'Invalid post type.' ) );
    10731073    }
    10741074
Note: See TracChangeset for help on using the changeset viewer.