enable_loading_advanced_cache_dropin filter-hookWP 4.6.0

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.

Usage

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).
Default: true

Changelog

Since 4.6.0 Introduced.

Where the hook is called

In file: /wp-settings.php
enable_loading_advanced_cache_dropin
wp-settings.php 95
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 3433
apply_filters( 'enable_loading_advanced_cache_dropin', true )

Where the hook is used in WordPress

Usage not found.