function location_strip in Location 7.3
Same name and namespace in other branches
- 5.3 location.module \location_strip()
- 6.3 location.module \location_strip()
- 7.5 location.module \location_strip()
- 7.4 location.module \location_strip()
Strip junk out of a location.
1 call to location_strip()
- location_calc_difference in ./
location.module - Computes the differences between two locations.
File
- ./
location.module, line 1725 - Location module main routines. An implementation of a universal API for location manipulation. Provides functions for postal_code proximity searching, deep-linking into online mapping services. Currently, some options are configured through an…
Code
function location_strip(&$location) {
$tmp =& drupal_static(__FUNCTION__);
if (!isset($tmp)) {
$tmp = array();
$defaults = location_invoke_locationapi($location, 'defaults');
foreach ($defaults as $k => $v) {
if (!isset($v['nodiff'])) {
$tmp[$k] = TRUE;
}
}
}
foreach ($location as $k => $v) {
if (!isset($tmp[$k])) {
unset($location[$k]);
}
}
}