function ds_field_unique in Display Suite 7.2
Same name and namespace in other branches
- 7 ds.fields.inc \ds_field_unique()
Return whether a field machine name is unique.
1 string reference to 'ds_field_unique'
- ds_shared_form in modules/
ds_ui/ includes/ ds.fields.inc - Shared form for all fields.
File
- modules/
ds_ui/ includes/ ds.fields.inc, line 265 - Administrative functions for managing custom fields for every entity.
Code
function ds_field_unique($name) {
ctools_include('export');
$custom_fields = ctools_export_crud_load_all('ds_fields');
$value = strtr($name, array(
'-' => '_',
));
return isset($custom_fields[$value]) ? TRUE : FALSE;
}