function lingotek_get_translatable_fields_by_content_type in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_get_translatable_fields_by_content_type()
- 7.4 lingotek.util.inc \lingotek_get_translatable_fields_by_content_type()
- 7.6 lingotek.util.inc \lingotek_get_translatable_fields_by_content_type()
3 calls to lingotek_get_translatable_fields_by_content_type()
- lingotek_entity_xml_body in ./
lingotek.util.inc - Return the xml representation of the source content for a node.
- lingotek_form_node_form_alter in ./
lingotek.module - Implements hook_form_BASE_FORM_ID_alter().
- lingotek_get_enabled_fields in ./
lingotek.util.inc
File
- ./
lingotek.util.inc, line 256 - Utility functions.
Code
function lingotek_get_translatable_fields_by_content_type($entity_type, $type) {
$all_fields = field_info_instances($entity_type, $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;
}