You are here

function _location_nothing_to_show in Location 5

1 call to _location_nothing_to_show()
theme_location in ./location.theme
Generates HTML for the passed location.

File

./location.inc, line 85

Code

function _location_nothing_to_show($location = array(), $hide = array()) {
  foreach (array(
    'street',
    'city',
    'province',
    'postal_code',
    'country',
  ) as $field) {
    if (isset($location[$field]) && strlen(trim($location[$field])) && !in_array($field, $hide)) {
      return FALSE;
    }
  }
  return TRUE;
}