IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>windows-1250
|
|
|
|
| 401 | 401 | */ |
| 402 | 402 | function locate_template($template_names, $load = false, $require_once = true ) { |
| 403 | 403 | $located = ''; |
| | 404 | |
| | 405 | $dirs = apply_filters('template_dirs', array(10 => STYLESHEETPATH, 20 => TEMPLATEPATH), $template_names); |
| | 406 | |
| | 407 | ksort($dirs); |
| | 408 | |
| 404 | 409 | foreach ( (array) $template_names as $template_name ) { |
| 405 | 410 | if ( !$template_name ) |
| 406 | 411 | continue; |
| 407 | | if ( file_exists(STYLESHEETPATH . '/' . $template_name)) { |
| 408 | | $located = STYLESHEETPATH . '/' . $template_name; |
| 409 | | break; |
| 410 | | } else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) { |
| 411 | | $located = TEMPLATEPATH . '/' . $template_name; |
| 412 | | break; |
| | 412 | |
| | 413 | foreach($dirs AS $dir){ |
| | 414 | if ( file_exists($dir . '/' . $template_name)) { |
| | 415 | $located = $dir . '/' . $template_name; |
| | 416 | break; |
| | 417 | } |
| 413 | 418 | } |
| 414 | 419 | } |
| 415 | 420 | |