You are here

function _ds_layouts_scan_theme in Display Suite 7

Same name and namespace in other branches
  1. 7.2 includes/ds.registry.inc \_ds_layouts_scan_theme()
1 call to _ds_layouts_scan_theme()
_ds_ds_layout_info in ./ds.registry.inc
Implements hook_ds_layout_info().

File

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

Code

function _ds_layouts_scan_theme($theme, &$layouts) {
  $theme_layouts = file_scan_directory(drupal_get_path('theme', $theme) . '/ds_layouts', '/inc$/');
  foreach ($theme_layouts as $file => $values) {
    include_once DRUPAL_ROOT . '/' . $file;
    $function = 'ds_' . $values->name;
    $layouts[$values->name] = $function();
    $layouts[$values->name]['path'] = str_replace('/' . $values->filename, '', $file);
  }
}