plugins_api_result хук-фильтрWP 2.7.0

Filters the Plugin Installation API response results.

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

add_filter( 'plugins_api_result', 'wp_kama_plugins_api_result_filter', 10, 3 );

/**
 * Function for `plugins_api_result` filter-hook.
 * 
 * @param object|WP_Error $res    Response object or WP_Error.
 * @param string          $action The type of information being requested from the Plugin Installation API.
 * @param object          $args   Plugin API arguments.
 *
 * @return object|WP_Error
 */
function wp_kama_plugins_api_result_filter( $res, $action, $args ){

	// filter...
	return $res;
}
$res(объект|WP_Error)
Response object or WP_Error.
$action(строка)
The type of information being requested from the Plugin Installation API.
$args(объект)
Plugin API arguments.

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

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

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

plugins_api()
plugins_api_result
wp-admin/includes/plugin-install.php 234
return apply_filters( 'plugins_api_result', $res, $action, $args );

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

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