function ds_custom_formatters_fields_alter in Custom Formatters 7.2
Implements hook_custom_formatters_fields_alter().
File
- includes/
ds.inc, line 46 - Display Suite module integration.
Code
function ds_custom_formatters_fields_alter(&$fields) {
foreach (array_keys(entity_get_info()) as $entity_type) {
$ds_fields = module_invoke_all('ds_fields_info', $entity_type);
if (is_array($ds_fields) && !empty($ds_fields) && isset($ds_fields[$entity_type])) {
foreach ($ds_fields[$entity_type] as $id => $field) {
if (in_array($field['field_type'], array(
DS_FIELD_TYPE_PREPROCESS,
DS_FIELD_TYPE_FUNCTION,
))) {
$fields['ds_' . $id] = array(
'module' => 'ds',
'label' => $field['title'],
);
}
}
}
}
}