site_status_persistent_object_cache_thresholds
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 | Введена. |
Где вызывается хук
site_status_persistent_object_cache_thresholds
wp-admin/includes/class-wp-site-health.php 3784-3795
$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, ) );