WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru WPmentor - Ищем топовых специалистов по WordPress, чтобы помочь вам заработать
фильтр не описан

upgrader_clear_destination хук-фильтр . WP 2.8.0

Filters whether the upgrader cleared the destination.

Использование

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

	return $removed;
}
$removed(true/WP_Error)
Whether the destination was cleared. true upon success, WP_Error on failure.
$local_destination(строка)
The local package destination.
$remote_destination(строка)
The remote package destination.
$hook_extra(массив)
Extra arguments passed to hooked filters.

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

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

Где используется хук (в ядре WP)

wp-admin/includes/class-plugin-upgrader.php 171
add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 );
wp-admin/includes/class-plugin-upgrader.php 198
remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ) );
wp-admin/includes/class-plugin-upgrader.php 238
add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 );
wp-admin/includes/class-plugin-upgrader.php 330
remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ) );
wp-admin/includes/class-theme-upgrader.php 285
add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ), 10, 4 );
wp-admin/includes/class-theme-upgrader.php 308
remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ) );
wp-admin/includes/class-theme-upgrader.php 349
add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ), 10, 4 );
wp-admin/includes/class-theme-upgrader.php 442
remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ) );