mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
c8aeb477bc
commit
03b604d309
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user