首页 WordPress函数大全 register_post_status()

register_post_status()

2020-05-02 / 4008阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

register_post_status( string $post_status, array|string $args = array() )

注册职位状态。请勿在初始化之前使用。

描述

创建或修改帖子状态的简单功能

参数

$post_status

(string)
(Required)
Name of the post status.

$args

(array|string)
(Optional)
Array or string of post status arguments.

  • 'label'
    (bool|string) A descriptive name for the post status marked for translation. Defaults to value of $post_status.
  • 'label_count'
    (bool|array) Descriptive text to use for nooped plurals. Default array of $label, twice.
  • 'exclude_from_search'
    (bool) Whether to exclude posts with this post status from search results. Default is value of $internal.
  • '_builtin'
    (bool) Whether the status is built-in. Core-use>Default value: array()

返回

(object)

大家谈论
    我的见解