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: https://develop.svn.wordpress.org/trunk@22368 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-11-05 14:44:25 +00:00
parent 5e6ced774e
commit b1eccdd12d
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}