upgrader_install_package_result хук-фильтрWP 5.7.0

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

add_filter( 'upgrader_install_package_result', 'wp_kama_upgrader_install_package_result_filter', 10, 2 );

/**
 * Function for `upgrader_install_package_result` filter-hook.
 * 
 * @param array|WP_Error $result     Result from WP_Upgrader::install_package().
 * @param array          $hook_extra Extra arguments passed to hooked filters.
 *
 * @return array|WP_Error
 */
function wp_kama_upgrader_install_package_result_filter( $result, $hook_extra ){

	// filter...
	return $result;
}
$result(массив|WP_Error)
Result from WP_Upgrader::install_package().
$hook_extra(массив)
Extra arguments passed to hooked filters.

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

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

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

WP_Upgrader::run()
upgrader_install_package_result
wp-admin/includes/class-wp-upgrader.php 811
$result = apply_filters( 'upgrader_install_package_result', $result, $options['hook_extra'] );

Где используется хук в WordPress

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