get_post_statuses

函数


get_post_statuses ( No parameters )
返回值
  • (string[]) Array of post status labels keyed by their status.
定义位置
  • wp-includes/post.php
    , line 1192
引入
2.5.0
弃用

Retrieves 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;
}