Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.424 diff -u -p -r1.424 theme.inc --- includes/theme.inc 26 May 2008 17:12:54 -0000 1.424 +++ includes/theme.inc 28 May 2008 23:16:24 -0000 @@ -348,6 +348,9 @@ function _theme_process_registry(&$cache if (function_exists($prefix . '_preprocess_' . $hook)) { $info['preprocess functions'][] = $prefix . '_preprocess_' . $hook; } + if (!empty($info['original hook']) && function_exists($prefix .'_preprocess_'. $info['original hook'])) { + $info['preprocess functions'][] = $prefix .'_preprocess_'. $info['original hook']; + } } } // Check for the override flag and prevent the cached preprocess functions from being used. @@ -359,6 +362,9 @@ function _theme_process_registry(&$cache elseif (isset($cache[$hook]['preprocess functions']) && is_array($cache[$hook]['preprocess functions'])) { $info['preprocess functions'] = array_merge($cache[$hook]['preprocess functions'], $info['preprocess functions']); } + elseif (isset($info['original hook']) && isset($cache[$info['original hook']]['preprocess functions']) && is_array($cache[$info['original hook']]['preprocess functions'])) { + $info['preprocess functions'] = array_merge($cache[$info['original hook']]['preprocess functions'], $info['preprocess functions']); + } $result[$hook]['preprocess functions'] = $info['preprocess functions']; } @@ -740,6 +746,7 @@ function drupal_find_theme_functions($ca $templates[$new_hook] = array( 'function' => $match, 'arguments' => $info['arguments'], + 'original hook' => $hook, ); } } @@ -832,6 +839,7 @@ function drupal_find_theme_templates($ca 'template' => $file, 'path' => dirname($files[$match]->filename), 'arguments' => $info['arguments'], + 'original hook' => $hook, ); } }