Fatal Error after creating Custom Display Suite layout I am using Display Suite and I created a custom layout called ds_6row when I Flush Cache I get the following error

Call to undefined function ds_ds_6row() in /Users/myname/Sites/sitename/sites/all/modules/contrib/ds/includes/ds.registry.inc on line 570


I followed the method to create the layout here 

My structure looks like this:

mytheme
--ds_layouts
---ds_6row
----ds_6row.css
----ds_6row.inc
----ds_6row.png
----ds-6row.tpl.php


The code for ds_6row.inc is:

&lt;?php
function ds_6row() {
  return array(
    'label' =&gt; t('6 Row Layout'),
    'regions' =&gt; array(
    'info_data' =&gt; t('Info_data')
  ),
// Add this line if there is a default css file.
'css' =&gt; TRUE,
// Add this line if you're using DS 2.x for icon preview
'image' =&gt; TRUE,
);
}


The code for ds-6row.tpl.php is:

    &lt;?php

/**
 * @file
 * Display Suite 6 row template.
 */
?&gt;
&lt;&lt;?php print $layout_wrapper; print $layout_attributes; ?&gt; class="ds-6row &lt;?php print $classes;?&gt; clearfix"&gt;

  &lt;?php if (isset($title_suffix['contextual_links'])): ?&gt;
  &lt;?php print render($title_suffix['contextual_links']); ?&gt;
  &lt;?php endif; ?&gt;

  &lt;&lt;?php print $first_wrapper ?&gt; class="group-first&lt;?php print $first_classes; ?&gt;"&gt;
    &lt;?php print $first; ?&gt;
  &lt;/&lt;?php print $first_wrapper ?&gt;&gt;

  &lt;&lt;?php print $second_wrapper ?&gt; class="group-second&lt;?php print $second_classes; ?&gt;"&gt;
    &lt;?php print $second; ?&gt;
  &lt;/&lt;?php print $second_wrapper ?&gt;&gt;

  &lt;&lt;?php print $third_wrapper ?&gt; class="group-third&lt;?php print $third_classes; ?&gt;"&gt;
    &lt;?php print $third; ?&gt;
  &lt;/&lt;?php print $third_wrapper ?&gt;&gt;

  &lt;&lt;?php print $fourth_wrapper ?&gt; class="group-fourth&lt;?php print $fourth_classes; ?&gt;"&gt;
    &lt;?php print $fourth; ?&gt;
  &lt;/&lt;?php print $fourth_wrapper ?&gt;&gt;

  &lt;&lt;?php print $fifth_wrapper ?&gt; class="group-fifth&lt;?php print $fifth_classes; ?&gt;"&gt;
    &lt;?php print $fifth; ?&gt;
  &lt;/&lt;?php print $fifth_wrapper ?&gt;&gt;

  &lt;&lt;?php print $sixth_wrapper ?&gt; class="group-sixth&lt;?php print $sixth_classes; ?&gt;"&gt;
    &lt;?php print $sixth; ?&gt;
  &lt;/&lt;?php print $sixth_wrapper ?&gt;&gt;

&lt;/&lt;?php print $layout_wrapper ?&gt;&gt;

&lt;?php if (!empty($drupal_render_children)): ?&gt;
  &lt;?php print $drupal_render_children ?&gt;
&lt;?php endif; ?&gt;
Have a look in the code for Display Suite, specifically the block mentioned in the error message:

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


Note that when it goes looking for layouts is it prepending your layout name with 'ds_'.  

I imagine this is to prevent functions being included that were not intended for this purpose, a bit like using your module name in place of hook_ when you implement hooks.

That's why changing your function name worked.