Commit c26c3117 authored by catch's avatar catch

Issue #1760530 by jenlampton, Albert Volkman, crazyrohila, Risse, justafish,...

Issue #1760530 by jenlampton, Albert Volkman, crazyrohila, Risse, justafish, Fabianx: Move all template files provided by core modules and themes into a 'templates' directory inside that module directory.
parent 16179ec2
......@@ -466,7 +466,7 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) {
if (isset($info['template'])) {
// Prepend the current theming path when none is set.
if (!isset($info['path'])) {
$result[$hook]['template'] = $path . '/' . $info['template'];
$result[$hook]['template'] = $path . '/templates/' . $info['template'];
}
}
......@@ -1226,7 +1226,7 @@ function drupal_find_theme_templates($cache, $extension, $path) {
// Match templates based on the 'template' filename.
foreach ($cache as $hook => $info) {
if (isset($info['template'])) {
$template_candidates = array($info['template'], str_replace($info['theme path'] . '/', '', $info['template']));
$template_candidates = array($info['template'], str_replace($info['theme path'] . '/templates/', '', $info['template']));
if (in_array($template, $template_candidates)) {
$implementations[$hook] = array(
'template' => $template,
......
......@@ -40,7 +40,6 @@ function toolbar_theme($existing, $type, $theme, $path) {
$items['toolbar'] = array(
'render element' => 'toolbar',
'template' => 'toolbar',
'path' => drupal_get_path('module', 'toolbar'),
);
$items['toolbar_toggle'] = array(
'variables' => array(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment