get_post_status_object( string $post_status )
Retrieves a post status object by name.
Description
See also
Parameters
- $post_status
-
(Required) The name of a registered post status.
Return
(stdClass|null) A post status object.
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];
}
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |