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

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注