Make WordPress Core

Ticket #14348: 14348-4.diff

File 14348-4.diff, 683 bytes (added by mbijon, 13 years ago)

Mitcho's method, runs after 'template_redirect' but without hooking on it

  • wp-includes/template-loader.php

     
    66if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
    77        do_action('template_redirect');
    88
     9// Halt template load for HEAD requests, a performance bump
     10if ( !defined('PROCEED_AFTER_HEAD') || PROCEED_AFTER_HEAD !== true )
     11        if ( $_SERVER['REQUEST_METHOD'] == 'HEAD' && apply_filters( 'exit_on_http_head', true ) )
     12                exit();
     13
    914// Process feeds and trackbacks even if not using themes.
    1015if ( is_robots() ) :
    1116        do_action('do_robots');