wp-admin/includes/class-wp-site-health.php:3389Returns a list of headers and its verification callback to verify if page cache is enabled or not.
arrayOne hook fires while WP_Site_Health::get_page_cache_headers() runs, in this order:
Filters the list of cache headers supported by core.
public function get_page_cache_headers() { $cache_hit_callback = static function ( $header_value ) { return str_contains( strtolower( $header_value ), 'hit' ); }; $cache_headers = array( 'cache-control' => static function ( $header_value ) { return (bool) preg_match( '/max-age=[1-9]/', $header_value ); }, 'expires' => static function ( $header_value ) { return strtotime( $header_value ) > time(); }, 'age' => static function ( $header_value ) { return is_numeric( $header_value ) && $header_value > 0; }, 'last-modified' => '', 'etag' => '', 'x-cache-enabled' => static function ( $header_value ) { return 'true' === strtolower( $header_value ); }, 'x-cache-disabled' => static function ( $header_value ) { return ( 'on' !== strtolower( $header_value ) ); }, 'x-srcache-store-status' => $cache_hit_callback, 'x-srcache-fetch-status' => $cache_hit_callback, ); /** * Filters the list of cache headers supported by core. * * @since 6.1.0 * * @param array $cache_headers Array of supported cache headers. */ return apply_filters( 'site_status_page_cache_supported_cache_headers', $cache_headers ); }Introduced in 6.1.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
array to array<string,.verified against sourcesrc/wp-admin/includes/class-wp-site-health.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.