You are here

function template_preprocess_search_result_location in Location 7.4

Same name and namespace in other branches
  1. 5.3 contrib/location_search/location_search.module \template_preprocess_search_result_location()
  2. 6.3 contrib/location_search/location_search.module \template_preprocess_search_result_location()
  3. 7.5 contrib/location_search/location_search.module \template_preprocess_search_result_location()
  4. 7.3 contrib/location_search/location_search.module \template_preprocess_search_result_location()

File

contrib/location_search/location_search.module, line 343
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', $result['location'], array());

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

  // Provide alternate search result template.
  $variables['template_files'][] = 'search-result-' . $variables['type'];
}