mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user