Skip to content

Commit 5a57479

Browse files
committed
Add missing commands to readme
1 parent a689c33 commit 5a57479

2 files changed

Lines changed: 292 additions & 0 deletions

File tree

README.md

Lines changed: 284 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5295,6 +5295,251 @@ wp site option
52955295

52965296

52975297

5298+
### wp site option add
5299+
5300+
Adds a site option.
5301+
5302+
~~~
5303+
wp site option add <key> [<value>] [--format=<format>]
5304+
~~~
5305+
5306+
**OPTIONS**
5307+
5308+
<key>
5309+
The name of the site option to add.
5310+
5311+
[<value>]
5312+
The value of the site option to add. If omitted, the value is read from STDIN.
5313+
5314+
[--format=<format>]
5315+
The serialization format for the value.
5316+
---
5317+
default: plaintext
5318+
options:
5319+
- plaintext
5320+
- json
5321+
---
5322+
5323+
**EXAMPLES**
5324+
5325+
# Create a site option by reading a JSON file
5326+
$ wp site option add my_option --format=json < config.json
5327+
Success: Added 'my_option' site option.
5328+
5329+
5330+
5331+
### wp site option delete
5332+
5333+
Deletes a site option.
5334+
5335+
~~~
5336+
wp site option delete <key>
5337+
~~~
5338+
5339+
**OPTIONS**
5340+
5341+
<key>
5342+
Key for the site option.
5343+
5344+
**EXAMPLES**
5345+
5346+
$ wp site option delete my_option
5347+
Success: Deleted 'my_option' site option.
5348+
5349+
5350+
5351+
### wp site option get
5352+
5353+
Gets a site option.
5354+
5355+
~~~
5356+
wp site option get <key> [--format=<format>]
5357+
~~~
5358+
5359+
**OPTIONS**
5360+
5361+
<key>
5362+
Key for the site option.
5363+
5364+
[--format=<format>]
5365+
Get value in a particular format.
5366+
---
5367+
default: var_export
5368+
options:
5369+
- var_export
5370+
- json
5371+
- yaml
5372+
---
5373+
5374+
**EXAMPLES**
5375+
5376+
# Get site upload filetypes
5377+
$ wp site option get upload_filetypes
5378+
jpg jpeg png gif mov avi mpg
5379+
5380+
5381+
5382+
### wp site option list
5383+
5384+
Lists site options.
5385+
5386+
~~~
5387+
wp site option list [--search=<pattern>] [--site_id=<id>] [--field=<field>] [--fields=<fields>] [--format=<format>]
5388+
~~~
5389+
5390+
**OPTIONS**
5391+
5392+
[--search=<pattern>]
5393+
Use wildcards ( * and ? ) to match option name.
5394+
5395+
[--site_id=<id>]
5396+
Limit options to those of a particular site id.
5397+
5398+
[--field=<field>]
5399+
Prints the value of a single field.
5400+
5401+
[--fields=<fields>]
5402+
Limit the output to specific object fields.
5403+
5404+
[--format=<format>]
5405+
The serialization format for the value. total_bytes displays the total size of matching options in bytes.
5406+
---
5407+
default: table
5408+
options:
5409+
- table
5410+
- json
5411+
- csv
5412+
- count
5413+
- yaml
5414+
- total_bytes
5415+
---
5416+
5417+
**AVAILABLE FIELDS**
5418+
5419+
This field will be displayed by default for each matching option:
5420+
5421+
* meta_key
5422+
* meta_value
5423+
5424+
These fields are optionally available:
5425+
5426+
* meta_id
5427+
* site_id
5428+
* size_bytes
5429+
5430+
**EXAMPLES**
5431+
5432+
# List all site options beginning with "i2f_"
5433+
$ wp site option list --search="i2f_*"
5434+
+-------------+--------------+
5435+
| meta_key | meta_value |
5436+
+-------------+--------------+
5437+
| i2f_version | 0.1.0 |
5438+
+-------------+--------------+
5439+
5440+
5441+
5442+
### wp site option patch
5443+
5444+
Updates a nested value in an option.
5445+
5446+
~~~
5447+
wp site option patch <action> <key> <key-path>... [<value>] [--format=<format>]
5448+
~~~
5449+
5450+
**OPTIONS**
5451+
5452+
<action>
5453+
Patch action to perform.
5454+
---
5455+
options:
5456+
- insert
5457+
- update
5458+
- delete
5459+
---
5460+
5461+
<key>
5462+
The option name.
5463+
5464+
<key-path>...
5465+
The name(s) of the keys within the value to locate the value to patch.
5466+
5467+
[<value>]
5468+
The new value. If omitted, the value is read from STDIN.
5469+
5470+
[--format=<format>]
5471+
The serialization format for the value.
5472+
---
5473+
default: plaintext
5474+
options:
5475+
- plaintext
5476+
- json
5477+
---
5478+
5479+
5480+
5481+
### wp site option pluck
5482+
5483+
Gets a nested value from an option.
5484+
5485+
~~~
5486+
wp site option pluck <key> <key-path>... [--format=<format>]
5487+
~~~
5488+
5489+
**OPTIONS**
5490+
5491+
<key>
5492+
The option name.
5493+
5494+
<key-path>...
5495+
The name(s) of the keys within the value to locate the value to pluck.
5496+
5497+
[--format=<format>]
5498+
The output format of the value.
5499+
---
5500+
default: plaintext
5501+
options:
5502+
- plaintext
5503+
- json
5504+
- yaml
5505+
5506+
5507+
5508+
### wp site option update
5509+
5510+
Updates a site option.
5511+
5512+
~~~
5513+
wp site option update <key> [<value>] [--format=<format>]
5514+
~~~
5515+
5516+
**Alias:** `set`
5517+
5518+
**OPTIONS**
5519+
5520+
<key>
5521+
The name of the site option to update.
5522+
5523+
[<value>]
5524+
The new value. If omitted, the value is read from STDIN.
5525+
5526+
[--format=<format>]
5527+
The serialization format for the value.
5528+
---
5529+
default: plaintext
5530+
options:
5531+
- plaintext
5532+
- json
5533+
---
5534+
5535+
**EXAMPLES**
5536+
5537+
# Update a site option by reading from a file
5538+
$ wp site option update my_option < value.txt
5539+
Success: Updated 'my_option' site option.
5540+
5541+
5542+
52985543
### wp site private
52995544

53005545
Sets one or more sites as private.
@@ -6185,6 +6430,45 @@ wp term meta update <id> <key> [<value>] [--format=<format>]
61856430

61866431

61876432

6433+
### wp term migrate
6434+
6435+
Migrate a term of a taxonomy to another taxonomy.
6436+
6437+
~~~
6438+
wp term migrate <term> [--by=<field>] [--from=<taxonomy>] [--to=<taxonomy>]
6439+
~~~
6440+
6441+
**OPTIONS**
6442+
6443+
<term>
6444+
Slug or ID of the term to migrate.
6445+
6446+
[--by=<field>]
6447+
Explicitly handle the term value as a slug or id.
6448+
---
6449+
default: id
6450+
options:
6451+
- slug
6452+
- id
6453+
---
6454+
6455+
[--from=<taxonomy>]
6456+
Taxonomy slug of the term to migrate.
6457+
6458+
[--to=<taxonomy>]
6459+
Taxonomy slug to migrate to.
6460+
6461+
**EXAMPLES**
6462+
6463+
# Migrate a category's term (video) to tag taxonomy.
6464+
$ wp term migrate 9190 --from=category --to=post_tag
6465+
Term 'video' assigned to post 1155.
6466+
Term 'video' migrated.
6467+
Old instance of term 'video' removed from its original taxonomy.
6468+
Success: Migrated the term 'video' from taxonomy 'category' to taxonomy 'post_tag' for 1 post.
6469+
6470+
6471+
61886472
### wp term recount
61896473

61906474
Recalculates number of posts assigned to each term.

composer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@
166166
"site meta pluck",
167167
"site meta update",
168168
"site option",
169+
"site option add",
170+
"site option delete",
171+
"site option get",
172+
"site option list",
173+
"site option patch",
174+
"site option pluck",
175+
"site option update",
169176
"site private",
170177
"site public",
171178
"site spam",
@@ -189,6 +196,7 @@
189196
"term meta patch",
190197
"term meta pluck",
191198
"term meta update",
199+
"term migrate",
192200
"term recount",
193201
"term update",
194202
"user",

0 commit comments

Comments
 (0)