enable_loading_object_cache_dropin
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.
Usage
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).
Default: true
Changelog
Since 5.8.0 | Introduced. |
Where the hook is called
enable_loading_object_cache_dropin
wp-includes/load.php 823
if ( $first_init && apply_filters( 'enable_loading_object_cache_dropin', true ) ) {