You are here

function template_preprocess_gss_result in Google Site Search 6

Same name and namespace in other branches
  1. 7 gss.theme.inc \template_preprocess_gss_result()

Process variables for gss-result.tpl.php.

The $variables array contains the following arguments:

  • $result
  • $module

See also

gss-result.tpl.php

File

./gss.theme.inc, line 18
Themeable functions for Google Site Search.

Code

function template_preprocess_gss_result(&$variables) {
  $result = $variables['result'];
  $variables['url'] = check_url($result['link']);
  $variables['title'] = $result['title'];

  // Check for existence. User search does not include snippets.
  $variables['snippet'] = isset($result['snippet']) ? $result['snippet'] : '';
}