Add ability to filter WP_Upgrader packages before upgrade
|Reported by:||nofearinc||Owned by:||dd32|
Although #22378 adds a upgrader_pre_download filter which allows for denying a package for an update, there are cases where we would need to filter the package options or even trigger the upgrader_pre_download filter based on other arguments before that.
A good example would be changing the destination to a local file or an internal repository (like a CDN for plugins) for an internal network for bandwidth or speed purposes.
I'm adding a sample upgrader_package_options filter right before extracting the options in the run() function which is the central point and the last step in the stack for this after calling functions like install() or upgrade() have been fired from different places.
Change History (12)
2 years ago
- Keywords commit added; needs-docs removed
- Milestone changed from Awaiting Review to 4.3