Updats: Add a filter for the options params for the update being performed.

Props nofearinc. Fixes #27754


git-svn-id: https://develop.svn.wordpress.org/trunk@32783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2015-06-15 05:34:52 +00:00
parent 5b607d7ff6
commit 8455dd10da
1 changed files with 19 additions and 0 deletions

View File

@ -546,6 +546,25 @@ class WP_Upgrader {
$options = wp_parse_args( $options, $defaults );
/**
* Filter the package options before running an update.
*
* @since 4.3.0
*
* @param array $options {
* Options used by the upgrader.
*
* @type string $package Package for update.
* @type string $destination Update location.
* @type bool $clear_destination Clear the destination resource.
* @type bool $clear_working Clear the working resource.
* @type bool $abort_if_destination_exists Abort if the Destination directory exists.
* @type bool $is_multi Whether the upgrader is running multiple times.
* @type array $hook_extra Extra hook arguments.
* }
*/
$options = apply_filters( 'upgrader_package_options', $options );
if ( ! $options['is_multi'] ) { // call $this->header separately if running multiple times
$this->skin->header();
}