site_status_good_response_time_threshold
Filter HookDescription
Filters the threshold below which a response time is considered good. The default is based on https://web.dev/time-to-first-byte/.Hook Information
File Location |
wp-admin/includes/class-wp-site-health.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3501 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$threshold
|
Threshold in milliseconds. Default 600. |
Usage Examples
Basic Usage
<?php
// Hook into site_status_good_response_time_threshold
add_filter('site_status_good_response_time_threshold', 'my_custom_filter', 10, 1);
function my_custom_filter($threshold) {
// Your custom filtering logic here
return $threshold;
}
Source Code Context
wp-admin/includes/class-wp-site-health.php:3501
- How this hook is used in WordPress core
<?php
3496 *
3497 * @param int $threshold Threshold in milliseconds. Default 600.
3498 *
3499 * @since 6.1.0
3500 */
3501 return (int) apply_filters( 'site_status_good_response_time_threshold', 600 );
3502 }
3503
3504 /**
3505 * Determines whether to suggest using a persistent object cache.
3506 *
PHP Documentation
<?php
/**
* Filters the threshold below which a response time is considered good.
*
* The default is based on https://web.dev/time-to-first-byte/.
*
* @param int $threshold Threshold in milliseconds. Default 600.
*
* @since 6.1.0
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/class-wp-site-health.php
Related Hooks
Related hooks will be displayed here in future updates.