build_preinitialized_hooks example


if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) {
    // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.     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. wp_set_lang_dir();

// Load early WordPress files. require ABSPATH . WPINC . '/class-wp-list-util.php';
require ABSPATH . WPINC . '/formatting.php';
require ABSPATH . WPINC . '/meta.php';
require ABSPATH . WPINC . '/functions.php';
/** @var int[] $wp_actions */
global $wp_actions;

/** @var int[] $wp_filters */
global $wp_filters;

/** @var string[] $wp_current_filter */
global $wp_current_filter;

if ( $wp_filter ) {
    $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
} else {
    $wp_filter = array();
}

if ( ! isset( $wp_actions ) ) {
    $wp_actions = array();
}

if ( ! isset( $wp_filters ) ) {
    $wp_filters = array();
}


            if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
                require_once WP_CONTENT_DIR . '/object-cache.php';

                if ( function_exists( 'wp_cache_init' ) ) {
                    wp_using_ext_object_cache( true );
                }

                // Re-initialize any hooks added manually by object-cache.php.                 if ( $wp_filter ) {
                    $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
                }
            }
        } elseif ( ! wp_using_ext_object_cache() && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
            /* * Sometimes advanced-cache.php can load object-cache.php before * this function is run. This breaks the function_exists() check * above and can result in wp_using_ext_object_cache() returning * false when actually an external cache is in use. */
            wp_using_ext_object_cache( true );
        }
    }
Home | Imprint | This part of the site doesn't use cookies.