enable_loading_object_cache_dropin хук-фильтрWP 5.8.0

Filters whether to enable loading of the object-cache.php drop-in.

This filter runs before it can be used by plugins. It is designed for non-web runtimes. If false is returned, object-cache.php will never be loaded.

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

add_filter( 'enable_loading_object_cache_dropin', 'wp_kama_enable_loading_object_cache_dropin_filter' );

/**
 * Function for `enable_loading_object_cache_dropin` filter-hook.
 * 
 * @param bool $enable_object_cache Whether to enable loading object-cache.php (if present).
 *
 * @return bool
 */
function wp_kama_enable_loading_object_cache_dropin_filter( $enable_object_cache ){

	// filter...
	return $enable_object_cache;
}
$enable_object_cache(true|false)
Whether to enable loading object-cache.php (if present).
По умолчанию: true

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

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

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

wp_start_object_cache()
enable_loading_object_cache_dropin
wp-includes/load.php 684
if ( $first_init && apply_filters( 'enable_loading_object_cache_dropin', true ) ) {

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

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