Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

register_post_status()

3 tags 1 category

register_post_status() — Registers a post status. Do not use before init. A simple function for creating or modifying a post status based on the parameters given. The function will accept an array (second optional parameter), along with a string for the post status name. Arguments prefixed with an _underscore shouldn’t be used by plugins and themes.

Inputs: $post_status (string): Name of the post status. $args (array|string): Optional. Array or string of post status arguments. Field $label (bool|string): A descriptive name for the post status marked for translation. Defaults to value of $post_status. Field $label_count (array|false): Nooped plural text from _n_noop() to provide the singular and plural forms of the label for counts. Default false which means the $label argument will be used for both the singular and plural forms of this label. Field $exclude_from_search (bool): Whether to exclude posts with this post status from search results. Default is value of $internal. Field $_builtin (bool): Whether the status is built-in. Core-use only. Default false.

Returns: The registered post-status object, containing the configured status name and arguments.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…