function fusion_apply_ui_preprocess in Fusion Accelerator 7.2
Same name and namespace in other branches
- 7 fusion_apply/fusion_apply_ui.module \fusion_apply_ui_preprocess()
Implements hook_preprocess(). Used to add contextual links.
File
- fusion_apply/
fusion_apply_ui.module, line 699 - Handles Fusion Apply UI functionality allowing users to apply skins to their site.
Code
function fusion_apply_ui_preprocess(&$variables, $hook) {
$config = fusion_apply_get_config_info();
$original_hook = $hook;
$theme_registry = theme_get_registry();
if (isset($theme_registry[$hook]['original hook'])) {
$original_hook = $theme_registry[$hook]['original hook'];
}
foreach ($config as $module => $module_settings) {
if (!empty($module_settings['contextual_links'][$original_hook])) {
// Set contextual links.
if ($contextual_links = fusion_apply_handler('contextual_links', '', $module_settings['contextual_links'][$original_hook]['contextual_links_handler'], $variables)) {
fusion_apply_ui_contextual_links($variables, $original_hook, $contextual_links);
}
}
}
}