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

Filters the allowed encoding types.

Parameters Parameters


(string[]) Array of what encoding types to accept and their priority values.


(string) URL of the HTTP request.


(array) HTTP request arguments.

Top ↑

More Information More Information

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

Top ↑

Source Source

File: wp-includes/class-wp-http-encoding.php

View on Trac

Top ↑

Changelog Changelog

Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by stevenlinx

    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.