site_status_good_response_time_threshold
云策文档标注
概述
此文档介绍了一个用于过滤响应时间良好阈值的 WordPress Hook。默认阈值基于 web.dev 标准,开发者可以自定义此值以调整性能评估标准。
关键要点
- Hook 名称:site_status_good_response_time_threshold
- 参数:$threshold,整数类型,单位为毫秒,默认值为 600
- 用途:定义响应时间被视为良好的阈值,影响站点健康检查中的性能评估
- 相关函数:WP_Site_Health::get_good_response_time_threshold() 用于获取此阈值
- 引入版本:WordPress 6.1.0
原文内容
Filters the threshold below which a response time is considered good.
Description
The default is based on https://web.dev/time-to-first-byte/.
Parameters
$thresholdint-
Threshold in milliseconds. Default 600.
Source
return (int) apply_filters( 'site_status_good_response_time_threshold', 600 );
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |