WordPress.org

Make WordPress Core

Ticket #30000: 30000.2.diff

File 30000.2.diff, 625 bytes (added by rmccue, 6 years ago)

Patch from https://github.com/WordPress/WordPress/pull/189

  • wp-includes/template.php

    diff --git a/wp-includes/template.php b/wp-includes/template.php
    index b2e4e24..dd91d3b 100644
    a b function get_query_template( $type, $templates = array() ) { 
    2626        if ( empty( $templates ) )
    2727                $templates = array("{$type}.php");
    2828
     29       
     30               
     31        /**
     32         * Filter the template target filenames.
     33         *
     34         * @since 4.5.0
     35         *
     36         * @param array $templates templates to search for.
     37         * @param string $type Template type.
     38         */
     39        $templates = apply_filters( "get_query_template", $templates, $type );
     40               
     41
     42       
    2943        $template = locate_template( $templates );
    3044
    3145        /**