function lingotek_translatable_node_fields in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.3 lingotek.module \lingotek_translatable_node_fields()
- 7.4 lingotek.module \lingotek_translatable_node_fields()
Gets a list of fields with translation enabled.
Return value
array An array of the machine names for translatable fields in the system.
2 calls to lingotek_translatable_node_fields()
- lingotek_field_language_data_cleanup_update_node in ./
lingotek.batch.inc - Ensures correct language-specific field data for the specified item.
- lingotek_form_cleanup_utility in ./
lingotek.admin.inc - Administration form for the field language cleanup utility.
File
- ./
lingotek.module, line 981
Code
function lingotek_translatable_node_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;
}