get_page_statuses

Retrieve all of the WordPress support page statuses.

Description

(array) get_page_statuses(); 

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

Returns (array)

List of page statuses.


Usage

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

Defined (1)

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

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