You are here

function google_cse_init in Google Custom Search Engine 7

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

Implements hook_init().

File

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

Code

function google_cse_init() {
  drupal_add_js(array(
    'googleCSE' => array(
      'cx' => variable_get('google_cse_cx', ''),
      'language' => google_cse_language(),
      'resultsWidth' => intval(variable_get('google_cse_results_width', 600)),
      'domain' => variable_get('google_cse_domain', 'www.google.com'),
    ),
  ), 'setting');
}