WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get post stati

This article is marked as in need of editing. You can help Codex by editing it.

Description

Returns an array of post status names or objects.

Usage

<?php get_post_stati$args$output$operator ); ?>

Parameters

See wp_filter_object_list() for specific arguments list.

$args
(array/string) (optional) Array of key => value pairs used to filter results
Default: array()
$output
(string) (optional) Whether to output 'names' or 'objects'.
Default: 'names'
$operator
(string) (optional) Whether to return statuses matching ALL ('and') or ANY ('or') arguments.
Default: 'and'

Return Values

An array of post names or objects, depending on $output parameter.

Note: The return value is the $wp_post_statuses global passed through wp_filter_object_list() with parameters passed to the function.

Change Log

  • Since: 3.0.0

Source File

get_post_stati() is located in wp-includes/post.php.

Related

get_post_status(), get_post_statuses, get_post_status_object(), register_post_status()

See also index of Function Reference and index of Template Tags.