function theme_location_cck_field_popup in Location 7.5
Same name and namespace in other branches
- 6.3 contrib/location_cck/location_cck.module \theme_location_cck_field_popup()
- 7.3 contrib/location_cck/location_cck.module \theme_location_cck_field_popup()
- 7.4 contrib/location_cck/location_cck.module \theme_location_cck_field_popup()
Theme the GMap popup text for the field.
1 theme call to theme_location_cck_field_popup()
- theme_location_cck_field_map in contrib/
location_cck/ location_cck.module - Generate a GMap map for one or more location field values.
File
- contrib/
location_cck/ location_cck.module, line 497 - Defines location field type.
Code
function theme_location_cck_field_popup($variables) {
$location = $variables['location'];
$instance = $variables['instance'];
$hide = isset($field['location_settings']['display']['hide']) ? array_keys(array_filter($field['location_settings']['display']['hide'])) : array();
// Don't use a map link in a popup!
// We're making the name into a title.
$hide[] = 'map_link';
$hide[] = 'name';
$markertitle = $instance['label'];
if (!empty($location['name'])) {
$markertitle = $location['name'];
}
return '<h4>' . $markertitle . '</h4>' . theme('location', array(
'location' => $location,
'hide' => $hide,
));
}