function ip_geoloc_is_taxonomy_term in IP Geolocation Views & Maps 7
Returns whether the supplied Views field name refers to a taxonomy term.
Parameters
string $views_field_name:
Return value
boolean
2 calls to ip_geoloc_is_taxonomy_term()
- ip_geoloc_plugin_style_extract_locations in views/
ip_geoloc_plugin_style.inc - Extract an array of locations from the supplied views_plugin_style.
- _ip_geoloc_plugin_style_diff_color_table_row_form in views/
ip_geoloc_plugin_style.inc - Diffs the color table plugin style row.
File
- views/
ip_geoloc_plugin_style.inc, line 1491 - ip_geoloc_plugin_style.inc
Code
function ip_geoloc_is_taxonomy_term($views_field_name) {
if (!module_exists('taxonomy')) {
return FALSE;
}
if ($field = field_info_field($views_field_name)) {
return $field['type'] == 'taxonomy_term_reference';
}
// Could be a vocabulary. Crude as it is, this will do for now.
return $views_field_name == 'tid' || strpos($views_field_name, 'taxonomy_term_') === 0;
}