template_preprocess_search_result_location

  1. drupal
    1. 6 location_search.module function
    2. 7 location_search.module function
Drupal 7 template_preprocess_search_result_location(&$variables)

File

sites/all/modules/location/contrib/location_search/location_search.module, line 400
Location search interface.

Code

function template_preprocess_search_result_location(&$variables) {
  $result = $variables['result'];

  $variables['links_raw'] = array();
  foreach ($result['links'] as $link) {
    if (isset($link['title']) && isset($link['href'])) {
      $variables['links_raw'][] = $link;
    }
  }
  $variables['location_raw'] = $result['location'];

  $variables['location'] = theme('location', array('location' => $result['location'], 'hide' => array())); // @@@ hide?
  $variables['links'] = theme('links', array('links' => $variables['links_raw']));

  // Provide alternate search result template.
  $variables['theme_hook_suggestions'][] = 'search_result_' . $variables['module'];
}