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

Filters the allowed encoding types.


Array of what encoding types to accept and their priority values.
URL of the HTTP request.
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.


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



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( "" );

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