Skip to content

Commit e98bd9a

Browse files
Sync user-contributed example to wp user delete
1 parent dc73fde commit e98bd9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/User_Command.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ public function get( $args, $assoc_args ) {
260260
* $ wp user delete $(wp user list --role=contributor --field=ID) --reassign=2
261261
* Success: Removed user 813 from http://example.com
262262
* Success: Removed user 578 from http://example.com
263+
*
264+
* # Delete all contributors in batches of 100 (avoid error: argument list too long: wp)
265+
* $ wp user delete $(wp user list --role=contributor --field=ID | head -n 100)
263266
*/
264267
public function delete( $args, $assoc_args ) {
265268
$network = Utils\get_flag_value( $assoc_args, 'network' ) && is_multisite();

0 commit comments

Comments
 (0)