From 7be4ad61ca0e6967d909798d79dcda8cb9eb6334 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 16 Nov 2015 02:46:43 +0000 Subject: [PATCH] Upgrader: Pass the `$args['hook_extra']` context to the `upgrader_source_selection` filter. Props afragen Fixes #34696 git-svn-id: https://develop.svn.wordpress.org/trunk@35642 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-upgrader.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index 1d9b0a0a02..d3abd8eab4 100644 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -460,12 +460,14 @@ class WP_Upgrader { * Filter the source file location for the upgrade package. * * @since 2.8.0 + * @since 4.4.0 The $hook_extra parameter became available. * * @param string $source File source location. * @param string $remote_source Remote file source location. * @param WP_Upgrader $this WP_Upgrader instance. + * @param array $hook_extra Extra arguments passed to hooked filters. */ - $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this ); + $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] ); if ( is_wp_error( $source ) ) { return $source;