WordPress at a glance
filter is not described

upgrader_clear_destination filter-hook . WP 2.8.0

Filters whether the upgrader cleared the destination.

Usage

add_filter( 'upgrader_clear_destination', 'filter_function_name_5182', 10, 4 );
function filter_function_name_5182( $removed, $local_destination, $remote_destination, $hook_extra ){
	// filter...

	return $removed;
}
$removed(mixed)
Whether the destination was cleared. true on success, WP_Error on failure
$local_destination(string)
The local package destination.
$remote_destination(string)
The remote package destination.
$hook_extra(array)
Extra arguments passed to hooked filters.

Where the hook is called

WP_Upgrader::install_package()
wp-admin/includes/class-wp-upgrader.php 547
$removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );

Where the hook is used (in WP core)

wp-admin/includes/class-theme-upgrader.php 268
add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
wp-admin/includes/class-theme-upgrader.php 289
remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
wp-admin/includes/class-theme-upgrader.php 329
add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
wp-admin/includes/class-theme-upgrader.php 411
remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
wp-admin/includes/class-plugin-upgrader.php 167
add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
wp-admin/includes/class-plugin-upgrader.php 189
remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
wp-admin/includes/class-plugin-upgrader.php 228
add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
wp-admin/includes/class-plugin-upgrader.php 311
remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));