site_status_should_suggest_persistent_object_cache
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 | Введена. |
Где вызывается хук
site_status_should_suggest_persistent_object_cache
wp-admin/includes/class-wp-site-health.php 3597
$short_circuit = apply_filters( 'site_status_should_suggest_persistent_object_cache', null );