do_action_ref_array( 'send_headers', WP $wp )
Fires once the requested HTTP headers for caching, content type, etc. have been sent.
Parameters
-
$wp
WP -
Current WordPress environment instance (passed by reference).
More Information
This action hook is used to add additional headers to the outgoing HTTP response.
Source
File: wp-includes/class-wp.php
.
View all references
do_action_ref_array( 'send_headers', array( &$this ) );
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
As an example: HTML5 Boilerplate provides an X-UA-Compatible meta element by default. This element breaks validation but can be moved to a header. Adding the following to functions.php fixes the validation issue and provides IE users a better experience.
Example migrated from Codex:
As an example: HTML5 Boilerplate provides an X-UA-Compatible meta element by default. This element breaks validation, but can be moved to a header. Adding the following to functions.php fixes the validation issue and provides IE users a better experience.
Example of how to conditionally send a header, replacing previously set header, if any…