Make WordPress Core

Ticket #17817: 17817.27.diff

File 17817.27.diff, 2.1 KB (added by dd32, 8 years ago)

Upgrade filters added manually in advanced-cache.php

  • src/wp-settings.php

    wp_debug_mode(); 
    7272 * Filters whether to enable loading of the advanced-cache.php drop-in.
    7373 *
    7474 * This filter runs before it can be used by plugins. It is designed for non-web
    7575 * run-times. If false is returned, advanced-cache.php will never be loaded.
    7676 *
    7777 * @since 4.6.0
    7878 *
    7979 * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
    8080 *                                    Default true.
    8181 */
    8282if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
    8383// For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
    8484        WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
    8585}
    8686
     87// Re-initialize any hooks added manually by advanced-cache.php
     88if ( $wp_filter ) {
     89        $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
     90}
     91
    8792// Define WP_LANG_DIR if not set.
    8893wp_set_lang_dir();
    8994
    9095// Load early WordPress files.
    9196require( ABSPATH . WPINC . '/compat.php' );
    9297require( ABSPATH . WPINC . '/class-wp-list-util.php' );
    9398require( ABSPATH . WPINC . '/functions.php' );
    9499require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
    95100require( ABSPATH . WPINC . '/class-wp.php' );
    96101require( ABSPATH . WPINC . '/class-wp-error.php' );
     102// Patch NOTE; plugins.php was required here previously (<=4.5) none of the above include userfiles though
    97103require( ABSPATH . WPINC . '/pomo/mo.php' );
    98104require( ABSPATH . WPINC . '/class-phpass.php' );
    99105
    100106// Include the wpdb class and, if present, a db.php database drop-in.
    101107global $wpdb;
    102108require_wp_db();
    103109
    104110// Set the database table prefix and the format specifiers for database table columns.
    105111$GLOBALS['table_prefix'] = $table_prefix;
    106112wp_set_wpdb_vars();
    107113
    108114// Start the WordPress object cache, or an external object cache if the drop-in is present.
    109115wp_start_object_cache();
    110116
    111117// Attach the default filters.