get_post_status_object() – Retrieve a post status object by name.

You appear to be a bot. Output may be restricted

Description

Retrieve a post status object by name.

Usage

$stdClass|null = get_post_status_object( $post_status );

Parameters

$post_status
( string ) required – The name of a registered post status.

Returns

stdClass|null A post status object.

Source

File name: wordpress/wp-includes/post.php
Lines:

1 to 9 of 9
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 ];
}
 

 View on GitHub View on Trac