I need to add a Display Suite function field to a node. I set up my hook, and my field shows up and I can add it to my content type in display. However, the function isn't getting called, and it looks like it should. I stripped my code down so I can debug this. My custom function is in my .module file.
function MYMODULE_ds_fields_info($entity_type)
{
if ($entity_type != 'node')
return;
$fields = array();
$fields['splittitle'] = array(
'title' => t('Split product title'),
'field_type' => DS_FIELD_TYPE_FUNCTION,
'function' => 'MYMODULE_ds_field_splittitle'
);
return array('node' => $fields);
}
function MYMODULE_ds_field_splittitle($field)
{
return 'test';
}