wp_http_accept_encoding filter-hookWP 3.6.0

Filters the allowed encoding types.

Usage

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(string)
URL of the HTTP request.
$args(array)
HTTP request arguments.

Changelog

Since 3.6.0 Introduced.

Where the hook is called

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

Where the hook is used in WordPress

Usage not found.