From c6bb637f890745d30044fb86d36a0ade1715a912 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 15 Jun 2015 05:35:26 +0000 Subject: [PATCH] Updats: Add a filter for the options params for the update being performed. Props nofearinc. Fixes #27754 Built from https://develop.svn.wordpress.org/trunk@32783 git-svn-id: http://core.svn.wordpress.org/trunk@32754 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-upgrader.php | 19 +++++++++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 0956223808..4f5151206b 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -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(); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 7a0f4b298f..819500c3ca 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32782'; +$wp_version = '4.3-alpha-32783'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.