WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/10/2008 09:46:25 PM (12 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r6593 r6594  
    259259
    260260    return false;
     261}
     262
     263/**
     264 * get_post_statuses( ) - Retuns the possible user post status values
     265 *
     266 * Posts have a limited set of valid status values, this provides the
     267 * post_status values and descriptions.
     268 *
     269 * @package WordPress
     270 * @subpackage Post
     271 * @since 2.4
     272 *
     273 * @return array
     274 */
     275function get_post_statuses( ) {
     276    $status = array(
     277        'draft'         => __('Draft'),
     278        'pending'       => __('Pending Review'),
     279        'private'       => __('Private'),
     280        'publish'       => __('Published')
     281    );
     282
     283    return $status;
     284}
     285
     286/**
     287 * get_page_statuses( ) - Retuns the possible user page status values
     288 *
     289 * Pages have a limited set of valid status values, this provides the
     290 * post_status values and descriptions.
     291 *
     292 * @package WordPress
     293 * @subpackage Page
     294 * @since 2.4
     295 *
     296 * @return array
     297 */
     298function get_page_statuses( ) {
     299    $status = array(
     300        'draft'         => __('Draft'),
     301        'private'       => __('Private'),
     302        'publish'       => __('Published')
     303    );
     304
     305    return $status;
    261306}
    262307
Note: See TracChangeset for help on using the changeset viewer.