钩子文档

site_status_page_cache_supported_cache_headers

💡 云策文档标注

概述

此文档介绍 WordPress 核心中用于过滤支持的缓存头列表的 Hook。它允许开发者修改或扩展核心识别的缓存头,常用于站点健康检查功能。

关键要点

  • Hook 名称:site_status_page_cache_supported_cache_headers
  • 用途:过滤核心支持的缓存头数组,影响 WP_Site_Health::get_page_cache_headers() 方法
  • 参数:$cache_headers,一个数组,包含支持的缓存头
  • 引入版本:WordPress 6.1.0

📄 原文内容

Filters the list of cache headers supported by core.

Parameters

$cache_headersarray
Array of supported cache headers.

Source

return apply_filters( 'site_status_page_cache_supported_cache_headers', $cache_headers );

Changelog

Version Description
6.1.0 Introduced.