Add xmlrpc methods to discover the valid post and page statuses. See #5569 props josephscott.

git-svn-id: https://develop.svn.wordpress.org/trunk@6594 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2008-01-10 21:46:25 +00:00
parent 484a39a5b0
commit af929c5525
2 changed files with 135 additions and 0 deletions
+45
View File
@@ -260,6 +260,51 @@ function get_post_status($ID = '') {
return false;
}
/**
* get_post_statuses( ) - Retuns the possible user post status values
*
* Posts have a limited set of valid status values, this provides the
* post_status values and descriptions.
*
* @package WordPress
* @subpackage Post
* @since 2.4
*
* @return array
*/
function get_post_statuses( ) {
$status = array(
'draft' => __('Draft'),
'pending' => __('Pending Review'),
'private' => __('Private'),
'publish' => __('Published')
);
return $status;
}
/**
* get_page_statuses( ) - Retuns the possible user page status values
*
* Pages have a limited set of valid status values, this provides the
* post_status values and descriptions.
*
* @package WordPress
* @subpackage Page
* @since 2.4
*
* @return array
*/
function get_page_statuses( ) {
$status = array(
'draft' => __('Draft'),
'private' => __('Private'),
'publish' => __('Published')
);
return $status;
}
/**
* get_post_type() - Returns post type
*