WordPressで記事のステータスを取得したい場合

WordPressの記事は
公開
非公開
下書き
とかいろいろあるが、

while( have_posts() ) : the_post();

というようなループ中で記事のステータスを取得したい場合は

$post_id = get_the_ID();
$post_status = get_post_status( $post_id );

でOK。
これで $post_statusにはpublishとかが入ってくる。

他に考えられるステータスは
'publish’ – a published post or page
'pending’ – post is pending review
'draft’ – a post in draft status
'auto-draft’ – a newly created post, with no content
'future’ – a post to publish in the future
'private’ – not visible to users who are not logged in
'inherit’ – a revision. see get_children.
'trash’ – post is in trashbin. added with Version 2.9.
だそうです。
http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0/query_posts