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

Props @ramiy.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38076


git-svn-id: http://core.svn.wordpress.org/trunk@38017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-07-17 16:05:31 +00:00
parent d5cb80dd7f
commit 866bd39813
5 changed files with 11 additions and 11 deletions

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' ); require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! $typenow ) if ( ! $typenow )
wp_die( __( 'Invalid post type' ) ); wp_die( __( 'Invalid post type.' ) );
if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) { if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) ); wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
@ -32,7 +32,7 @@ $post_type = $typenow;
$post_type_object = get_post_type_object( $post_type ); $post_type_object = get_post_type_object( $post_type );
if ( ! $post_type_object ) if ( ! $post_type_object )
wp_die( __( 'Invalid post type' ) ); wp_die( __( 'Invalid post type.' ) );
if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) { if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
wp_die( wp_die(

View File

@ -21,7 +21,7 @@ if ( ! isset( $_GET['post_type'] ) ) {
} elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) { } elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) {
$post_type = $_GET['post_type']; $post_type = $_GET['post_type'];
} else { } else {
wp_die( __('Invalid post type') ); wp_die( __( 'Invalid post type.' ) );
} }
$post_type_object = get_post_type_object( $post_type ); $post_type_object = get_post_type_object( $post_type );

View File

@ -1302,7 +1302,7 @@ class wp_xmlrpc_server extends IXR_Server {
$post_type = get_post_type_object( $post_data['post_type'] ); $post_type = get_post_type_object( $post_data['post_type'] );
if ( ! $post_type ) if ( ! $post_type )
return new IXR_Error( 403, __( 'Invalid post type' ) ); return new IXR_Error( 403, __( 'Invalid post type.' ) );
$update = ! empty( $post_data['ID'] ); $update = ! empty( $post_data['ID'] );
@ -4098,7 +4098,7 @@ class wp_xmlrpc_server extends IXR_Server {
do_action( 'xmlrpc_call', 'wp.getPostType' ); do_action( 'xmlrpc_call', 'wp.getPostType' );
if ( ! post_type_exists( $post_type_name ) ) if ( ! post_type_exists( $post_type_name ) )
return new IXR_Error( 403, __( 'Invalid post type' ) ); return new IXR_Error( 403, __( 'Invalid post type.' ) );
$post_type = get_post_type_object( $post_type_name ); $post_type = get_post_type_object( $post_type_name );
@ -4857,7 +4857,7 @@ class wp_xmlrpc_server extends IXR_Server {
$post_type = 'post'; $post_type = 'post';
} else { } else {
// No other post_type values are allowed here // No other post_type values are allowed here
return new IXR_Error( 401, __( 'Invalid post type' ) ); return new IXR_Error( 401, __( 'Invalid post type.' ) );
} }
} else { } else {
if ( $publish ) if ( $publish )
@ -4915,7 +4915,7 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error( 401, __( 'Sorry, you are not allowed to create pages as this user.' ) ); return new IXR_Error( 401, __( 'Sorry, you are not allowed to create pages as this user.' ) );
break; break;
default: default:
return new IXR_Error( 401, __( 'Invalid post type' ) ); return new IXR_Error( 401, __( 'Invalid post type.' ) );
} }
$author = get_userdata( $content_struct['wp_author_id'] ); $author = get_userdata( $content_struct['wp_author_id'] );
if ( ! $author ) if ( ! $author )
@ -5193,7 +5193,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Use wp.editPost to edit post types other than post and page. // Use wp.editPost to edit post types other than post and page.
if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) ) if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) )
return new IXR_Error( 401, __( 'Invalid post type' ) ); return new IXR_Error( 401, __( 'Invalid post type.' ) );
// Thwart attempt to change the post type. // Thwart attempt to change the post type.
if ( ! empty( $content_struct[ 'post_type' ] ) && ( $content_struct['post_type'] != $postdata[ 'post_type' ] ) ) if ( ! empty( $content_struct[ 'post_type' ] ) && ( $content_struct['post_type'] != $postdata[ 'post_type' ] ) )
@ -5257,7 +5257,7 @@ class wp_xmlrpc_server extends IXR_Server {
} }
break; break;
default: default:
return new IXR_Error( 401, __( 'Invalid post type' ) ); return new IXR_Error( 401, __( 'Invalid post type.' ) );
} }
$post_author = $content_struct['wp_author_id']; $post_author = $content_struct['wp_author_id'];
} }

View File

@ -1069,7 +1069,7 @@ function unregister_post_type( $post_type ) {
global $wp_post_types; global $wp_post_types;
if ( ! post_type_exists( $post_type ) ) { if ( ! post_type_exists( $post_type ) ) {
return new WP_Error( 'invalid_post_type', __( 'Invalid post type' ) ); return new WP_Error( 'invalid_post_type', __( 'Invalid post type.' ) );
} }
$post_type_object = get_post_type_object( $post_type ); $post_type_object = get_post_type_object( $post_type );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.6-beta3-38075'; $wp_version = '4.6-beta3-38076';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.