Make WordPress Core

Ticket #58576: 58576.diff

File 58576.diff, 731 bytes (added by nihar007, 21 months ago)

Patch added

  • src/wp-includes/template.php

    diff --git a/src/wp-includes/template.php b/src/wp-includes/template.php
    index f071881d49..7ee7ec7eea 100644
    a b function locate_template( $template_names, $load = false, $load_once = true, $ar 
    705705                if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) {
    706706                        $located = STYLESHEETPATH . '/' . $template_name;
    707707                        break;
    708                 } elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
     708                } elseif ( STYLESHEETPATH !== TEMPLATEPATH && file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
    709709                        $located = TEMPLATEPATH . '/' . $template_name;
    710710                        break;
    711711                } elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {