Make WordPress Core


Ignore:
Timestamp:
06/15/2015 05:34:52 AM (11 years ago)
Author:
dd32
Message:

Updats: Add a filter for the options params for the update being performed.
Props nofearinc. Fixes #27754

File:
1 edited

Legend:

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

    r32655 r32783  
    547547                $options = wp_parse_args( $options, $defaults );
    548548
     549                /**
     550                 * Filter the package options before running an update.
     551                 *
     552                 * @since 4.3.0
     553                 *
     554                 * @param array $options {
     555                 *     Options used by the upgrader.
     556                 *
     557                 *     @type string $package                     Package for update.
     558                 *     @type string $destination                 Update location.
     559                 *     @type bool   $clear_destination           Clear the destination resource.
     560                 *     @type bool   $clear_working               Clear the working resource.
     561                 *     @type bool   $abort_if_destination_exists Abort if the Destination directory exists.
     562                 *     @type bool   $is_multi                    Whether the upgrader is running multiple times.
     563                 *     @type array  $hook_extra                  Extra hook arguments.
     564                 * }
     565                 */
     566                $options = apply_filters( 'upgrader_package_options', $options );
     567
    549568                if ( ! $options['is_multi'] ) { // call $this->header separately if running multiple times
    550569                        $this->skin->header();
Note: See TracChangeset for help on using the changeset viewer.