apply_filters( 'upgrader_clear_destination', true|WP_Error $removed, string $local_destination, string $remote_destination, array $hook_extra )
- Since
- 2.8.0
Filters whether the upgrader cleared the destination.
Compatibility
- WordPress
- since 2.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$removedtrue|WP_Error- Whether the destination was cleared.
True upon success, WP_Error on failure. $local_destinationstring- The local package destination.
$remote_destinationstring- The remote package destination.
$hook_extraarray- Extra arguments passed to hooked filters.
Where this hook fires · 1
wp-admin/includes/class-wp-upgrader.php:659WP_Upgrader::install_package()
Source code
* @param true|WP_Error $removed Whether the destination was cleared. * True upon success, WP_Error on failure. * @param string $local_destination The local package destination. * @param string $remote_destination The remote package destination. * @param array $hook_extra Extra arguments passed to hooked filters. */ $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] ); if ( is_wp_error( $removed ) ) { return $removed; } } elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) { /*Changelog
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.