Make WordPress Core

Ticket #12635: template-loader.patch

File template-loader.patch, 734 bytes (added by koopersmith, 15 years ago)
  • wp-includes/template-loader.php

     
    3535        elseif ( is_archive()        && $template = get_archive_template()        ) :
    3636        elseif ( is_comments_popup() && $template = get_comments_popup_template() ) :
    3737        elseif ( is_paged()          && $template = get_paged_template()          ) :
    38         elseif ( file_exists( TEMPLATEPATH . '/index.php' ) ) :
    39                 $template = TEMPLATEPATH . '/index.php';
     38        else :
     39                $template = locate_template(array('index.php'));
    4040        endif;
    4141        if ( $template = apply_filters( 'template_include', $template ) )
    4242                include( $template );