function getlocations_get_field_lang in Get Locations 7.2
Get the field specific language.
1 call to getlocations_get_field_lang()
- getlocations_fields_load_locations in modules/
getlocations_fields/ getlocations_fields.module
File
- ./
getlocations.module, line 5510 - getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_get_field_lang($entity_id, $entity_type, $field_name) {
$table = 'field_data_' . $field_name;
$query = db_select($table, 't');
$query
->fields('t', array(
'language',
));
$query
->condition('t.entity_type', $entity_type)
->condition('t.entity_id', $entity_id);
$row = $query
->execute()
->fetchAssoc();
if ($row['language']) {
return $row['language'];
}
return FALSE;
}