function geocoder_json_field in Geocoder 7
Plugin callback.
File
- plugins/
geocoder_handler/ json.inc, line 28
Code
function geocoder_json_field($field, $field_item) {
if ($field['type'] === 'text' || $field['type'] === 'text_long' || $field['type'] === 'computed') {
return geocoder_json($field_item['value']);
}
if ($field['type'] === 'file') {
if ($field_item['fid']) {
$file = file_load($field_item['fid']);
$json = file_get_contents($file->uri);
return geocoder_json($json);
}
}
}