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

Filters the thresholds used to determine whether to suggest the use of a persistent object cache.

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

add_filter( 'site_status_persistent_object_cache_thresholds', 'wp_kama_site_status_persistent_object_cache_thresholds_filter' );

/**
 * Function for `site_status_persistent_object_cache_thresholds` filter-hook.
 * 
 * @param int[] $thresholds The list of threshold numbers keyed by threshold name.
 *
 * @return int[]
 */
function wp_kama_site_status_persistent_object_cache_thresholds_filter( $thresholds ){

	// filter...
	return $thresholds;
}
$thresholds(int[])
The list of threshold numbers keyed by threshold name.

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

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

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

WP_Site_Health::should_suggest_persistent_object_cache()
site_status_persistent_object_cache_thresholds
wp-admin/includes/class-wp-site-health.php 3547-3558
$thresholds = apply_filters(
	'site_status_persistent_object_cache_thresholds',
	array(
		'alloptions_count' => 500,
		'alloptions_bytes' => 100000,
		'comments_count'   => 1000,
		'options_count'    => 1000,
		'posts_count'      => 1000,
		'terms_count'      => 1000,
		'users_count'      => 1000,
	)
);

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

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