You are here

function google_build_query in Google Custom Search Engine 6

Build a query array based on Google CSE settings.

2 calls to google_build_query()
google_init in ./google.module
Implementation of hook_init().
google_submit_redirect in ./google.module
Redirect form submission to URL with query parameters.

File

./google.module, line 67
Integrates Google Custom Search Engine with the Drupal core search API.

Code

function google_build_query($keys, $sitesearch = NULL) {
  return array(
    'query' => $keys,
    'cx' => variable_get('google_cse_cx', ''),
    'cof' => variable_get('google_cse_cof_here', 'FORID:11'),
    'sitesearch' => isset($sitesearch) ? $sitesearch : google_cse_sitesearch_default(),
  ) + google_cse_advanced_settings();
}