wp_headers filter-hook . WP 2.8.0
Filters the HTTP headers before they're sent to the browser.
Usage
add_filter( 'wp_headers', 'filter_function_name_6667', 10, 2 ); function filter_function_name_6667( $headers, $this ){ // filter... return $headers; }
- $headers(string[])
- Associative array of headers to be sent.
- $this(WP)
- Current WordPress environment instance.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
wp_headers
wp-includes/class-wp.php 490
$headers = apply_filters( 'wp_headers', $headers, $this );
Where in WP core the hook is used WordPress
wp-includes/class-wp.php 1904
add_filter( 'wp_headers', array( $this, 'filter_iframe_security_headers' ) );