get_post_statuses()
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.
No Hooks.
Return
String[]
. Array of post status labels keyed by their status.
Usage
get_post_statuses();
Changelog
Since 2.5.0 | Introduced. |
Code of get_post_statuses() get post statuses WP 5.9.3
function get_post_statuses() { $status = array( 'draft' => __( 'Draft' ), 'pending' => __( 'Pending Review' ), 'private' => __( 'Private' ), 'publish' => __( 'Published' ), ); return $status; }