function fieldset_helper_theme_registry_alter in Fieldset helper 6.2
Implementation of hook_theme_registry_alter(). Defines fieldset and fieldgroup theme preprocess functions.
"Preprocess functions only apply to theming hooks implemented as templates. The main role of the preprocessor is to setup variables to be placed within the template (.tpl.php) files. Plain theme functions do not interact with preprocessors." -- From Setting up variables for use in a template (preprocess functions)
Note: Using *_custom_preprocess instead of *_preprocess because Drupal 7 adds support for theme function preprocessors.
File
- ./
fieldset_helper.theme.inc, line 216 - Theme functions for fieldset helper module
Code
function fieldset_helper_theme_registry_alter(&$theme_registry) {
$theme_functions = array(
'fieldset',
'fieldgroup_fieldset',
);
foreach ($theme_functions as $theme_function) {
if (isset($theme_registry[$theme_function]['function'])) {
$theme_registry[$theme_function]['original_function'] = $theme_registry[$theme_function]['function'];
$theme_registry[$theme_function]['function'] = 'fieldset_helper_' . $theme_function . '_custom_preprocess';
}
}
}