You are here

function google_cse_sitesearch_default in Google Custom Search Engine 6

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

Return SiteSearch default value.

3 calls to google_cse_sitesearch_default()
google_build_query in ./google.module
Build a query array based on Google CSE settings.
google_cse_sitesearch_form in ./google_cse.module
Returns SiteSearch options form item.
template_preprocess_google_cse_results in ./google_cse.theme.inc
The search results page can be themed/customized.
2 string references to 'google_cse_sitesearch_default'
google_cse_admin_settings in ./google_cse.admin.inc
Admin settings page for the CSE.
google_cse_uninstall in ./google_cse.install
Implementation of hook_uninstall().

File

./google_cse.module, line 234
Display a Google Custom Search Engine on your site.

Code

function google_cse_sitesearch_default() {
  return isset($_GET['sitesearch']) ? $_GET['sitesearch'] : (variable_get('google_cse_sitesearch_default', 0) ? array_shift(preg_split('/[\\s]+/', variable_get('google_cse_sitesearch', ''))) : '');
}