function theme_location_de in Location 7.5
Same name and namespace in other branches
- 5.3 supported/location.de.inc \theme_location_de()
- 5 supported/location.de.inc \theme_location_de()
- 6.3 supported/location.de.inc \theme_location_de()
- 7.3 supported/location.de.inc \theme_location_de()
- 7.4 supported/location.de.inc \theme_location_de()
File
- supported/
location.de.inc, line 178
Code
function theme_location_de($location = array(), $hide = array()) {
$output = '';
if (count($location)) {
$output .= "\n";
$output .= '<div class="location vcard"><div class="adr">' . "\n";
if (!empty($location['name']) && !in_array('name', $hide)) {
$output .= '<div class="fn">' . $location['name'] . '</div>';
}
if (!empty($location['street']) && !in_array('street', $hide)) {
$output .= '<div class="street-address">' . $location['street'];
if (!empty($location['additional']) && !in_array('street', $hide)) {
$output .= ' ' . $location['additional'];
}
$output .= '</div>';
}
if (!empty($location['city']) && !in_array('city', $hide) || !empty($location['postal_codet']) && !in_array('postal_code', $hide)) {
$city_postal = array();
if (!empty($location['postal_code']) && !in_array('postal_code', $hide)) {
$city_postal[] = '<span class="postal-code">' . $location['postal_code'] . '</span>';
}
if (!empty($location['city']) && !in_array('city', $hide)) {
$city_postal[] = '<span class="locality">' . $location['city'] . '</span>';
}
$output .= '<div>' . implode(' ', $city_postal) . '</div>';
}
if (!in_array('country', $hide)) {
$output .= '<div class="country-name">' . t('Germany') . '</div>';
}
if (location_has_coordinates($location)) {
$output .= '<div class="geo"><abbr class="latitude" title="' . $location['latitude'] . '" /><abbr class="longitude" title="' . $location['latitude'] . '" /></div>';
}
$output .= '</div></div>';
}
return $output;
}