apply_filters( ‘wp_http_accept_encoding’, string[] $type, string $url, array $args )

Filters the allowed encoding types.

Parameters

$typestring[]
Array of what encoding types to accept and their priority values.
$urlstring
URL of the HTTP request.
$argsarray
HTTP request arguments.

More Information

Note that the filter function must return a $type value after it is finished processing or the HTTP call will fail.

Source

$type = apply_filters( 'wp_http_accept_encoding', $type, $url, $args );

Changelog

VersionDescription
3.6.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    Example Migrated from Codex:

    add_filter( 'wp_http_accept_encoding', 'filter_function_name', 10, 3 );
    
    function filter_function_name( $type, $url, $args ) {
        // Write code below to alter available encoding types here
        return $type;
    }
    
    add_action( 'init', 'get_google_home' );
    
    function get_google_home() {
        $google = wp_remote_get( "http://google.com" );
    }

You must log in before being able to contribute a note or feedback.