WP_Hook: Re-initialize any actions added directly to `$wp_filter` by `advanced-cache.php`.

Props dd32, ocean90.
Merges [39369] to the 4.7 branch.
Fixes #38929.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39370 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2016-11-29 05:38:16 +00:00
parent 8955cbe08a
commit 356b9ebdc2
1 changed files with 6 additions and 1 deletions

View File

@ -80,8 +80,13 @@ wp_debug_mode();
* Default true.
*/
if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
// For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
// For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @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 );
}
}
// Define WP_LANG_DIR if not set.