diff --git a/src/Post_Command.php b/src/Post_Command.php index d4a7a17d6..97ccfbe20 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 * @@ -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 ) {