99 *
1010 * ## EXAMPLES
1111 *
12+ * # Add a signup.
1213 * $ wp bp signup create --user-login=test_user --user-email=teste@site.com
1314 * Success: Successfully added new user signup (ID #345).
1415 *
16+ * # Activate a signup.
1517 * $ wp bp signup activate ee48ec319fef3nn4
1618 * Success: Signup activated, new user (ID #545).
1719 *
@@ -25,12 +27,14 @@ class Signup extends BuddyPressCommand {
2527 * @var array
2628 */
2729 protected $ obj_fields = [
28- 'signup_id ' ,
29- 'user_login ' ,
30+ 'id ' ,
3031 'user_name ' ,
32+ 'user_login ' ,
33+ 'user_email ' ,
34+ 'registered ' ,
3135 'meta ' ,
3236 'activation_key ' ,
33- 'registered ' ,
37+ 'count_sent ' ,
3438 ];
3539
3640 /**
@@ -70,7 +74,7 @@ public static function check_dependencies() {
7074 * [--porcelain]
7175 * : Output only the new signup id.
7276 *
73- * ## EXAMPLE
77+ * ## EXAMPLES
7478 *
7579 * # Add a signup.
7680 * $ wp bp signup create --user-login=test_user --user-email=teste@site.com
@@ -155,9 +159,16 @@ public function create( $args, $assoc_args ) {
155159 *
156160 * ## EXAMPLES
157161 *
158- * $ wp bp signup get 123
159- * $ wp bp signup get foo@example.com
160- * $ wp bp signup get 123 --match-field=id
162+ * # Get a signup.
163+ * $ wp bp signup get 35 --fields=id,user_login,user_name,count_sent
164+ * +------------+------------+
165+ * | Field | Value |
166+ * +------------+------------+
167+ * | id | 35 |
168+ * | user_login | user897616 |
169+ * | user_name | Test user |
170+ * | count_sent | 4 |
171+ * +------------+------------+
161172 */
162173 public function get ( $ args , $ assoc_args ) {
163174 $ signup = $ this ->get_signup_by_identifier ( $ args [0 ], $ assoc_args );
@@ -220,7 +231,7 @@ function ( $signup_id ) {
220231 * <signup-id>
221232 * : Identifier for the signup. Can be a signup ID, an email address, or a user_login.
222233 *
223- * ## EXAMPLE
234+ * ## EXAMPLES
224235 *
225236 * # Activate a signup.
226237 * $ wp bp signup activate ee48ec319fef3nn4
@@ -301,7 +312,7 @@ function ( $assoc_args, $format ) use ( $random_login, $email_domain ) {
301312 * <signup-id>
302313 * : Identifier for the signup. Can be a signup ID, an email address, or a user_login.
303314 *
304- * ## EXAMPLE
315+ * ## EXAMPLES
305316 *
306317 * # Resend activation e-mail to a newly registered user.
307318 * $ wp bp signup resend test@example.com
@@ -326,9 +337,12 @@ public function resend( $args, $assoc_args ) {
326337 *
327338 * ## OPTIONS
328339 *
329- * [--fields =<value>]
340+ * [--<field> =<value>]
330341 * : One or more parameters to pass. See \BP_Signup::get()
331342 *
343+ * [--fields=<fields>]
344+ * : Fields to display.
345+ *
332346 * [--count=<number>]
333347 * : How many signups to list.
334348 * ---
@@ -355,14 +369,20 @@ public function resend( $args, $assoc_args ) {
355369 * 70 71 72 73 74
356370 *
357371 * # List 100 signups and return the count.
358- * $ wp bp signup list --number =100 --format=count
372+ * $ wp bp signup list --count =100 --format=count
359373 * 100
360374 *
375+ * # List active signups.
376+ * $ wp bp signup list --active=1 --count=10
377+ * 50
378+ *
361379 * @subcommand list
362380 */
363381 public function list_ ( $ args , $ assoc_args ) {
364382 $ formatter = $ this ->get_formatter ( $ assoc_args );
365383
384+ $ assoc_args ['number ' ] = $ assoc_args ['count ' ];
385+
366386 if ( in_array ( $ formatter ->format , [ 'ids ' , 'count ' ], true ) ) {
367387 $ assoc_args ['fields ' ] = 'ids ' ;
368388 }
0 commit comments