site_status_good_response_time_threshold хук-фильтрWP 6.1.0

Filters the threshold below which a response time is considered good.

The default is based on https://web.dev/time-to-first-byte/.

Использование

add_filter( 'site_status_good_response_time_threshold', 'wp_kama_site_status_good_response_time_threshold_filter' );

/**
 * Function for `site_status_good_response_time_threshold` filter-hook.
 * 
 * @param int $threshold Threshold in milliseconds.
 *
 * @return int
 */
function wp_kama_site_status_good_response_time_threshold_filter( $threshold ){

	// filter...
	return $threshold;
}
$threshold(int)
Threshold in milliseconds.
По умолчанию: 600

Список изменений

С версии 6.1.0 Введена.

Где вызывается хук

WP_Site_Health::get_good_response_time_threshold()
site_status_good_response_time_threshold
wp-admin/includes/class-wp-site-health.php 3313
return (int) apply_filters( 'site_status_good_response_time_threshold', 600 );

Где используется хук в WordPress

Использование не найдено.