A WordPress-centric search engine for devs and theme authors



get_available_post_statuses ›

Since2.5.0
Deprecatedn/a
get_available_post_statuses ( $type = 'post' )
Parameters:
  • (string) $type The post_type you want the statuses for
    Required: No
    Default: 'post'
Returns:
  • (array) As array of all the statuses for the supplied post type
Defined at:
Codex:

Get all the possible statuses for a post_type



Source

function get_available_post_statuses( $type = 'post' ) {
	$stati = wp_count_posts( $type );

	return array_keys( get_object_vars( $stati ) );
}