WordPress 函数 :get_post_statuses 检索所有文章帖子状态值

get_post_statuses()

Retrieve all of the WordPress supported post statuses.检索所有WordPress支持的文章帖子状态。

函数存在文件位置File: wp-includes/post.php 。函数方法如下:

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