Make WordPress Core

Ticket #13239: 24944.diff

File 24944.diff, 617 bytes (added by georgestephanis, 11 years ago)

An alternate method.

  • wp-includes/template.php

     
    366366 * @return string The template filename if one is located.
    367367 */
    368368function locate_template($template_names, $load = false, $require_once = true ) {
    369         $located = '';
     369        $located = apply_filters( 'locate_template_override', '', $template_names, $load, $require_once );
     370
     371        if ( $located )
     372                return $located;
     373
    370374        foreach ( (array) $template_names as $template_name ) {
    371375                if ( !$template_name )
    372376                        continue;