diff --git a/bin/commands-manifest.json b/bin/commands-manifest.json index 7b5a6eb0..3be8687e 100644 --- a/bin/commands-manifest.json +++ b/bin/commands-manifest.json @@ -2119,6 +2119,22 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/list.md", "repo_url": "https:\/\/github.com\/wp-cli\/cache-command" }, + "transient\/patch": { + "title": "transient patch", + "slug": "patch", + "cmd_path": "transient\/patch", + "parent": "transient", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/patch.md", + "repo_url": "https:\/\/github.com\/wp-cli\/cache-command" + }, + "transient\/pluck": { + "title": "transient pluck", + "slug": "pluck", + "cmd_path": "transient\/pluck", + "parent": "transient", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/pluck.md", + "repo_url": "https:\/\/github.com\/wp-cli\/cache-command" + }, "transient\/set": { "title": "transient set", "slug": "set", diff --git a/commands/cache/patch.md b/commands/cache/patch.md new file mode 100644 index 00000000..0c986f5c --- /dev/null +++ b/commands/cache/patch.md @@ -0,0 +1,66 @@ +# wp cache patch + +Update a nested value from the cache. + +### OPTIONS + +<action> +: Patch action to perform. +\--- +options: + - insert + - update + - delete +\--- + +<key> +: Cache key. + +<key-path>... +: The name(s) of the keys within the value to locate the value to patch. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--group=<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +[\--expiration=<expiration>] + : Define how long to keep the value, in seconds. `0` means as long as possible. + --- + default: 0 + --- + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/cache/pluck.md b/commands/cache/pluck.md new file mode 100644 index 00000000..12690817 --- /dev/null +++ b/commands/cache/pluck.md @@ -0,0 +1,49 @@ +# wp cache pluck + +Get a nested value from the cache. + +### OPTIONS + +<key> +: Cache key. + +<key-path>... +: The name(s) of the keys within the value to locate the value to pluck. + +[\--group=<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +[\--format=<format>] +: The output format of the value. +\--- +default: plaintext +options: + - plaintext + - json + - yaml +\--- + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/cli/check-update.md b/commands/cli/check-update.md index 305be948..c4a065ae 100644 --- a/commands/cli/check-update.md +++ b/commands/cli/check-update.md @@ -21,7 +21,7 @@ Queries the GitHub releases API. Returns available versions if there are updates : Prints the value of a single field for each update. [\--fields=<fields>] -: Limit the output to specific object fields. Defaults to version,update_type,package_url. +: Limit the output to specific object fields. Defaults to version,update_type,package_url,status,requires_php. [\--format=<format>] : Render output in a particular format. diff --git a/commands/cli/update.md b/commands/cli/update.md index 1bc31201..8936f553 100644 --- a/commands/cli/update.md +++ b/commands/cli/update.md @@ -39,7 +39,7 @@ Only works for the Phar installation mechanism. # Update CLI. $ wp cli update - You have version 0.24.0. Would you like to update to 0.24.1? [y/n] y + You are currently using WP-CLI version 0.24.0. Would you like to update to 0.24.1? [y/n] y Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar... New version works. Proceeding to replace. Success: Updated WP-CLI to 0.24.1. diff --git a/commands/comment/meta/get.md b/commands/comment/meta/get.md index 6aedaa9e..2001098d 100644 --- a/commands/comment/meta/get.md +++ b/commands/comment/meta/get.md @@ -10,6 +10,9 @@ Get meta field value. <key> : The name of the meta field to get. +[\--single] +: Whether to return a single value. + [\--format=<format>] : Get value in a particular format. \--- diff --git a/commands/core/is-installed.md b/commands/core/is-installed.md index f22aed5e..b1c6f90c 100644 --- a/commands/core/is-installed.md +++ b/commands/core/is-installed.md @@ -13,14 +13,14 @@ Determines whether WordPress is installed by checking if the standard database t # Bash script for checking if WordPress is not installed. - if ! wp core is-installed 2>/dev/null; then + if ! wp core is-installed 2>/dev/null; then # WP is not installed. Let's try installing it. wp core install fi # Bash script for checking if WordPress is installed, with fallback. - if wp core is-installed 2>/dev/null; then + if wp core is-installed 2>/dev/null; then # WP is installed. Let's do some things we should only do in a confirmed WP environment. wp core verify-checksums else diff --git a/commands/core/verify-checksums.md b/commands/core/verify-checksums.md index 7908a87f..d178ab61 100644 --- a/commands/core/verify-checksums.md +++ b/commands/core/verify-checksums.md @@ -24,6 +24,9 @@ If you experience issues verifying from this command, ensure you are passing the [\--insecure] : Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack. +[\--exclude=<files>] +: Exclude specific files from the checksum verification. Provide a comma-separated list of file paths. + ### EXAMPLES # Verify checksums @@ -45,6 +48,10 @@ If you experience issues verifying from this command, ensure you are passing the Warning: File doesn't verify against checksum: wp-config-sample.php Error: WordPress installation doesn't verify against checksums. + # Verify checksums and exclude files + $ wp core verify-checksums --exclude="readme.html" + Success: WordPress installation verifies against checksums. + ### GLOBAL PARAMETERS These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. diff --git a/commands/db/export.md b/commands/db/export.md index cf681931..06b8c3fd 100644 --- a/commands/db/export.md +++ b/commands/db/export.md @@ -32,6 +32,9 @@ Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` [\--porcelain] : Output filename for the exported database. +[\--add-drop-table] +: Include a `DROP TABLE IF EXISTS` statement before each `CREATE TABLE` statement. + [\--defaults] : Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration. diff --git a/commands/db/search.md b/commands/db/search.md index 2441b9bb..11fbc89d 100644 --- a/commands/db/search.md +++ b/commands/db/search.md @@ -70,6 +70,15 @@ default: 40 [\--format=<format>] : Render output in a particular format. +\--- +options: + - table + - csv + - json + - yaml + - ids + - count +\--- The percent color codes available are: @@ -105,6 +114,16 @@ The percent color codes available are: They can be concatenated. For instance, the default match color of black on a mustard (dark yellow) background `%3%k` can be made black on a bright yellow background with `%Y%0%8`. +### AVAILABLE FIELDS + +These fields will be displayed by default for each result: + +* table +* column +* match +* primary_key_name +* primary_key_value + ### EXAMPLES # Search through the database for the 'wordpress-develop' string diff --git a/commands/dist-archive.md b/commands/dist-archive.md index 9061eeb8..c985a429 100644 --- a/commands/dist-archive.md +++ b/commands/dist-archive.md @@ -30,6 +30,9 @@ Use one distribution archive command for many projects, instead of a bash script [\--create-target-dir] : Automatically create the target directory as needed. +[\--force] +: Forces overwriting of the archive file if it already exists. + [\--plugin-dirname=<plugin-slug>] : Set the archive extract directory name. Defaults to project directory name. diff --git a/commands/i18n/make-json.md b/commands/i18n/make-json.md index b4f67ac8..4cf7947d 100644 --- a/commands/i18n/make-json.md +++ b/commands/i18n/make-json.md @@ -16,6 +16,12 @@ See https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wo [<destination>] : Path to the destination directory for the resulting JSON files. Defaults to the source directory. +[\--domain=<domain>] +: Text domain to use for the JSON file name. Overrides the default one extracted from the PO file. + +[\--extensions=<extensions>] +: Additional custom JS extensions, comma separated list. By default searches for .min.js and .js extensions. + [\--purge] : Whether to purge the strings that were extracted from the original source file. Defaults to true, use `--no-purge` to skip the removal. diff --git a/commands/network/meta/get.md b/commands/network/meta/get.md index 392b0306..80b74194 100644 --- a/commands/network/meta/get.md +++ b/commands/network/meta/get.md @@ -10,6 +10,9 @@ Get meta field value. <key> : The name of the meta field to get. +[\--single] +: Whether to return a single value. + [\--format=<format>] : Get value in a particular format. \--- diff --git a/commands/plugin/install.md b/commands/plugin/install.md index 109af8be..c297343a 100644 --- a/commands/plugin/install.md +++ b/commands/plugin/install.md @@ -13,6 +13,9 @@ Installs one or more plugins. [\--force] : If set, the command will overwrite any installed version of the plugin, without prompting for confirmation. +[\--ignore-requirements] +:If set, the command will install the plugin while ignoring any WordPress or PHP version requirements specified by the plugin authors. + [\--activate] : If set, the plugin will be activated immediately after install. diff --git a/commands/plugin/list.md b/commands/plugin/list.md index 54da89c6..24e22c2d 100644 --- a/commands/plugin/list.md +++ b/commands/plugin/list.md @@ -66,6 +66,8 @@ These fields are optionally available: * file * author * tested_up_to +* requires +* requires_php * wporg_status * wporg_last_updated diff --git a/commands/post/meta/get.md b/commands/post/meta/get.md index 60ee8b4f..114dce5f 100644 --- a/commands/post/meta/get.md +++ b/commands/post/meta/get.md @@ -10,6 +10,9 @@ Get meta field value. <key> : The name of the meta field to get. +[\--single] +: Whether to return a single value. + [\--format=<format>] : Get value in a particular format. \--- diff --git a/commands/role/delete.md b/commands/role/delete.md index 5ecd378b..2c2d9d2d 100644 --- a/commands/role/delete.md +++ b/commands/role/delete.md @@ -14,7 +14,7 @@ Deletes an existing role. Success: Role with key 'approver' deleted. # Delete productadmin role. - wp role delete productadmin + $ wp role delete productadmin Success: Role with key 'productadmin' deleted. ### GLOBAL PARAMETERS diff --git a/commands/scaffold/plugin.md b/commands/scaffold/plugin.md index 8132eb17..ca445f4c 100644 --- a/commands/scaffold/plugin.md +++ b/commands/scaffold/plugin.md @@ -54,6 +54,7 @@ default: circle options: - circle - gitlab + - bitbucket - github \--- diff --git a/commands/site/meta/get.md b/commands/site/meta/get.md index 421acdb9..63582f66 100644 --- a/commands/site/meta/get.md +++ b/commands/site/meta/get.md @@ -10,6 +10,9 @@ Get meta field value. <key> : The name of the meta field to get. +[\--single] +: Whether to return a single value. + [\--format=<format>] : Get value in a particular format. \--- diff --git a/commands/term/meta/get.md b/commands/term/meta/get.md index d6aa0d0d..ef640843 100644 --- a/commands/term/meta/get.md +++ b/commands/term/meta/get.md @@ -10,6 +10,9 @@ Get meta field value. <key> : The name of the meta field to get. +[\--single] +: Whether to return a single value. + [\--format=<format>] : Get value in a particular format. \--- diff --git a/commands/theme/install.md b/commands/theme/install.md index a22bf6eb..32b34b62 100644 --- a/commands/theme/install.md +++ b/commands/theme/install.md @@ -13,6 +13,9 @@ Installs one or more themes. [\--force] : If set, the command will overwrite any installed version of the theme, without prompting for confirmation. +[\--ignore-requirements] +: If set, the command will install the theme while ignoring any WordPress or PHP version requirements specified by the theme authors. + [\--activate] : If set, the theme will be activated immediately after install. diff --git a/commands/transient/patch.md b/commands/transient/patch.md new file mode 100644 index 00000000..602077ac --- /dev/null +++ b/commands/transient/patch.md @@ -0,0 +1,60 @@ +# wp transient patch + +Update a nested value from a transient. + +### OPTIONS + +<action> +: Patch action to perform. +\--- +options: + - insert + - update + - delete +\--- + +<key> +: Key for the transient. + +<key-path>... +: The name(s) of the keys within the value to locate the value to patch. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +[\--expiration=<expiration>] +: Time until expiration, in seconds. + +[\--network] +: Get the value of a network|site transient. On single site, this is a specially-named cache key. On multisite, this is a global cache (instead of local to the site). + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/transient/pluck.md b/commands/transient/pluck.md new file mode 100644 index 00000000..53e88b0b --- /dev/null +++ b/commands/transient/pluck.md @@ -0,0 +1,46 @@ +# wp transient pluck + +Get a nested value from a transient. + +### OPTIONS + +<key> +: Key for the transient. + +<key-path>... +: The name(s) of the keys within the value to locate the value to pluck. + +[\--format=<format>] +: The output format of the value. +\--- +default: plaintext +options: + - plaintext + - json + - yaml +\--- + +[\--network] +: Get the value of a network|site transient. On single site, this is a specially-named cache key. On multisite, this is a global cache (instead of local to the site). + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/user/remove-cap.md b/commands/user/remove-cap.md index 58e71333..1a11b7e2 100644 --- a/commands/user/remove-cap.md +++ b/commands/user/remove-cap.md @@ -10,6 +10,9 @@ Removes a user's capability. <cap> : The capability to be removed. +[\--force] +: Forcefully remove a capability. + ### EXAMPLES $ wp user remove-cap 11 publish_newsletters @@ -21,6 +24,9 @@ Removes a user's capability. $ wp user remove-cap 11 nonexistent_cap Error: No such 'nonexistent_cap' cap for supervisor (11). + $ wp user remove-cap 11 publish_newsletters --force + Success: Removed 'publish_newsletters' cap for supervisor (11). + ### GLOBAL PARAMETERS These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. diff --git a/commands/user/signup/list.md b/commands/user/signup/list.md index 08ab9e77..492626f1 100644 --- a/commands/user/signup/list.md +++ b/commands/user/signup/list.md @@ -2,6 +2,8 @@ Lists signups. +### OPTIONS + [\--<field>=<value>] : Filter the list by a specific field.