upgrader_post_install filter-hookWP 2.8.0

Filters the installation response after the installation has finished.

Usage

add_filter( 'upgrader_post_install', 'wp_kama_upgrader_post_install_filter', 10, 3 );

/**
 * Function for `upgrader_post_install` filter-hook.
 * 
 * @param bool  $response   Installation response.
 * @param array $hook_extra Extra arguments passed to hooked filters.
 * @param array $result     Installation result data.
 *
 * @return bool
 */
function wp_kama_upgrader_post_install_filter( $response, $hook_extra, $result ){

	// filter...
	return $response;
}
$response(true|false)
Installation response.
$hook_extra(array)
Extra arguments passed to hooked filters.
$result(array)
Installation result data.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

WP_Upgrader::install_package()
upgrader_post_install
wp-admin/includes/class-wp-upgrader.php 625
$res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );

Where the hook is used in WordPress

wp-admin/includes/class-plugin-upgrader.php 214
add_filter( 'upgrader_post_install', array( $this, 'active_after' ), 10, 2 );
wp-admin/includes/class-plugin-upgrader.php 241
remove_filter( 'upgrader_post_install', array( $this, 'active_after' ) );
wp-admin/includes/class-theme-upgrader.php 241
add_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ), 10, 3 );
wp-admin/includes/class-theme-upgrader.php 263
remove_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ) );
wp-admin/includes/class-theme-upgrader.php 317
add_filter( 'upgrader_post_install', array( $this, 'current_after' ), 10, 2 );
wp-admin/includes/class-theme-upgrader.php 340
remove_filter( 'upgrader_post_install', array( $this, 'current_after' ) );
wp-admin/includes/class-theme-upgrader.php 389
add_filter( 'upgrader_post_install', array( $this, 'current_after' ), 10, 2 );
wp-admin/includes/class-theme-upgrader.php 482
remove_filter( 'upgrader_post_install', array( $this, 'current_after' ) );