From fcca0a7c0d48a47cdcaddf369c13b16c1d48f790 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Tue, 13 Aug 2019 20:01:06 +0200 Subject: [PATCH] Update handbook for release v2.3.0 --- bin/commands-manifest.json | 8 +++++ commands/media/fix-orientation.md | 50 ++++++++++++++++++++++++++++++ commands/media/import.md | 2 +- commands/search-replace.md | 2 +- commands/server.md | 2 +- internal-api/wp-cli-launch-self.md | 2 +- internal-api/wp-cli-launch.md | 2 +- 7 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 commands/media/fix-orientation.md diff --git a/bin/commands-manifest.json b/bin/commands-manifest.json index 231bb8d8..5c60fdb4 100644 --- a/bin/commands-manifest.json +++ b/bin/commands-manifest.json @@ -1071,6 +1071,14 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/master\/commands\/maintenance-mode\/status.md", "repo_url": "https:\/\/github.com\/wp-cli\/maintenance-mode-command" }, + "media\/fix-orientation": { + "title": "media fix-orientation", + "slug": "fix-orientation", + "cmd_path": "media\/fix-orientation", + "parent": "media", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/master\/commands\/media\/fix-orientation.md", + "repo_url": "https:\/\/github.com\/wp-cli\/media-command" + }, "media\/image-size": { "title": "media image-size", "slug": "image-size", diff --git a/commands/media/fix-orientation.md b/commands/media/fix-orientation.md new file mode 100644 index 00000000..79b37446 --- /dev/null +++ b/commands/media/fix-orientation.md @@ -0,0 +1,50 @@ +# wp media fix-orientation + +Fix image orientation for one or more attachments. + +### OPTIONS + +[<attachment-id>...] +: One or more IDs of the attachments to regenerate. + +[\--dry-run] +: Check images needing orientation without performing the operation. + +### EXAMPLES + + # Fix orientation for all images. + $ wp media fix-orientation + 1/3 Fixing orientation for "Landscape_4" (ID 62). + 2/3 Fixing orientation for "Landscape_3" (ID 61). + 3/3 Fixing orientation for "Landscape_2" (ID 60). + Success: Fixed 3 of 3 images. + + # Fix orientation dry run. + $ wp media fix-orientation 63 -dry run + 1/1 "Portrait_6" (ID 63) will be affected. + Success: 1 of 1 image will be affected. + + # Fix orientation for specific images. + $ wp media fix-orientation 63 + 1/1 Fixing orientation for "Portrait_6" (ID 63). + Success: Fixed 1 of 1 images. + +### 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", "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). | +| `--[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/media/import.md b/commands/media/import.md index 451ae67b..885c775c 100644 --- a/commands/media/import.md +++ b/commands/media/import.md @@ -25,7 +25,7 @@ Creates attachments from local files or URLs. : "Description" field (post content) of attachment post. [\--skip-copy] -: If set, media files (local only) are imported to the library but not moved on disk. +: If set, media files (local only) are imported to the library but not moved on disk. File names will not be run through wp_unique_filename() with this set. [\--preserve-filetime] : Use the file modified time as the post published & modified dates. Remote files will always use the current time. diff --git a/commands/search-replace.md b/commands/search-replace.md index 6a43dad2..c7c233f0 100644 --- a/commands/search-replace.md +++ b/commands/search-replace.md @@ -38,7 +38,7 @@ Search/replace intelligently handles PHP serialized data, and does not change pr : Define number of rows in single INSERT statement when doing SQL export. You might want to change this depending on your database configuration (e.g. if you need to do fewer queries). Default: 50 [\--skip-tables=<tables>] -: Do not perform the replacement on specific tables. Use commas to specify multiple tables. +: Do not perform the replacement on specific tables. Use commas to specify multiple tables. Wildcards are supported, e.g. `'wp_*options'` or `'wp_post*'`. [\--skip-columns=<columns>] : Do not perform the replacement on specific columns. Use commas to specify multiple columns. diff --git a/commands/server.md b/commands/server.md index 9fa47834..bcd1199b 100644 --- a/commands/server.md +++ b/commands/server.md @@ -39,7 +39,7 @@ default: 8080 # Run on port 80 (for multisite) $ wp server --host=localhost.localdomain --port=80 PHP 5.6.9 Development Server started at Tue May 24 01:30:06 2016 - Listening on http://localhost1.localdomain1:8080 + Listening on http://localhost1.localdomain1:80 Document root is / Press Ctrl-C to quit. diff --git a/internal-api/wp-cli-launch-self.md b/internal-api/wp-cli-launch-self.md index 19554f19..32c4c4c7 100644 --- a/internal-api/wp-cli-launch-self.md +++ b/internal-api/wp-cli-launch-self.md @@ -15,7 +15,7 @@ Run a WP-CLI command in a new process reusing the current runtime arguments. $exit_on_error (bool) Whether to exit if the command returns an elevated return code.
$return_detailed (bool) Whether to return an exit status (default) or detailed execution results.
$runtime_args (array) Override one or more global args (path,url,user,allow-root)
-@return (int|ProcessRun) command exit status, or a ProcessRun instance
+@return (int|\WP_CLI\ProcessRun) command exit status, or a ProcessRun instance
diff --git a/internal-api/wp-cli-launch.md b/internal-api/wp-cli-launch.md index bad9b273..c2097f9a 100644 --- a/internal-api/wp-cli-launch.md +++ b/internal-api/wp-cli-launch.md @@ -12,7 +12,7 @@ Launch an arbitrary external process that takes over I/O. $command (string) External process to launch.
$exit_on_error (boolean) Whether to exit if the command returns an elevated return code.
$return_detailed (boolean) Whether to return an exit status (default) or detailed execution results.
-@return (int|ProcessRun) command exit status, or a ProcessRun object for full details.
+@return (int|\WP_CLI\ProcessRun) command exit status, or a ProcessRun object for full details.