get_post_status
get_post_status ( $post = null )
Parameters:- (int|WP_Post) post Optional. Post ID or post object. Defaults to global $post.
Returns:- (string|false) Post status on success, false on failure.
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Retrieves the post status based on the post ID.If the post ID is of an attachment, then the parent post status will be given
instead.