apply_filters( 'enable_loading_object_cache_dropin', bool $enable_object_cache )
- Since
- 5.8.0
Filters whether to enable loading of the object-cache.php drop-in.
Description
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.
Compatibility
- WordPress
- since 5.8.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_object_cachebool- Whether to enable loading object-cache.php (if present).
Default true.
Where this hook fires · 1
wp-includes/load.php:850wp_start_object_cache()
Source code
* * @since 5.8.0 * * @param bool $enable_object_cache Whether to enable loading object-cache.php (if present). * Default true. */ if ( $first_init && apply_filters( 'enable_loading_object_cache_dropin', true ) ) { if ( ! function_exists( 'wp_cache_init' ) ) { /* * This is the normal situation. First-run of this function. No * caching backend has been loaded. * * We try to load a custom caching backend, and then, if itChangelog
Introduced in 5.8.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 7.1.0 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.