get_available_post_statuses()

最后更新于:2021-11-26 05:17:20

get_available_post_statuses( string$type=’post’)

Get all the possible statuses for a post_type

参数

$type

(string) (Optional) The post_type you want the statuses for.

Default value: ‘post’

响应

(string[]) An array of all the statuses for the supplied post type.

源文件

文件: gc-admin/includes/post.php

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

	return array_keys( get_object_vars( $stati ) );
}