mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
I18N: Combine two duplicate "Invalid post type" strings.
Props @ramiy. See #18218. git-svn-id: https://develop.svn.wordpress.org/trunk@38076 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
||||
if ( ! $typenow )
|
||||
wp_die( __( 'Invalid post type' ) );
|
||||
wp_die( __( 'Invalid post type.' ) );
|
||||
|
||||
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.' ) );
|
||||
@@ -32,7 +32,7 @@ $post_type = $typenow;
|
||||
$post_type_object = get_post_type_object( $post_type );
|
||||
|
||||
if ( ! $post_type_object )
|
||||
wp_die( __( 'Invalid post type' ) );
|
||||
wp_die( __( 'Invalid post type.' ) );
|
||||
|
||||
if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
|
||||
wp_die(
|
||||
|
||||
@@ -21,7 +21,7 @@ if ( ! isset( $_GET['post_type'] ) ) {
|
||||
} elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) {
|
||||
$post_type = $_GET['post_type'];
|
||||
} else {
|
||||
wp_die( __('Invalid post type') );
|
||||
wp_die( __( 'Invalid post type.' ) );
|
||||
}
|
||||
$post_type_object = get_post_type_object( $post_type );
|
||||
|
||||
|
||||
@@ -1302,7 +1302,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
|
||||
$post_type = get_post_type_object( $post_data['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'] );
|
||||
|
||||
@@ -4098,7 +4098,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
do_action( 'xmlrpc_call', 'wp.getPostType' );
|
||||
|
||||
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 );
|
||||
|
||||
@@ -4857,7 +4857,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$post_type = 'post';
|
||||
} else {
|
||||
// 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 {
|
||||
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.' ) );
|
||||
break;
|
||||
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'] );
|
||||
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.
|
||||
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.
|
||||
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;
|
||||
default:
|
||||
return new IXR_Error( 401, __( 'Invalid post type' ) );
|
||||
return new IXR_Error( 401, __( 'Invalid post type.' ) );
|
||||
}
|
||||
$post_author = $content_struct['wp_author_id'];
|
||||
}
|
||||
|
||||
@@ -1069,7 +1069,7 @@ function unregister_post_type( $post_type ) {
|
||||
global $wp_post_types;
|
||||
|
||||
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 );
|
||||
|
||||
Reference in New Issue
Block a user