wp_http_accept_encoding
Filter HookDescription
Filters the allowed encoding types.Hook Information
File Location |
wp-includes/class-wp-http-encoding.php
View on GitHub
|
Hook Type | Filter |
Line Number | 184 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$type
|
Array of what encoding types to accept and their priority values. |
string
|
$url
|
URL of the HTTP request. |
array
|
$args
|
HTTP request arguments. |
Usage Examples
Basic Usage
<?php
// Hook into wp_http_accept_encoding
add_filter('wp_http_accept_encoding', 'my_custom_filter', 10, 3);
function my_custom_filter($type, $url, $args) {
// Your custom filtering logic here
return $type;
}
Source Code Context
wp-includes/class-wp-http-encoding.php:184
- How this hook is used in WordPress core
<?php
179 *
180 * @param string[] $type Array of what encoding types to accept and their priority values.
181 * @param string $url URL of the HTTP request.
182 * @param array $args HTTP request arguments.
183 */
184 $type = apply_filters( 'wp_http_accept_encoding', $type, $url, $args );
185
186 return implode( ', ', $type );
187 }
188
189 /**
PHP Documentation
<?php
/**
* Filters the allowed encoding types.
*
* @since 3.6.0
*
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/class-wp-http-encoding.php
Related Hooks
Related hooks will be displayed here in future updates.