Skip to content

Commit 593e496

Browse files
authored
Merge pull request #5 from wp-cli/3927-docs
Further clarify accepted args for `wp user list`
2 parents 1a34b38 + de20b6f commit 593e496

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/User_Command.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,16 @@ public function __construct() {
4747
/**
4848
* List users.
4949
*
50+
* Display WordPress users based on all arguments supported by
51+
* [WP_User_Query()](https://developer.wordpress.org/reference/classes/wp_user_query/prepare_query/).
52+
*
5053
* ## OPTIONS
5154
*
5255
* [--role=<role>]
5356
* : Only display users with a certain role.
5457
*
5558
* [--<field>=<value>]
56-
* : Control output by one or more arguments of get_users().
59+
* : Control output by one or more arguments of WP_User_Query().
5760
*
5861
* [--network]
5962
* : List all users in the network for multisite.
@@ -118,6 +121,9 @@ public function __construct() {
118121
* $ wp user list --fields=display_name,user_email --format=json
119122
* [{"display_name":"supervisor","user_email":"[email protected]"}]
120123
*
124+
* # List users ordered by the 'last_activity' meta value.
125+
* $ wp user list --meta_key=last_activity --orderby=meta_value_num
126+
*
121127
* @subcommand list
122128
*/
123129
public function list_( $args, $assoc_args ) {

0 commit comments

Comments
 (0)