From c75a848b4c4a7929140d182d9138ce3bed2f288f Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 10 Jan 2008 22:37:15 +0000 Subject: [PATCH] Better xmlrpc field names. See #5569 props josephscott. git-svn-id: http://svn.automattic.com/wordpress/trunk@6596 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- xmlrpc.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/xmlrpc.php b/xmlrpc.php index 11f39dd9e..b8f9110d4 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -1191,17 +1191,18 @@ class wp_xmlrpc_server extends IXR_Server { $post_content = apply_filters( 'content_save_pre', $content_struct['description'] ); $post_status = $publish ? 'publish' : 'draft'; - if( isset( $content_struct['post_status'] ) ) { - switch( $content_struct['post_status'] ) { + + if( isset( $content_struct["{$post_type}_status"] ) ) { + switch( $content_struct["{$post_type}_status"] ) { case 'draft': case 'private': case 'publish': - $post_status = $content_struct['post_status']; + $post_status = $content_struct["{$post_type}_status"]; break; case 'pending': // Pending is only valid for posts, not pages. if( $post_type === 'post' ) { - $post_status = $content_struct['post_status']; + $post_status = $content_struct["{$post_type}_status"]; } break; default: @@ -1510,17 +1511,17 @@ class wp_xmlrpc_server extends IXR_Server { $post_more = $content_struct['mt_text_more']; $post_status = $publish ? 'publish' : 'draft'; - if( isset( $content_struct['post_status'] ) ) { - switch( $content_struct['post_status'] ) { + if( isset( $content_struct["{$post_type}_status"] ) ) { + switch( $content_struct["{$post_type}_status"] ) { case 'draft': case 'private': case 'publish': - $post_status = $content_struct['post_status']; + $post_status = $content_struct["{$post_type}_status"]; break; case 'pending': // Pending is only valid for posts, not pages. if( $post_type === 'post' ) { - $post_status = $content_struct['post_status']; + $post_status = $content_struct["{$post_type}_status"]; } break; default: