Changeset 48399
- Timestamp:
- 07/07/2020 07:13:30 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-upgrader.php
r48390 r48399 249 249 * existing local file, it will be returned untouched. 250 250 * @param bool $check_signatures Whether to validate file signatures. Default false. 251 * @param array $hook_extra Extra arguments to pass to the filter hooks. Default empty array. 251 252 * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object. 252 253 */ 253 public function download_package( $package, $check_signatures = false ) { 254 254 public function download_package( $package, $check_signatures = false, $hook_extra = array() ) { 255 255 /** 256 256 * Filters whether to return the package. … … 258 258 * @since 3.7.0 259 259 * 260 * @param bool $reply Whether to bail without returning the package. 261 * Default false. 262 * @param string $package The package file name. 263 * @param WP_Upgrader $this The WP_Upgrader instance. 260 * @param bool $reply Whether to bail without returning the package. 261 * Default false. 262 * @param string $package The package file name. 263 * @param WP_Upgrader $this The WP_Upgrader instance. 264 * @param array $hook_extra Extra arguments passed to hooked filters. 264 265 */ 265 $reply = apply_filters( 'upgrader_pre_download', false, $package, $this );266 $reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ); 266 267 if ( false !== $reply ) { 267 268 return $reply; … … 738 739 * of the file if the package is a local file) 739 740 */ 740 $download = $this->download_package( $options['package'], true );741 $download = $this->download_package( $options['package'], true, $options['hook_extra'] ); 741 742 742 743 // Allow for signature soft-fail.
Note: See TracChangeset
for help on using the changeset viewer.