wpseek.com
A WordPress-centric search engine for devs and theme authors



get_post_statuses › WordPress Function

Since2.5.0
Deprecatedn/a
get_post_statuses ( No parameters )
Returns:
  • (string[]) Array of post status labels keyed by their status.
Defined at:
Codex:

Retrieves 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;
}