function views_fieldsets_theme_registry_alter in Views fieldsets 7.2
Implements hook_theme_registry_alter().
File
- ./
views_fieldsets.module, line 51 - Hooks, helpers and theming for the Views Fieldsets module.
Code
function views_fieldsets_theme_registry_alter(&$registry) {
foreach ($registry as $hook => &$info) {
// Splice in our generic preprocessor for all fieldset types.
if (strpos($hook, 'views_fieldsets_') === 0 && isset($info['views_fieldsets_label'])) {
// It must come directly after 'template_preprocess', or first if that doesn't exist.
$index = array_search('template_preprocess', $info['preprocess functions']);
if ($index !== FALSE) {
array_splice($info['preprocess functions'], $index + 1, 0, '_template_preprocess_views_fieldsets');
}
else {
array_unshift($info['preprocess functions'], '_template_preprocess_views_fieldsets');
}
}
unset($info);
}
}