Project

General

Profile

Filter and Action Hooks

NOTICE: This page is a draft

Available Filter Hooks

The following filters can be used to further customize the HTTP headers.

addh_options

Applied to the plugin options array. The hooked function should accept and return 1 argument: an array of options. See the example in the configuration section above.

addh_cache_control_header_format

Applied to the template that is used to generate the `Cache-Control` header's value. The hooked function should accept and return 1 argument: a string. The default template is "`public, max-age=%s`". The template must have one `%s` placeholder for the max-age seconds.

addh_headers

Applied to all HTTP headers that have been generated by Add-Headers before they are sent to the client. The hooked function should accept and return 1 argument: an array of HTTP headers (strings).

addh_headers_feed

Applied to all HTTP headers that have been generated by Add-Headers for a feed. The hooked function should accept and return 1 argument: an array of HTTP headers (strings).

addh_archive_post

Applied to the post object that is used in order to generate HTTP headers for the whole archive. The hooked function should accept and return 1 argument: a post object.

addh_supported_post_types_singular

Applied to the array of post types that are supported on pages where `is_singular()` is true. By default, regular posts, pages, attachments and public custom post types are supported. The hooked function should accept and return 1 argument: an array of post types.

addh_supported_post_types_archive

Applied to the array of post types that are supported on pages where `is_archive()` is true. By default, regular posts and public custom post types are supported. The hooked function should accept and return 1 argument: an array of post types.