Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: enable_loading_advanced_cache_dropin

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
73  *
74  * This filter runs before it can be used by plugins. It is designed for non-web
75  * run-times. If false is returned, advanced-cache.php will never be loaded.
76  *
77  * @since 4.6.0
78  *
79  * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
80  *                                    Default true.
81  */
82 if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
83      // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
84      WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
85
86      // Re-initialize any hooks added manually by advanced-cache.php
87      if ( $wp_filter ) {
88           $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
89      }
90 }
91