diff --git a/wp-includes/theme.php b/wp-includes/theme.php
index 00db024..f985490 100644
a
|
b
|
function locate_template($template_names, $load = false, $require_once = true ) |
1017 | 1017 | if ( !is_array($template_names) ) |
1018 | 1018 | return ''; |
1019 | 1019 | |
| 1020 | $template_names = apply_filters( 'locate_template', $template_names ); |
| 1021 | |
1020 | 1022 | $located = ''; |
1021 | 1023 | foreach ( $template_names as $template_name ) { |
1022 | 1024 | if ( !$template_name ) |
1023 | 1025 | continue; |
1024 | | if ( file_exists(STYLESHEETPATH . '/' . $template_name)) { |
| 1026 | |
| 1027 | $template_name = apply_filters( "locate_template-$template_name", $template_name ); |
| 1028 | |
| 1029 | if ( file_exists($template_name) ) { |
| 1030 | $located = $template_name; |
| 1031 | break; |
| 1032 | } else if ( file_exists(STYLESHEETPATH . '/' . $template_name) ) { |
1025 | 1033 | $located = STYLESHEETPATH . '/' . $template_name; |
1026 | 1034 | break; |
1027 | 1035 | } else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) { |