You are here

function custom_search_init in Custom Search 6

Same name and namespace in other branches
  1. 7 custom_search.module \custom_search_init()

Implementation of hook_init().

File

./custom_search.module, line 424
Bring customizations to the default search box

Code

function custom_search_init() {
  if (user_access('use custom search')) {
    drupal_add_js(drupal_get_path('module', 'custom_search') . '/js/custom_search.js');
    drupal_add_js(array(
      'custom_search' => array(
        'form_target' => variable_get('custom_search_target', '_self'),
        'solr' => module_exists('apachesolr_search') && variable_get('apachesolr_search_make_default', 0) ? 1 : 0,
      ),
    ), 'setting');
  }
}