X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8f374b7233bc2815ccc387e448d208c5434eb961..refs/tags/wordpress-3.6.1-scripts:/wp-includes/template-loader.php diff --git a/wp-includes/template-loader.php b/wp-includes/template-loader.php index fdf75f15..7051f345 100644 --- a/wp-includes/template-loader.php +++ b/wp-includes/template-loader.php @@ -6,6 +6,10 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) do_action('template_redirect'); +// Halt template load for HEAD requests. Performance bump. See #14348 +if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) + exit(); + // Process feeds and trackbacks even if not using themes. if ( is_robots() ) : do_action('do_robots');