site_status_persistent_object_cache_thresholds
Filters the thresholds used to determine whether to suggest the use of a persistent object cache.
Usage
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.
Changelog
Since 6.1.0 | Introduced. |
Where the hook is called
site_status_persistent_object_cache_thresholds
wp-admin/includes/class-wp-site-health.php 3542-3553
$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, ) );