get_post_status_object( string $post_status )
Retrieve a post status object by name.
Contents
Description Description
See also See also
Parameters Parameters
- $post_status
-
(string) (Required) The name of a registered post status.
Return Return
(object|null) A post status object.
Source Source
File: wp-includes/post.php
function get_post_status_object( $post_status ) {
global $wp_post_statuses;
if ( empty( $wp_post_statuses[ $post_status ] ) ) {
return null;
}
return $wp_post_statuses[ $post_status ];
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |