Make WordPress Core

Changeset 52986


Ignore:
Timestamp:
03/23/2022 06:02:27 PM (3 months ago)
Author:
davidbaumwald
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r52351 r52986  
    653653     *     @type bool   $clear_working               Whether to delete the files from the working
    654654     *                                               directory after copying them to the destination.
    655      *                                               Default false.
     655     *                                               Default true.
    656656     *     @type bool   $abort_if_destination_exists Whether to abort the installation if the destination
    657657     *                                               folder already exists. When true, `$clear_destination`
     
    673673            'destination'                 => '', // ...and this.
    674674            'clear_destination'           => false,
     675            'clear_working'               => true,
    675676            'abort_if_destination_exists' => true, // Abort if the destination directory exists. Pass clear_destination as false please.
    676             'clear_working'               => true,
    677677            'is_multi'                    => false,
    678678            'hook_extra'                  => array(), // Pass any extra $hook_extra args here, this will be passed to any hooked filters.
Note: See TracChangeset for help on using the changeset viewer.