get_post_statuses()
Retrieve all of the WordPress supported post statuses.
Description Description
Posts have a limited set of valid status values, this provides the post_status values and descriptions.
Return Return
(array) List of post statuses.
Source Source
File: wp-includes/post.php
function get_post_statuses() {
$status = array(
'draft' => __( 'Draft' ),
'pending' => __( 'Pending Review' ),
'private' => __( 'Private' ),
'publish' => __( 'Published' ),
);
return $status;
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Get post statuses.
Output:
Array ( [draft] => Draft [pending] => Pending Review [private] => Private [publish] => Published )