mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
In wp_xmlrpc_server::_insert_post(), preservea valid post status instead of overwriting it with 'draft'. This preserves the 'inherit' status of attachments. Props markoheijnen. fixes #22335
git-svn-id: http://core.svn.wordpress.org/trunk@22368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
53c0024945
commit
cf596d4979
@ -1034,7 +1034,8 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ) );
|
||||
break;
|
||||
default:
|
||||
$post_data['post_status'] = 'draft';
|
||||
if ( ! get_post_status_object( $post_data['post_status'] ) )
|
||||
$post_data['post_status'] = 'draft';
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user