Make WordPress Core

Ticket #25487: 25487.2.patch

File 25487.2.patch, 873 bytes (added by DrewAPicture, 12 years ago)

Final

  • src/wp-includes/template.php

     
    2626        if ( empty( $templates ) )
    2727                $templates = array("{$type}.php");
    2828
    29         return apply_filters( "{$type}_template", locate_template( $templates ) );
     29        $template = locate_template( $templates );
     30        /**
     31         * Filter the path of the queried template by type.
     32         *
     33         * The dynamic portion of the hook name, $type, refers to the filename
     34         * -- minus the extension -- of the file to load. This hook also applies
     35         * to various types of files loaded as part of the Template Hierarchy.
     36         *
     37         * @since 1.5.2
     38         *
     39         * @param string $template Path to the template. @see locate_template()
     40         */
     41        return apply_filters( "{$type}_template", $template );
    3042}
    3143
    3244/**