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:
parent
5e6ced774e
commit
b1eccdd12d
@ -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