diff --git a/location.inc b/location.inc index 6a2cc67d29766da3efbbd2c26605be5014444c81..26721b829bc86fe1e2ab3f83213c1f994a584803 100644 --- a/location.inc +++ b/location.inc @@ -116,9 +116,8 @@ function theme_location($location = array(), $hide = array()) { } $output = ''; - $country_specific_function = 'theme_location_'. (isset($location['country']) ? $location['country'] : ''); - if (function_exists($country_specific_function)) { - $output .= $country_specific_function($location, $hide); + if (isset($location['country']) && ($f = theme_get_function('location_'. $location['country']))) { + $output .= call_user_func($f, $location, $hide); } elseif (count($location)) { $output .= "\n";