Upgrade/Install: Fix the docs for the default value of $clear_working in WP_Upgrader::run.

The current docblock for `WP_Upgrader::run` indicates the default value for the `clear_working` key of the `$options` argument is `false`.  However, in the code directly below, the default is shown to be `true.  This change updates the docblock to correct the default.

This commit also reorders the `$defaults` to match the order they appear in the docblock.

Props paulkevan.
Fixes #55450.
Built from https://develop.svn.wordpress.org/trunk@52986


git-svn-id: http://core.svn.wordpress.org/trunk@52575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
davidbaumwald 2022-03-23 18:04:05 +00:00
parent 4499c7a17f
commit fabc5db7fe
2 changed files with 3 additions and 3 deletions

View File

@ -652,7 +652,7 @@ class WP_Upgrader {
* destination folder. Default false. * destination folder. Default false.
* @type bool $clear_working Whether to delete the files from the working * @type bool $clear_working Whether to delete the files from the working
* directory after copying them to the destination. * directory after copying them to the destination.
* Default false. * Default true.
* @type bool $abort_if_destination_exists Whether to abort the installation if the destination * @type bool $abort_if_destination_exists Whether to abort the installation if the destination
* folder already exists. When true, `$clear_destination` * folder already exists. When true, `$clear_destination`
* should be false. Default true. * should be false. Default true.
@ -672,8 +672,8 @@ class WP_Upgrader {
'package' => '', // Please always pass this. 'package' => '', // Please always pass this.
'destination' => '', // ...and this. 'destination' => '', // ...and this.
'clear_destination' => false, 'clear_destination' => false,
'abort_if_destination_exists' => true, // Abort if the destination directory exists. Pass clear_destination as false please.
'clear_working' => true, 'clear_working' => true,
'abort_if_destination_exists' => true, // Abort if the destination directory exists. Pass clear_destination as false please.
'is_multi' => false, 'is_multi' => false,
'hook_extra' => array(), // Pass any extra $hook_extra args here, this will be passed to any hooked filters. 'hook_extra' => array(), // Pass any extra $hook_extra args here, this will be passed to any hooked filters.
); );

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.0-alpha-52985'; $wp_version = '6.0-alpha-52986';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.