apply_filters( 'enable_loading_advanced_cache_dropin', bool $enable_advanced_cache )
- Since
- 4.6.0
Filters whether to enable loading of the advanced-cache.php drop-in.
Description
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.
Compatibility
- WordPress
- since 4.6.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$enable_advanced_cachebool- Whether to enable loading advanced-cache.php (if present).
Default true.
Where this hook fires · 2
wp-admin/includes/class-wp-site-health.php:3428WP_Site_Health::check_for_page_caching()wp-settings.php:97file scope
Source code
* * @since 4.6.0 * * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present). * Default true. */if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) { // For an advanced caching plugin to use. Uses a static drop-in because you would only want one. include WP_CONTENT_DIR . '/advanced-cache.php'; // Re-initialize any hooks added manually by advanced-cache.php. if ( $wp_filter ) { $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );Changelog
Introduced in 4.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.