Revert [28563]. See #18298.

git-svn-id: https://develop.svn.wordpress.org/trunk@29044 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-07-09 18:06:54 +00:00
parent bdeb3348ed
commit 3cda5caafd
5 changed files with 14 additions and 20 deletions

View File

@@ -449,7 +449,7 @@ function get_comments_popup_template() {
/**
* Retrieve the name of the highest priority template file that exists.
*
* Searches in the stylesheet path before template path so that themes which
* Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
* inherit from a parent theme can just overload one file.
*
* @since 2.7.0
@@ -464,11 +464,11 @@ function locate_template($template_names, $load = false, $require_once = true )
foreach ( (array) $template_names as $template_name ) {
if ( !$template_name )
continue;
if ( file_exists( get_stylesheet_directory() . '/' . $template_name ) ) {
$located = get_stylesheet_directory() . '/' . $template_name;
if ( file_exists(STYLESHEETPATH . '/' . $template_name)) {
$located = STYLESHEETPATH . '/' . $template_name;
break;
} else if ( file_exists( get_template_directory() . '/' . $template_name ) ) {
$located = get_template_directory() . '/' . $template_name;
} else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) {
$located = TEMPLATEPATH . '/' . $template_name;
break;
}
}