Make WordPress Core

Ticket #14348: 14348-8.diff

File 14348-8.diff, 791 bytes (added by mbijon, 12 years ago)

Removed double action. Keeps corrected wp_die_handler

  • wp-includes/template-loader.php

     
    66if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
    77        do_action('template_redirect');
    88
     9/**
     10 * Halt template load for HEAD requests. Performance bump by eliminating output
     11 *
     12 * @since 3.5.0
     13 */
     14if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {
     15        $function = create_function( '', "return '_scalar_wp_die_handler';" );
     16        add_filter( 'wp_die_handler', $function );
     17        wp_die();
     18}
     19
    920// Process feeds and trackbacks even if not using themes.
    1021if ( is_robots() ) :
    1122        do_action('do_robots');