function locationmap_tokens in Location Map 7.2
Implements hook_tokens().
File
- ./
locationmap.module, line 598
Code
function locationmap_tokens($type, $tokens, array $data = array(), array $options = array()) {
$replacements = array();
$sanitize = !empty($options['sanitize']);
if ($type == 'locationmap') {
foreach ($tokens as $name => $original) {
switch ($name) {
case 'latitude':
$lat = variable_get('locationmap_lat');
$replacements[$original] = $sanitize ? check_plain($lat) : $lat;
break;
case 'longitude':
$lat = variable_get('locationmap_lng');
$replacements[$original] = $sanitize ? check_plain($lat) : $lat;
break;
}
}
}
return $replacements;
}