Make WordPress Core

Ticket #27122: shutdown_flush.diff

File shutdown_flush.diff, 1.6 KB (added by dunglas, 11 years ago)
  • default-filters.php

     
    247247add_action( 'init',                       'smilies_init',                             5    );
    248248add_action( 'plugins_loaded',             'wp_maybe_load_widgets',                    0    );
    249249add_action( 'plugins_loaded',             'wp_maybe_load_embeds',                     0    );
    250 add_action( 'shutdown',                   'wp_ob_end_flush_all',                      1    );
     250add_action( 'shutdown',                   'wp_shutdown_flush',                        1    );
    251251add_action( 'post_updated',               'wp_save_post_revision',                   10, 1 );
    252252add_action( 'publish_post',               '_publish_post_hook',                       5, 1 );
    253253add_action( 'transition_post_status',     '_transition_post_status',                  5, 3 );
  • functions.php

     
    27912791}
    27922792
    27932793/**
     2794 * Flush all output buffers, and close the connection if fastcgi_finish_request is available.
     2795 *
     2796 * @since 3.8.2
     2797 */
     2798function wp_shutdown_flush() {
     2799    if (!WP_DEBUG && function_exists('fastcgi_finish_request')) {
     2800        fastcgi_finish_request();
     2801    } else {
     2802        wp_ob_end_flush_all();
     2803    }
     2804}
     2805
     2806/**
    27942807 * Load custom DB error or display WordPress DB error.
    27952808 *
    27962809 * If a file exists in the wp-content directory named db-error.php, then it will