You are here

function google_cse_build_query in Google Custom Search Engine 7

Same name and namespace in other branches
  1. 7.3 google_cse.module \google_cse_build_query()
  2. 7.2 google_cse.module \google_cse_build_query()

Builds a query array based on Google CSE settings.

4 calls to google_cse_build_query()
google_cse_search_block_form_submit in ./google_cse.module
Processes a search block form submission.
google_cse_search_execute in ./google_cse.module
Implements hook_search_execute().
google_cse_search_form_submit in ./google_cse.module
Processes a search form submission.
template_preprocess_google_cse_results in ./google_cse.theme.inc
The search results page can be themed/customized.

File

./google_cse.module, line 39
Display a Google Custom Search Engine (CSE) on your site.

Code

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