Core Function
View Source on Trac ↗ get_post_stati()
get_post_stati( mixed $args = array(), mixed $output = 'names', mixed $operator = 'and' ) Gets a list of post statuses.
Parameters 2 required
| Name / Type | Description |
|---|---|
| mixed | (array | string) $args Optional. Array or string of post status arguments to compare against properties of the global `$wp_post_statuses objects`. Default empty array. Required |
| $output string | Optional. The type of output to return, either 'names' or 'objects'. Default 'names'. |
| string | $operator Optional. The logical operation to perform. 'or' means only one element from the array needs to match; 'and' means all elements must match. Default 'and'. Required |
Return Value
((string[])
| stdClass[]) A list of post status names or objects.
Function Information
Since Version
3.0.0
Source File
wp-includes/post.php
Advertisement