You are here

function _ds_theme in Display Suite 7.2

Same name and namespace in other branches
  1. 6.3 includes/ds.registry.inc \_ds_theme()
  2. 6 includes/ds.registry.inc \_ds_theme()
  3. 6.2 includes/ds.registry.inc \_ds_theme()
  4. 7 ds.registry.inc \_ds_theme()

Implements hook_theme().

1 call to _ds_theme()
ds_theme in ./ds.module
Implements hook_theme().

File

includes/ds.registry.inc, line 144
Registry file for Display Suite.

Code

function _ds_theme() {
  $theme_functions = array();

  // Layouts
  $layouts = ds_get_layout_info();
  foreach ($layouts as $key => $layout) {

    // We don't need panel layouts to be registered.
    if (isset($layout['module']) && $layout['module'] == 'panels') {
      continue;
    }
    $theme_functions[$key] = array(
      'render element' => 'elements',
      'template' => strtr($key, '_', '-'),
      'path' => $layout['path'],
    );
  }

  // Field templates
  $field_functions = module_invoke_all('ds_field_theme_functions_info');
  foreach ($field_functions as $key => $label) {
    $theme_functions[$key] = array(
      'render element' => 'element',
      'function' => $key,
    );
  }
  return $theme_functions;
}