summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt2
-rw-r--r--zen-internals/template.theme-registry.inc26
2 files changed, 18 insertions, 10 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index de5351b..b353858 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,5 +1,6 @@
Zen 6.x-2.x-dev, xxxx-xx-xx (development release)
---------------------------
+- #962356: Convert region template suggestions into theme hook suggestions
- #978640 by marcvangend: Whitespace before comment causes jQuery error
- #1046394 by n8tron and JohnAlbin: Add first and last classes to blocks
- #870080 by mverbaar: Correction to README.TXT for STARTERKIT
@@ -9,7 +10,6 @@ Zen 6.x-2.x-dev, xxxx-xx-xx (development release)
- #932826: mytheme_links__system_main_menu() doesn't work as expected
- Fix PHP warning on maintenance page
- #690026: Cannot override region.tpl.php
-- Convert region template suggestions into theme hook suggestions
Zen 6.x-2.0, 2010-06-26
-----------------------
diff --git a/zen-internals/template.theme-registry.inc b/zen-internals/template.theme-registry.inc
index 3b38c05..6d6ded2 100644
--- a/zen-internals/template.theme-registry.inc
+++ b/zen-internals/template.theme-registry.inc
@@ -74,22 +74,30 @@ function _zen_theme(&$existing, $type, $theme, $path) {
$existing['links']['pattern'] = 'links__';
// The base theme registers region.tpl.php.
- return array(
+ $templates = array(
'region' => array(
'arguments' => array('elements' => NULL),
'pattern' => 'region_',
'path' => drupal_get_path('theme', 'zen') . '/templates',
'template' => 'region',
- // We manually register the preprocess and process functions, since
- // Drupal won't auto-register template_preprocess or process functions.
- 'preprocess functions' => array(
- 'template_preprocess',
- 'zen_preprocess',
- 'zen_preprocess_region',
- 'zen_process',
- ),
+ // drupal_find_theme_templates() requires this, so manually add it.
+ 'include files' => array(),
),
);
+ // We have to manually find template suggestions since phptemplate_theme()
+ // is in charge of that, but runs before zen_theme().
+ $templates += drupal_find_theme_templates($templates, '.tpl.php', $path);
+ // We manually register the preprocess and process functions, since Drupal
+ // won't auto-register template_preprocess or process functions.
+ foreach (array_keys($templates) as $key) {
+ $templates[$key]['preprocess functions'] = array(
+ 'template_preprocess',
+ 'zen_preprocess',
+ 'zen_preprocess_region',
+ 'zen_process',
+ );
+ }
+ return $templates;
}
// Else return nothing.