X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4f9d63e13cd8c6e275797c75b401b074b82937bc..refs/tags/wordpress-3.5.2-scripts:/wp-includes/template-loader.php diff --git a/wp-includes/template-loader.php b/wp-includes/template-loader.php index 7c72a05e..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'); @@ -43,5 +47,3 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : include( $template ); return; endif; - -?>