Allow Pages to have a status of pending.

Fixes #17000 props mrroundhill, nprasath002


git-svn-id: https://develop.svn.wordpress.org/trunk@17651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joseph Scott 2011-04-18 17:30:58 +00:00
parent 0d9e3e95b9
commit 19eed5a750
1 changed files with 2 additions and 10 deletions

View File

@ -2281,15 +2281,11 @@ class wp_xmlrpc_server extends IXR_Server {
if ( isset( $content_struct["{$post_type}_status"] ) ) {
switch ( $content_struct["{$post_type}_status"] ) {
case 'draft':
case 'pending':
case 'private':
case 'publish':
$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_type}_status"];
break;
default:
$post_status = $publish ? 'publish' : 'draft';
break;
@ -2670,15 +2666,11 @@ class wp_xmlrpc_server extends IXR_Server {
if ( isset( $content_struct["{$post_type}_status"] ) ) {
switch( $content_struct["{$post_type}_status"] ) {
case 'draft':
case 'pending':
case 'private':
case 'publish':
$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_type}_status"];
break;
default:
$post_status = $publish ? 'publish' : 'draft';
break;