diff --git a/core/includes/theme.inc b/core/includes/theme.inc index f606179..0319b78 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -569,11 +569,6 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) { $result[$hook]['includes'][] = $themed_path . '/' . $info['file']; } - // Do the same for template files. - if (isset($info['template'])) { - $result[$hook]['template'] = $themed_path . '/' . $info['template']; - } - // If the default keys are not set, use the default values registered // by the module. if (isset($cache[$hook])) { @@ -1170,6 +1165,11 @@ function theme($hook, $variables = array()) { } // Render the output using the template file. + $template_file = $info['template'] . $extension; + if (isset($info['path'])) { + $template_file = $info['path'] . '/' . $template_file; + } + $output = $render_function($template_file, $variables); }