wp_http_accept_encoding хук-фильтрWP 3.6.0

Filters the allowed encoding types.

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

add_filter( 'wp_http_accept_encoding', 'wp_kama_http_accept_encoding_filter', 10, 3 );

/**
 * Function for `wp_http_accept_encoding` filter-hook.
 * 
 * @param string[] $type Array of what encoding types to accept and their priority values.
 * @param string   $url  URL of the HTTP request.
 * @param array    $args HTTP request arguments.
 *
 * @return string[]
 */
function wp_kama_http_accept_encoding_filter( $type, $url, $args ){

	// filter...
	return $type;
}
$type(string[])
Array of what encoding types to accept and their priority values.
$url(строка)
URL of the HTTP request.
$args(массив)
HTTP request arguments.

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

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

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

WP_Http_Encoding::accept_encoding()
wp_http_accept_encoding
wp-includes/class-wp-http-encoding.php 184
$type = apply_filters( 'wp_http_accept_encoding', $type, $url, $args );

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

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