get_available_post_statuses() – Get all the possible statuses for a post_type
You appear to be a bot. Output may be restricted
Description
Returns all the possible statuses for a post type.
Usage
$string[] = get_available_post_statuses( $type );
Parameters
- $type
- ( string ) optional default: post – The post_type you want the statuses for. Default 'post'.
Returns
string[] An array of all the statuses for the supplied post type.
Source
File name: wordpress/wp-admin/includes/post.php
Lines:
1 to 5 of 5
function get_available_post_statuses( $type = 'post' ) { $stati = wp_count_posts( $type ); return array_keys( get_object_vars( $stati ) ); }