A WordPress-centric search engine for devs and theme authors



get_post_statuses ›

Since2.5.0
Deprecatedn/a
get_post_statuses ( No parameters )
Returns:
  • (array) List of post statuses.
Defined at:
Codex:

Retrieve all of the WordPress supported post statuses.

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



Source

function get_post_statuses() {
	$status = array(
		'draft'   => __( 'Draft' ),
		'pending' => __( 'Pending Review' ),
		'private' => __( 'Private' ),
		'publish' => __( 'Published' ),
	);

	return $status;
}