function lingotek_translatable_fields in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_translatable_fields()
- 7.5 lingotek.util.inc \lingotek_translatable_fields()
Gets a list of fields with translation enabled.
Return value
array An array of the machine names for translatable fields in the system.
1 call to lingotek_translatable_fields()
- lingotek_field_language_data_cleanup_update_entity in ./
lingotek.batch.inc - Ensures correct language-specific field data for the specified item.
File
- ./
lingotek.util.inc, line 1420 - Utility functions.
Code
function lingotek_translatable_fields() {
$fields = field_info_fields();
$translatable_fields = array();
foreach ($fields as $field_id => $field) {
foreach ($field['bundles'] as $type => $instance) {
if (field_is_translatable($type, $field)) {
$translatable_fields[] = $field['field_name'];
}
}
}
return $translatable_fields;
}