wpseek.com
A WordPress-centric search engine for devs and theme authors



get_post_status_object › WordPress Function

Since3.0.0
Deprecatedn/a
get_post_status_object ( $post_status )
Parameters:
  • (string) $post_status The name of a registered post status.
    Required: Yes
See:
Returns:
  • (stdClass|null) A post status object.
Defined at:
Codex:

Retrieves a post status object by name.



Source

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 ];
}