Changeset 61406
- Timestamp:
- 12/24/2025 05:06:43 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/class-wp-upgrader.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-upgrader.php
r61387 r61406 293 293 294 294 /** 295 * Downloads a package .295 * Downloads a package for a WordPress core, plugin, theme, or translation upgrade. 296 296 * 297 297 * @since 2.8.0 … … 299 299 * @since 5.5.0 Added the `$hook_extra` parameter. 300 300 * 301 * @param string $package The URI of the package. If this is the full path to an302 * existing local file, it will be returned untouched.301 * @param string $package The URI of the package. May be a remote URL or local file path. If this is the full 302 * path to an existing local file, it will be returned untouched. 303 303 * @param bool $check_signatures Whether to validate file signatures. Default false. 304 304 * @param array $hook_extra Extra arguments to pass to the filter hooks. Default empty array. … … 307 307 public function download_package( $package, $check_signatures = false, $hook_extra = array() ) { 308 308 /** 309 * Filters whether to return the package. 309 * Filters whether to download a package for a WordPress core, plugin, theme, or translation upgrade. 310 * 311 * Return a non-false value to short-circuit the download and return that value instead. 310 312 * 311 313 * @since 3.7.0 312 314 * @since 5.5.0 Added the `$hook_extra` parameter. 313 315 * 314 * @param bool $reply Whether to bail without returning the package.315 * Default false.316 * @param string $package The package file name.317 * @param WP_Upgrader $upgrader The WP_Upgrader instance.318 * @param array $hook_extra Extra arguments passed to hooked filters.316 * @param false|string|WP_Error $reply Whether to short-circuit the download, the path to the downloaded package, 317 * or a WP_Error object. Default false. 318 * @param string $package The package URI. May be a remote URL or local file path. 319 * @param WP_Upgrader $upgrader The WP_Upgrader instance. 320 * @param array $hook_extra Extra arguments passed to hooked filters. 319 321 */ 320 322 $reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ); … … 520 522 $args = wp_parse_args( $args, $defaults ); 521 523 522 // These were previously extract()'d.523 524 $source = $args['source']; 524 525 $destination = $args['destination']; … … 593 594 * @since 4.4.0 The `$hook_extra` parameter became available. 594 595 * 595 * @param string $source File source location.596 * @param string $remote_source Remote file source location.597 * @param WP_Upgrader $upgrader WP_Upgrader instance.598 * @param array $hook_extra Extra arguments passed to hooked filters.596 * @param string|WP_Error $source File source location or a WP_Error object. 597 * @param string $remote_source Remote file source location. 598 * @param WP_Upgrader $upgrader WP_Upgrader instance. 599 * @param array $hook_extra Extra arguments passed to hooked filters. 599 600 */ 600 601 $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
Note: See TracChangeset
for help on using the changeset viewer.