W3cubDocs

/WordPress

get_post_statuses()

Retrieve all of the WordPress supported post statuses.

Description

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

Return

(array) List of post statuses.

Source

File: wp-includes/post.php

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

	return $status;
}

Changelog

Version Description
2.5.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_post_statuses