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:

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.

Related Functions

get_post_statuses, get_post_states, get_post_stati, get_post_status_object, _post_states

Top Google Results

User discussions

wpseek mobile