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



get_post_statuses ›

Since2.5.0
已弃用n/a
get_post_statuses ( 没有参数 )
返回:
  • (array) List of 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.



源码

function get_post_statuses() {
	$status = array(
		'draft'   => __( 'Draft' ),
		'pending' => __( 'Pending Review' ),
		'private' => __( 'Private' ),
		'publish' => __( 'Published' ),
	);

	return $status;
}