Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.415.2.2 diff -u -p -r1.415.2.2 theme.inc --- includes/theme.inc 25 Mar 2008 11:55:08 -0000 1.415.2.2 +++ includes/theme.inc 1 Apr 2008 23:58:33 -0000 @@ -330,9 +330,14 @@ function _theme_process_registry(&$cache if (function_exists($prefix .'_preprocess')) { $info['preprocess functions'][] = $prefix .'_preprocess'; } + 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. @@ -725,6 +730,8 @@ function drupal_find_theme_functions($ca $templates[$new_hook] = array( 'function' => $match, 'arguments' => $info['arguments'], + 'original hook' => $hook, + 'preprocess functions' => $info['preprocess functions'], ); } } @@ -817,6 +824,8 @@ function drupal_find_theme_templates($ca 'template' => $file, 'path' => dirname($files[$match]->filename), 'arguments' => $info['arguments'], + 'original hook' => $hook, + 'preprocess functions' => $info['preprocess functions'], ); } }