function lingotek_get_translatable_fields_by_content_type in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_get_translatable_fields_by_content_type()
- 7.5 lingotek.util.inc \lingotek_get_translatable_fields_by_content_type()
- 7.6 lingotek.util.inc \lingotek_get_translatable_fields_by_content_type()
1 call to lingotek_get_translatable_fields_by_content_type()
File
- ./
lingotek.util.inc, line 235 - Utility functions.
Code
function lingotek_get_translatable_fields_by_content_type($type) {
$all_fields = field_info_instances('node', $type);
$translatable_field_types = lingotek_get_translatable_field_types();
$desired_fields = array();
foreach ($all_fields as $field_name => $field_info) {
if (in_array($field_info['widget']['type'], $translatable_field_types)) {
$desired_fields[$field_name] = $field_name;
}
}
return $desired_fields;
}