WordPress.org

Make WordPress Core

Changeset 39565


Ignore:
Timestamp:
12/12/2016 01:28:34 AM (18 months ago)
Author:
dd32
Message:

Bootstrap: Re-initialize any hooks added manually by object-cache.php.
Prior to 3.1 if a object cache dropin wanted to add actions, they needed to use $wp_filter directly.

Props jorbin.
Fixes #39132.

File:
1 edited

Legend:

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

    r39323 r39565  
    473473 */
    474474function wp_start_object_cache() {
     475    global $wp_filter;
     476
    475477    $first_init = false;
    476478    if ( ! function_exists( 'wp_cache_init' ) ) {
     
    479481            if ( function_exists( 'wp_cache_init' ) ) {
    480482                wp_using_ext_object_cache( true );
     483            }
     484
     485            // Re-initialize any hooks added manually by object-cache.php
     486            if ( $wp_filter ) {
     487                $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
    481488            }
    482489        }
Note: See TracChangeset for help on using the changeset viewer.