function location_taxonomize_get_primary_fields in Location Taxonomize 7.2
Some fields are defined as 'Primary Fields'. This function returns an array mapping internal field names to source field names, or the other direction, if $reverse is TRUE
2 calls to location_taxonomize_get_primary_fields()
- location_taxonomize_convert_field_name in ./
location_taxonomize.inc - Converts a field name from the current source to an internal primary field name if necessary. Otherwise returns the given name.
- location_taxonomize_source_field_name in ./
location_taxonomize.inc - Converts an internal name to a source name
File
- ./
location_taxonomize.inc, line 237 - Some useful functions for Location taxonomize
Code
function location_taxonomize_get_primary_fields($reverse = FALSE) {
$source = _location_taxonomize_get_source();
$suffix = '_primary_field_names';
$function = $source . $suffix;
$source_fields = $function();
$internal_fields = array(
'country',
'country_name',
'province',
'province_name',
'city',
);
if (!$reverse) {
return array_combine($internal_fields, $source_fields);
}
else {
return array_combine($source_fields, $internal_fields);
}
}