You are here

function _ds_extras_theme_registry_alter in Display Suite 7.2

Same name and namespace in other branches
  1. 7 modules/ds_extras/ds_extras.registry.inc \_ds_extras_theme_registry_alter()

Implements hook_theme_registry_alter().

1 call to _ds_extras_theme_registry_alter()
ds_extras_theme_registry_alter in modules/ds_extras/ds_extras.module
Implements hook_theme_registry_alter().

File

modules/ds_extras/includes/ds_extras.registry.inc, line 73
Display Suite Extras registry file.

Code

function _ds_extras_theme_registry_alter(&$theme_registry) {

  // Add views preprocess layout.
  if (variable_get('ds_extras_vd', FALSE)) {
    $theme_registry['views_view']['preprocess functions'][] = 'ds_extras_preprocess_view_layout';
  }

  // Add process page function.
  if (variable_get('ds_extras_hide_page_title', FALSE)) {
    $theme_registry['page']['process functions'][] = 'ds_extras_process_page_title';
  }

  // Remove ds_preprocess_field in case field templates is not enabled.
  if (!variable_get('ds_extras_field_template', FALSE) && isset($theme_registry['field']['preprocess functions'])) {
    $key = array_search('ds_extras_preprocess_field', $theme_registry['field']['preprocess functions']);
    if (!empty($key)) {
      unset($theme_registry['field']['preprocess functions'][$key]);
    }
  }
}