translations_api_result хук-фильтрWP 4.0.0

Filters the Translation Installation API response results.

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

add_filter( 'translations_api_result', 'wp_kama_translations_api_result_filter', 10, 3 );

/**
 * Function for `translations_api_result` filter-hook.
 * 
 * @param array|WP_Error $res  Response as an associative array or WP_Error.
 * @param string         $type The type of translations being requested.
 * @param object         $args Translation API arguments.
 *
 * @return array|WP_Error
 */
function wp_kama_translations_api_result_filter( $res, $type, $args ){

	// filter...
	return $res;
}
$res(массив|WP_Error)
Response as an associative array or WP_Error.
$type(строка)
The type of translations being requested.
$args(объект)
Translation API arguments.

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

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

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

translations_api()
translations_api_result
wp-admin/includes/translation-install.php 109
return apply_filters( 'translations_api_result', $res, $type, $args );

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

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