From 6407c573c411f9dd283d0274a28bd453ebcec8f6 Mon Sep 17 00:00:00 2001 From: Pieter Daalder Date: Fri, 18 Jun 2021 22:48:29 +0200 Subject: [PATCH 1/2] Clarified behavior in favor of a fix for #298 --- src/Post_Command.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Post_Command.php b/src/Post_Command.php index d4a7a17d6..89387eb17 100644 --- a/src/Post_Command.php +++ b/src/Post_Command.php @@ -504,8 +504,8 @@ protected function delete_callback( $post_id, $assoc_args ) { /** * Gets a list of posts. * - * Display posts based on all arguments supported by - * [WP_Query()](https://developer.wordpress.org/reference/classes/wp_query/). + * Display posts based on all arguments supported by [WP_Query()](https://developer.wordpress.org/reference/classes/wp_query/). + * Only shows post types marked as post by default. * * ## OPTIONS * From 249a17b300a2ddf80fe78cc8b740cd0f10a0778f Mon Sep 17 00:00:00 2001 From: Pieter Daalder Date: Fri, 18 Jun 2021 23:20:52 +0200 Subject: [PATCH 2/2] Clarified filtering listing posts by author to fix #297 --- src/Post_Command.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Post_Command.php b/src/Post_Command.php index 89387eb17..97ccfbe20 100644 --- a/src/Post_Command.php +++ b/src/Post_Command.php @@ -598,6 +598,14 @@ protected function delete_callback( $post_id, $assoc_args ) { * | 1 | Hello world! | hello-world | 2016-06-01 14:31:12 | publish | * +----+--------------+-------------+---------------------+-------------+ * + * # List given post by a specific author + * $ wp post list --author=2 + * +----+-------------------+-------------------+---------------------+-------------+ + * | ID | post_title | post_name | post_date | post_status | + * +----+-------------------+-------------------+---------------------+-------------+ + * | 14 | New documentation | new-documentation | 2021-06-18 21:05:11 | publish | + * +----+-------------------+-------------------+---------------------+-------------+ + * * @subcommand list */ public function list_( $args, $assoc_args ) {