WordPress.org

Make WordPress Core

Ticket #25488: 25488.patch

File 25488.patch, 1.4 KB (added by jonlynch, 6 years ago)
  • wp-includes/template-loader.php

     
    44 * @package WordPress
    55 */
    66if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
     7        /**
     8         * Fires before determining which template to load.
     9         *
     10         * @since 1.5.2
     11         */
    712        do_action('template_redirect');
    813
    9 // Halt template load for HEAD requests. Performance bump. See #14348
     14/**
     15 * Filter to allow HEAD requests to generate content.
     16 *
     17 * Performance bump. See #14348
     18 *
     19 * @since 3.5.0
     20 *
     21 * @param bool $exit Will WordPress exit without generating any content for HEAD
     22 * requests.
     23 */
    1024if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) )
    1125        exit();
    1226
    1327// Process feeds and trackbacks even if not using themes.
    1428if ( is_robots() ) :
     29        /**
     30         * Fired when the template loader determines a robots.txt request.
     31         *
     32         * @since 2.1.0
     33         */
    1534        do_action('do_robots');
    1635        return;
    1736elseif ( is_feed() ) :
     
    4463        else :
    4564                $template = get_index_template();
    4665        endif;
     66        /**
     67         * Filters the path of the template before including it.
     68         *
     69         * @since 3.0.0
     70         *
     71         * @param string $template The path of the template.
     72         */
    4773        if ( $template = apply_filters( 'template_include', $template ) )
    4874                include( $template );
    4975        return;