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

Filters whether to suggest use of a persistent object cache and bypass default threshold checks.

Using this filter allows to override the default logic, effectively short-circuiting the method.

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

add_filter( 'site_status_should_suggest_persistent_object_cache', 'wp_kama_site_status_should_suggest_persistent_object_cache_filter' );

/**
 * Function for `site_status_should_suggest_persistent_object_cache` filter-hook.
 * 
 * @param bool|null $suggest Boolean to short-circuit, for whether to suggest using a persistent object cache.
 *
 * @return bool|null
 */
function wp_kama_site_status_should_suggest_persistent_object_cache_filter( $suggest ){

	// filter...
	return $suggest;
}
$suggest(true|false|null)
Boolean to short-circuit, for whether to suggest using a persistent object cache.
По умолчанию: null

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

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

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

WP_Site_Health::should_suggest_persistent_object_cache()
site_status_should_suggest_persistent_object_cache
wp-admin/includes/class-wp-site-health.php 3531
$short_circuit = apply_filters( 'site_status_should_suggest_persistent_object_cache', null );

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

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