Skip to content

Commit 216a6a1

Browse files
Add --slug=<site> as an available parameter to wp site commands (#416)
--------- Co-authored-by: Daniel Bachhuber <[email protected]>
1 parent b675052 commit 216a6a1

File tree

3 files changed

+521
-74
lines changed

3 files changed

+521
-74
lines changed

README.md

Lines changed: 86 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,39 +3271,51 @@ wp site
32713271
Activates one or more sites.
32723272

32733273
~~~
3274-
wp site activate <id>...
3274+
wp site activate [<id>...] [--slug=<slug>]
32753275
~~~
32763276

32773277
**OPTIONS**
32783278

3279-
<id>...
3280-
One or more IDs of sites to activate.
3279+
[<id>...]
3280+
One or more IDs of sites to activate. If not provided, you must set the --slug parameter.
3281+
3282+
[--slug=<slug>]
3283+
Path of the site to be activated. Subdomain on subdomain installs, directory on subdirectory installs.
32813284

32823285
**EXAMPLES**
32833286

32843287
$ wp site activate 123
32853288
Success: Site 123 activated.
32863289

3290+
$ wp site activate --slug=demo
3291+
Success: Site 123 marked as activated.
3292+
32873293

32883294

32893295
### wp site archive
32903296

32913297
Archives one or more sites.
32923298

32933299
~~~
3294-
wp site archive <id>...
3300+
wp site archive [<id>...] [--slug=<slug>]
32953301
~~~
32963302

32973303
**OPTIONS**
32983304

3299-
<id>...
3300-
One or more IDs of sites to archive.
3305+
[<id>...]
3306+
One or more IDs of sites to archive. If not provided, you must set the --slug parameter.
3307+
3308+
[--slug=<slug>]
3309+
Path of the site to archive. Subdomain on subdomain installs, directory on subdirectory installs.
33013310

33023311
**EXAMPLES**
33033312

33043313
$ wp site archive 123
33053314
Success: Site 123 archived.
33063315

3316+
$ wp site archive --slug=demo
3317+
Success: Site 123 archived.
3318+
33073319

33083320

33093321
### wp site create
@@ -3346,19 +3358,25 @@ wp site create --slug=<slug> [--title=<title>] [--email=<email>] [--network_id=<
33463358
Deactivates one or more sites.
33473359

33483360
~~~
3349-
wp site deactivate <id>...
3361+
wp site deactivate [<id>...] [--slug=<slug>]
33503362
~~~
33513363

33523364
**OPTIONS**
33533365

3354-
<id>...
3355-
One or more IDs of sites to deactivate.
3366+
[<id>...]
3367+
One or more IDs of sites to deactivate. If not provided, you must set the --slug parameter.
3368+
3369+
[--slug=<slug>]
3370+
Path of the site to be deactivated. Subdomain on subdomain installs, directory on subdirectory installs.
33563371

33573372
**EXAMPLES**
33583373

33593374
$ wp site deactivate 123
33603375
Success: Site 123 deactivated.
33613376

3377+
$ wp site deactivate --slug=demo
3378+
Success: Site 123 marked as deactivated.
3379+
33623380

33633381

33643382
### wp site delete
@@ -3375,7 +3393,7 @@ wp site delete [<site-id>] [--slug=<slug>] [--yes] [--keep-tables]
33753393
The id of the site to delete. If not provided, you must set the --slug parameter.
33763394

33773395
[--slug=<slug>]
3378-
Path of the blog to be deleted. Subdomain on subdomain installs, directory on subdirectory installs.
3396+
Path of the site to be deleted. Subdomain on subdomain installs, directory on subdirectory installs.
33793397

33803398
[--yes]
33813399
Answer yes to the confirmation message.
@@ -3508,19 +3526,25 @@ These fields are optionally available:
35083526
Sets one or more sites as mature.
35093527

35103528
~~~
3511-
wp site mature <id>...
3529+
wp site mature [<id>...] [--slug=<slug>]
35123530
~~~
35133531

35143532
**OPTIONS**
35153533

3516-
<id>...
3517-
One or more IDs of sites to set as mature.
3534+
[<id>...]
3535+
One or more IDs of sites to set as mature. If not provided, you must set the --slug parameter.
3536+
3537+
[--slug=<slug>]
3538+
Path of the site to be set as mature. Subdomain on subdomain installs, directory on subdirectory installs.
35183539

35193540
**EXAMPLES**
35203541

35213542
$ wp site mature 123
35223543
Success: Site 123 marked as mature.
35233544

3545+
$ wp site mature --slug=demo
3546+
Success: Site 123 marked as mature.
3547+
35243548

35253549

35263550
### wp site option
@@ -3558,53 +3582,68 @@ wp site option
35583582
Sets one or more sites as private.
35593583

35603584
~~~
3561-
wp site private <id>...
3585+
wp site private [<id>...] [--slug=<slug>]
35623586
~~~
35633587

35643588
**OPTIONS**
35653589

3566-
<id>...
3567-
One or more IDs of sites to set as private.
3590+
[<id>...]
3591+
One or more IDs of sites to set as private. If not provided, you must set the --slug parameter.
3592+
3593+
[--slug=<slug>]
3594+
Path of the site to be set as private. Subdomain on subdomain installs, directory on subdirectory installs.
35683595

35693596
**EXAMPLES**
35703597

35713598
$ wp site private 123
35723599
Success: Site 123 marked as private.
35733600

3601+
$ wp site private --slug=demo
3602+
Success: Site 123 marked as private.
3603+
35743604

35753605

35763606
### wp site public
35773607

35783608
Sets one or more sites as public.
35793609

35803610
~~~
3581-
wp site public <id>...
3611+
wp site public [<id>...] [--slug=<slug>]
35823612
~~~
35833613

35843614
**OPTIONS**
35853615

3586-
<id>...
3587-
One or more IDs of sites to set as public.
3616+
[<id>...]
3617+
One or more IDs of sites to set as public. If not provided, you must set the --slug parameter.
3618+
3619+
[--slug=<slug>]
3620+
Path of the site to be set as public. Subdomain on subdomain installs, directory on subdirectory installs.
35883621

35893622
**EXAMPLES**
35903623

35913624
$ wp site public 123
35923625
Success: Site 123 marked as public.
35933626

3627+
$ wp site public --slug=demo
3628+
Success: Site 123 marked as public.
3629+
35943630

35953631

35963632
### wp site spam
35973633

35983634
Marks one or more sites as spam.
35993635

36003636
~~~
3601-
wp site spam <id>...
3637+
wp site spam [<id>...] [--slug=<slug>]
36023638
~~~
36033639

36043640
**OPTIONS**
36053641

3606-
<id>...
3607-
One or more IDs of sites to be marked as spam.
3642+
[<id>...]
3643+
One or more IDs of sites to be marked as spam. If not provided, you must set the --slug parameter.
3644+
3645+
[--slug=<slug>]
3646+
Path of the site to be marked as spam. Subdomain on subdomain installs, directory on subdirectory installs.
36083647

36093648
**EXAMPLES**
36103649

@@ -3618,37 +3657,49 @@ wp site spam <id>...
36183657
Unarchives one or more sites.
36193658

36203659
~~~
3621-
wp site unarchive <id>...
3660+
wp site unarchive [<id>...] [--slug=<slug>]
36223661
~~~
36233662

36243663
**OPTIONS**
36253664

3626-
<id>...
3627-
One or more IDs of sites to unarchive.
3665+
[<id>...]
3666+
One or more IDs of sites to unarchive. If not provided, you must set the --slug parameter.
3667+
3668+
[--slug=<slug>]
3669+
Path of the site to unarchive. Subdomain on subdomain installs, directory on subdirectory installs.
36283670

36293671
**EXAMPLES**
36303672

36313673
$ wp site unarchive 123
36323674
Success: Site 123 unarchived.
36333675

3676+
$ wp site unarchive --slug=demo
3677+
Success: Site 123 unarchived.
3678+
36343679

36353680

36363681
### wp site unmature
36373682

36383683
Sets one or more sites as immature.
36393684

36403685
~~~
3641-
wp site unmature <id>...
3686+
wp site unmature [<id>...] [--slug=<slug>]
36423687
~~~
36433688

36443689
**OPTIONS**
36453690

3646-
<id>...
3647-
One or more IDs of sites to set as unmature.
3691+
[<id>...]
3692+
One or more IDs of sites to set as unmature. If not provided, you must set the --slug parameter.
3693+
3694+
[--slug=<slug>]
3695+
Path of the site to be set as unmature. Subdomain on subdomain installs, directory on subdirectory installs.
36483696

36493697
**EXAMPLES**
36503698

3651-
$ wp site general 123
3699+
$ wp site unmature 123
3700+
Success: Site 123 marked as unmature.
3701+
3702+
$ wp site unmature --slug=demo
36523703
Success: Site 123 marked as unmature.
36533704

36543705

@@ -3658,13 +3709,16 @@ wp site unmature <id>...
36583709
Removes one or more sites from spam.
36593710

36603711
~~~
3661-
wp site unspam <id>...
3712+
wp site unspam [<id>...] [--slug=<slug>]
36623713
~~~
36633714

36643715
**OPTIONS**
36653716

3666-
<id>...
3667-
One or more IDs of sites to remove from spam.
3717+
[<id>...]
3718+
One or more IDs of sites to remove from spam. If not provided, you must set the --slug parameter.
3719+
3720+
[--slug=<slug>]
3721+
Path of the site to be removed from spam. Subdomain on subdomain installs, directory on subdirectory installs.
36683722

36693723
**EXAMPLES**
36703724

0 commit comments

Comments
 (0)