OSDN Git Service

add post_status to `wp post list` output
authorscribu <mail@scribu.net>
Mon, 29 Apr 2013 11:45:00 +0000 (14:45 +0300)
committerscribu <mail@scribu.net>
Mon, 29 Apr 2013 11:45:02 +0000 (14:45 +0300)
php/commands/post.php

index d58f90b..a1b3aa6 100644 (file)
@@ -187,7 +187,7 @@ class Post_Command extends \WP_CLI\CommandWithDBObject {
 
                $query = new WP_Query( $query_args );
 
-               $fields = array( 'ID', 'post_title', 'post_name', 'post_date' );
+               $fields = array( 'ID', 'post_title', 'post_name', 'post_date', 'post_status' );
 
                $output_posts = $query->posts;