search_get_default_module_info

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 search_get_default_module_info()

Returns information about the default search module.

Return value

The search_get_info() array element for the default search module, if any.

▾ 4 functions call search_get_default_module_info()

search_box_form_submit in modules/search/search.module
Process a block search form submission.
search_form in modules/search/search.module
Builds a search form.
search_menu in modules/search/search.module
Implements hook_menu().
search_view in modules/search/search.pages.inc
Menu callback; presents the search form and/or search results.

Code

modules/search/search.module, line 281

<?php
function search_get_default_module_info() {
  $info = search_get_info();
  $default = variable_get('search_default_module', 'node');
  if (isset($info[$default])) {
    return $info[$default];
  }
  // The variable setting does not match any active module, so just return
  // the info for the first active module (if any).
  return reset($info);
}
?>