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

来源: 老季博客
日期: 2019-3-16
作者: 腾讯云/服务器VPS推荐评测/Vultr
阅读数: 49

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;
}
链接到文章: https://jiloc.com/44831.html

发表回复

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