enable_loading_advanced_cache_dropin
Filters whether to enable loading of the advanced-cache.php drop-in.
This filter runs before it can be used by plugins. It is designed for non-web run-times. If false is returned, advanced-cache.php will never be loaded.
Использование
add_filter( 'enable_loading_advanced_cache_dropin', 'wp_kama_enable_loading_advanced_cache_dropin_filter' ); /** * Function for `enable_loading_advanced_cache_dropin` filter-hook. * * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present). * * @return bool */ function wp_kama_enable_loading_advanced_cache_dropin_filter( $enable_advanced_cache ){ // filter... return $enable_advanced_cache; }
- $enable_advanced_cache(true|false)
- Whether to enable loading advanced-cache.php (if present).
По умолчанию: true
Список изменений
С версии 4.6.0 | Введена. |
Где вызывается хук
В файле: /wp-settings.php
enable_loading_advanced_cache_dropin
wp-settings.php 96
if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) {
wp-admin/includes/class-wp-site-health.php 3428
apply_filters( 'enable_loading_advanced_cache_dropin', true )