Make WordPress Core


Ignore:
Timestamp:
06/08/2021 01:44:26 AM (3 years ago)
Author:
jorbin
Message:

Boostrap/Load: Add filter to allow disabling of object cache

In [37626] a filter was added to allow disabling the advanced cache dropin, but no similar filter was added for the object cache dropin. This corrects that oversight.

Fixes #53322.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/load.php

    r50947 r51087  
    666666
    667667    // Only perform the following checks once.
    668     if ( $first_init ) {
     668
     669    /**
     670     * Filters whether to enable loading of the objectcache.php drop-in.
     671     *
     672     * This filter runs before it can be used by plugins. It is designed for non-web
     673     * run-times. If false is returned, object-cache.php will never be loaded.
     674     *
     675     * @since 5.8.0
     676     *
     677     * @param bool $enable_object_cache Whether to enable loading object-cache.php (if present).
     678     *                                    Default true.
     679     */
     680    if ( $first_init && apply_filters( 'enable_loading_object_cache_dropin', true ) ) {
    669681        if ( ! function_exists( 'wp_cache_init' ) ) {
    670682            /*
Note: See TracChangeset for help on using the changeset viewer.