diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 1a63096892..d4244fb026 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -248,21 +248,22 @@ class WP_Upgrader { * @param string $package The URI of the package. If this is the full path to an * existing local file, it will be returned untouched. * @param bool $check_signatures Whether to validate file signatures. Default false. + * @param array $hook_extra Extra arguments to pass to the filter hooks. Default empty array. * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object. */ - public function download_package( $package, $check_signatures = false ) { - + public function download_package( $package, $check_signatures = false, $hook_extra = array() ) { /** * Filters whether to return the package. * * @since 3.7.0 * - * @param bool $reply Whether to bail without returning the package. - * Default false. - * @param string $package The package file name. - * @param WP_Upgrader $this The WP_Upgrader instance. + * @param bool $reply Whether to bail without returning the package. + * Default false. + * @param string $package The package file name. + * @param WP_Upgrader $this The WP_Upgrader instance. + * @param array $hook_extra Extra arguments passed to hooked filters. */ - $reply = apply_filters( 'upgrader_pre_download', false, $package, $this ); + $reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ); if ( false !== $reply ) { return $reply; } @@ -737,7 +738,7 @@ class WP_Upgrader { * Download the package (Note, This just returns the filename * of the file if the package is a local file) */ - $download = $this->download_package( $options['package'], true ); + $download = $this->download_package( $options['package'], true, $options['hook_extra'] ); // Allow for signature soft-fail. // WARNING: This may be removed in the future. diff --git a/wp-includes/version.php b/wp-includes/version.php index 8166d5fbb8..c933ca152a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48398'; +$wp_version = '5.5-alpha-48399'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.