function _get_location_fields in Location Taxonomize 7
Returns the Location module fields that can be used for the Location Vocabulary
Parameters
$assoc - whether to return an associative array (TRUE) or just an: indexed array (FALSE)
2 calls to _get_location_fields()
- location_taxonomize_form in ./
location_taxonomize.admin.inc - Location Taxonomize administration form
- _location_taxonomize_variables in ./
location_taxonomize.inc - Keeps a list of all the variables maintained by this module, with their default values.
File
- ./
location_taxonomize.inc, line 80 - Some useful functions for Location taxonomize
Code
function _get_location_fields($assoc = TRUE) {
// get names of fields in the location table
$fields = drupal_schema_fields_sql('location');
$return = array();
// remove unsupported fields
foreach ($fields as $field) {
/* formatted this way to try to preserve readability as well as accpetable
line lengths */
if ($field != 'lid' && $field != 'additional' && $field != 'latitude' && $field != 'longitude' && $field != 'source' && $field != 'is_primary' && $field != 'postal_code') {
if ($assoc) {
$return[$field] = $field;
}
else {
$return[] = $field;
}
}
}
return array_reverse($return);
}