Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,32 @@ These fields are optionally available:
| 29 | 2013-03-14 11:56:08 | Jane Doe |
+------------+---------------------+----------------+

# List unapproved comments.
$ wp comment list --number=3 --status=hold --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 8 | 2023-11-10 13:13:06 | John Doe |
| 7 | 2023-11-10 13:09:55 | Mr WordPress |
| 9 | 2023-11-10 11:22:31 | Jane Doe |
+------------+---------------------+----------------+

# List comments marked as spam.
$ wp comment list --status=spam --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 2 | 2023-11-10 11:22:31 | Jane Doe |
+------------+---------------------+----------------+

# List comments in trash.
$ wp comment list --status=trash --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 3 | 2023-11-10 11:22:31 | John Doe |
+------------+---------------------+----------------+



### wp comment meta
Expand Down
26 changes: 26 additions & 0 deletions src/Comment_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,32 @@ public function get( $args, $assoc_args ) {
* | 29 | 2013-03-14 11:56:08 | Jane Doe |
* +------------+---------------------+----------------+
*
* # List unapproved comments.
* $ wp comment list --number=3 --status=hold --fields=ID,comment_date,comment_author
* +------------+---------------------+----------------+
* | comment_ID | comment_date | comment_author |
* +------------+---------------------+----------------+
* | 8 | 2023-11-10 13:13:06 | John Doe |
* | 7 | 2023-11-10 13:09:55 | Mr WordPress |
* | 9 | 2023-11-10 11:22:31 | Jane Doe |
* +------------+---------------------+----------------+
*
* # List comments marked as spam.
* $ wp comment list --status=spam --fields=ID,comment_date,comment_author
* +------------+---------------------+----------------+
* | comment_ID | comment_date | comment_author |
* +------------+---------------------+----------------+
* | 2 | 2023-11-10 11:22:31 | Jane Doe |
* +------------+---------------------+----------------+
*
* # List comments in trash.
* $ wp comment list --status=trash --fields=ID,comment_date,comment_author
* +------------+---------------------+----------------+
* | comment_ID | comment_date | comment_author |
* +------------+---------------------+----------------+
* | 3 | 2023-11-10 11:22:31 | John Doe |
* +------------+---------------------+----------------+
*
* @subcommand list
*/
public function list_( $args, $assoc_args ) {
Expand Down