From 670a00d4b35e5b290f8f6fc10ece54a79dc04d81 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sat, 27 Apr 2013 16:57:55 -0700 Subject: [PATCH] Ensure `wp post list` returns posts of all statuses by default, as WP_Query behaves differently in the WP_ADMIN context. See #412 --- php/commands/post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php/commands/post.php b/php/commands/post.php index 7dec7054..d58f90b8 100644 --- a/php/commands/post.php +++ b/php/commands/post.php @@ -164,7 +164,8 @@ class Post_Command extends \WP_CLI\CommandWithDBObject { */ public function _list( $_, $assoc_args ) { $query_args = array( - 'posts_per_page' => -1 + 'posts_per_page' => -1, + 'post_status' => 'any', ); if ( ! empty( $assoc_args['format'] ) ) { -- 2.11.0