function _ds_extras_module_implements_alter in Display Suite 7.2
Same name and namespace in other branches
- 7 modules/ds_extras/ds_extras.registry.inc \_ds_extras_module_implements_alter()
Implements hook_module_implements_alter().
1 call to _ds_extras_module_implements_alter()
- ds_extras_module_implements_alter in modules/
ds_extras/ ds_extras.module - Implements hook_module_implements_alter().
File
- modules/
ds_extras/ includes/ ds_extras.registry.inc, line 97 - Display Suite Extras registry file.
Code
function _ds_extras_module_implements_alter(&$implementations, $hook) {
// Because it's possible to turn on/off features for DS extras,
// we'll unset hooks here if necessary which otherwhise do nothing at all.
// Field template
$ft_hooks = array(
'ds_field_settings_alter',
'form_ds_classes_form_alter',
'form_field_ui_field_edit_form_alter',
'theme',
);
if (!variable_get('ds_extras_field_template', FALSE) && in_array($hook, $ft_hooks)) {
unset($implementations['ds_extras']);
}
// Region to block
$region_hooks = array(
'ds_layout_region_alter',
'field_attach_view_alter',
'block_info',
'block_view',
);
if (!variable_get('ds_extras_region_to_block', FALSE) && in_array($hook, $region_hooks)) {
unset($implementations['ds_extras']);
}
// Switch view mode
$switch_hooks = array(
'form_node_form_alter',
);
if (!variable_get('ds_extras_switch_view_mode', FALSE) && in_array($hook, $switch_hooks)) {
unset($implementations['ds_extras']);
}
// Views displays
$vd_hooks = array(
'entity_info',
'ctools_plugin_api',
'ds_fields_ui_alter',
);
if (!variable_get('ds_extras_vd', FALSE) && in_array($hook, $vd_hooks)) {
unset($implementations['ds_extras']);
}
}