wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_available_post_statuses › WordPress Function

Since2.5.0
已弃用n/a
get_available_post_statuses ( $type = 'post' )
参数:
  • (string) $type The post_type you want the statuses for. Default 'post'.
    Required: No
    默认: 'post'
返回:
  • (string[]) An array of all the statuses for the supplied post type.
定义在:
文档:

Returns all the possible statuses for a post type.



源码

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

	return array_keys( get_object_vars( $stati ) );
}