WordPress at a glance
filter is not described

upgrader_pre_install filter-hook . WP 2.8.0

Filters the install response before the installation has started.

Returning a truthy value, or one that could be evaluated as a WP_Error will effectively short-circuit the installation, returning that value instead.

Usage

add_filter( 'upgrader_pre_install', 'filter_function_name_358', 10, 2 );
function filter_function_name_358( $response, $hook_extra ){
	// filter...

	return $response;
}
$response(true/false/WP_Error)
Response.
$hook_extra(array)
Extra arguments passed to hooked filters.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

WP_Upgrader::install_package()
upgrader_pre_install
wp-admin/includes/class-wp-upgrader.php 486
$res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );

Where the hook is used (in WP core)

wp-admin/includes/class-plugin-upgrader.php 169
add_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ), 10, 2 );
wp-admin/includes/class-plugin-upgrader.php 193
remove_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ) );
wp-admin/includes/class-theme-upgrader.php 282
add_filter( 'upgrader_pre_install', array( $this, 'current_before' ), 10, 2 );
wp-admin/includes/class-theme-upgrader.php 305
remove_filter( 'upgrader_pre_install', array( $this, 'current_before' ) );
wp-admin/includes/class-theme-upgrader.php 346
add_filter( 'upgrader_pre_install', array( $this, 'current_before' ), 10, 2 );
wp-admin/includes/class-theme-upgrader.php 437
remove_filter( 'upgrader_pre_install', array( $this, 'current_before' ) );