get_post_statuses

Retrieve all of the WordPress supported post statuses.

Description

(array) get_post_statuses(); 

Posts have a limited set of valid status values, this provides the post_status values and descriptions.

Returns (array)

List of post statuses.


Usage

  1. if ( !function_exists( 'get_post_statuses' ) ) { 
  2. require_once ABSPATH . WPINC . '/post.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_post_statuses(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/post.php  
  1. function get_post_statuses() { 
  2. $status = array( 
  3. 'draft' => __( 'Draft' ),  
  4. 'pending' => __( 'Pending Review' ),  
  5. 'private' => __( 'Private' ),  
  6. 'publish' => __( 'Published' ) 
  7. ); 
  8.  
  9. return $status;