You are here

function location_display in Location 7.4

Same name and namespace in other branches
  1. 5.3 location.module \location_display()
  2. 6.3 location.module \location_display()
  3. 7.5 location.module \location_display()
  4. 7.3 location.module \location_display()
2 calls to location_display()
location_node_node_view in ./location_node.module
Implementation of hook_node_view().
location_user_user_view in ./location_user.module
Implement hook_user_view().

File

./location.module, line 1804
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_display($settings, $locations) {
  if (!isset($settings['display']['hide'])) {

    // We weren't configured properly, bail.
    return array();
  }
  $hide = array_keys(array_filter($settings['display']['hide']));

  // Show all locations
  return array(
    '#type' => 'markup',
    '#markup' => theme('locations', array(
      'locations' => $locations,
      'hide' => $hide,
    )),
    '#weight' => $settings['display']['weight'],
  );
}