Skip to content

Commit 58fe6d5

Browse files
committed
Merge branch 'main' into copilot/add-font-library-commands
2 parents f0b9178 + 946cea3 commit 58fe6d5

File tree

5 files changed

+647
-309
lines changed

5 files changed

+647
-309
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Install Composer dependencies & cache dependencies
4040
if: steps.check_composer_file.outputs.files_exists == 'true'
41-
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3
41+
uses: ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947 # v3
4242
env:
4343
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
4444
with:

README.md

Lines changed: 330 additions & 3 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.
@@ -6680,6 +6964,39 @@ wp user application-password update <user> <uuid> [--<field>=<value>]
66806964

66816965

66826966

6967+
### wp user check-password
6968+
6969+
Checks if a user's password is valid or not.
6970+
6971+
~~~
6972+
wp user check-password <user> <user_pass> [--escape-chars]
6973+
~~~
6974+
6975+
**OPTIONS**
6976+
6977+
<user>
6978+
The user login, user email or user ID of the user to check credentials for.
6979+
6980+
<user_pass>
6981+
A string that contains the plain text password for the user.
6982+
6983+
[--escape-chars]
6984+
Escape password with `wp_slash()` to mimic the same behavior as `wp-login.php`.
6985+
6986+
**EXAMPLES**
6987+
6988+
# Check whether given credentials are valid; exit status 0 if valid, otherwise 1
6989+
$ wp user check-password admin adminpass
6990+
$ echo $?
6991+
1
6992+
6993+
# Bash script for checking whether given credentials are valid or not
6994+
if ! $(wp user check-password admin adminpass); then
6995+
notify-send "Invalid Credentials";
6996+
fi
6997+
6998+
6999+
66837000
### wp user create
66847001

66857002
Creates a new user.
@@ -7442,15 +7759,25 @@ wp user remove-role <user> [<role>...]
74427759
User ID, user email, or user login.
74437760

74447761
[<role>...]
7445-
Remove the specified role(s) from the user.
7762+
Remove the specified role(s) from the user. If not passed, all roles are
7763+
removed from the user; on multisite, this removes the user from the current
7764+
site/blog.
74467765

74477766
**EXAMPLES**
74487767

74497768
$ wp user remove-role 12 author
7450-
Success: Removed 'author' role for johndoe (12).
7769+
Success: Removed 'author' role from johndoe (12).
74517770

74527771
$ wp user remove-role 12 author editor
7453-
Success: Removed 'author', 'editor' roles for johndoe (12).
7772+
Success: Removed 'author', 'editor' roles from johndoe (12).
7773+
7774+
# On single-site: removes all roles from the user
7775+
$ wp user remove-role 12
7776+
Success: Removed all roles from johndoe (12) on http://example.com.
7777+
7778+
# On multisite: removes the user from the current site/blog
7779+
$ wp user remove-role 12
7780+
Success: Removed johndoe (12) from http://example.com.
74547781

74557782

74567783

0 commit comments

Comments
 (0)