Allow Pages to have a status of pending.

Fixes #17000 props mrroundhill, nprasath002


git-svn-id: http://svn.automattic.com/wordpress/trunk@17651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
josephscott 2011-04-18 17:30:58 +00:00
parent c8aeb477bc
commit 03b604d309
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"] ) ) { if ( isset( $content_struct["{$post_type}_status"] ) ) {
switch ( $content_struct["{$post_type}_status"] ) { switch ( $content_struct["{$post_type}_status"] ) {
case 'draft': case 'draft':
case 'pending':
case 'private': case 'private':
case 'publish': case 'publish':
$post_status = $content_struct["{$post_type}_status"]; $post_status = $content_struct["{$post_type}_status"];
break; break;
case 'pending':
// Pending is only valid for posts, not pages.
if ( $post_type === 'post' )
$post_status = $content_struct["{$post_type}_status"];
break;
default: default:
$post_status = $publish ? 'publish' : 'draft'; $post_status = $publish ? 'publish' : 'draft';
break; break;
@ -2670,15 +2666,11 @@ class wp_xmlrpc_server extends IXR_Server {
if ( isset( $content_struct["{$post_type}_status"] ) ) { if ( isset( $content_struct["{$post_type}_status"] ) ) {
switch( $content_struct["{$post_type}_status"] ) { switch( $content_struct["{$post_type}_status"] ) {
case 'draft': case 'draft':
case 'pending':
case 'private': case 'private':
case 'publish': case 'publish':
$post_status = $content_struct["{$post_type}_status"]; $post_status = $content_struct["{$post_type}_status"];
break; break;
case 'pending':
// Pending is only valid for posts, not pages.
if ( $post_type === 'post' )
$post_status = $content_struct["{$post_type}_status"];
break;
default: default:
$post_status = $publish ? 'publish' : 'draft'; $post_status = $publish ? 'publish' : 'draft';
break; break;