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:
Ryan Boren 2012-11-05 14:44:25 +00:00
parent 53c0024945
commit cf596d4979

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