Better xmlrpc field names. See #5569 props josephscott.
git-svn-id: https://develop.svn.wordpress.org/trunk@6596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
08af1e5ef3
commit
9310d7cc6f
17
xmlrpc.php
17
xmlrpc.php
|
@ -1191,17 +1191,18 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
|
$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
|
||||||
|
|
||||||
$post_status = $publish ? 'publish' : 'draft';
|
$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 'draft':
|
||||||
case 'private':
|
case 'private':
|
||||||
case 'publish':
|
case 'publish':
|
||||||
$post_status = $content_struct['post_status'];
|
$post_status = $content_struct["{$post_type}_status"];
|
||||||
break;
|
break;
|
||||||
case 'pending':
|
case 'pending':
|
||||||
// Pending is only valid for posts, not pages.
|
// Pending is only valid for posts, not pages.
|
||||||
if( $post_type === 'post' ) {
|
if( $post_type === 'post' ) {
|
||||||
$post_status = $content_struct['post_status'];
|
$post_status = $content_struct["{$post_type}_status"];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1510,17 +1511,17 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$post_more = $content_struct['mt_text_more'];
|
$post_more = $content_struct['mt_text_more'];
|
||||||
|
|
||||||
$post_status = $publish ? 'publish' : 'draft';
|
$post_status = $publish ? 'publish' : 'draft';
|
||||||
if( isset( $content_struct['post_status'] ) ) {
|
if( isset( $content_struct["{$post_type}_status"] ) ) {
|
||||||
switch( $content_struct['post_status'] ) {
|
switch( $content_struct["{$post_type}_status"] ) {
|
||||||
case 'draft':
|
case 'draft':
|
||||||
case 'private':
|
case 'private':
|
||||||
case 'publish':
|
case 'publish':
|
||||||
$post_status = $content_struct['post_status'];
|
$post_status = $content_struct["{$post_type}_status"];
|
||||||
break;
|
break;
|
||||||
case 'pending':
|
case 'pending':
|
||||||
// Pending is only valid for posts, not pages.
|
// Pending is only valid for posts, not pages.
|
||||||
if( $post_type === 'post' ) {
|
if( $post_type === 'post' ) {
|
||||||
$post_status = $content_struct['post_status'];
|
$post_status = $content_struct["{$post_type}_status"];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue