apply_filters( ‘upgrader_pre_download’, false|string|WP_Error $reply, string $package, WP_Upgrader $upgrader, array $hook_extra )

In this article

Filters whether to download a package for a WordPress core, plugin, theme, or translation upgrade.

Description

Return a non-false value to short-circuit the download and return that value instead.

Parameters

$replyfalse|string|WP_Error
Whether to short-circuit the download, the path to the downloaded package, or a WP_Error object. Default false.
$packagestring
The package URI. May be a remote URL or local file path.
$upgraderWP_Upgrader
The WP_Upgrader instance.
$hook_extraarray
Extra arguments passed to hooked filters.

Source

$reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );

Changelog

VersionDescription
5.5.0Added the $hook_extra parameter.
3.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.