You are here

function _ds_layouts_scan_theme in Display Suite 7.2

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

File

includes/ds.registry.inc, line 565
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);
  }
}