function search_menu

7.x search.module search_menu()
6.x search.module search_menu()

Implementation of hook_menu().

File

drupal-6.x/modules/search/search.module, line 166
Enables site-wide keyword searching.

Code

function search_menu() {
  $items['search'] = array(
    'title' => 'Search',
    'page callback' => 'search_view',
    'access arguments' => array('search content'),
    'type' => MENU_SUGGESTED_ITEM,
    'file' => 'search.pages.inc',
  );
  $items['admin/settings/search'] = array(
    'title' => 'Search settings',
    'description' => 'Configure relevance settings for search and other indexing options',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('search_admin_settings'),
    'access arguments' => array('administer search'),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'search.admin.inc',
  );
  $items['admin/settings/search/wipe'] = array(
    'title' => 'Clear index',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('search_wipe_confirm'),
    'access arguments' => array('administer search'),
    'type' => MENU_CALLBACK,
    'file' => 'search.admin.inc',
  );
  $items['admin/reports/search'] = array(
    'title' => 'Top search phrases',
    'description' => 'View most popular search phrases.',
    'page callback' => 'dblog_top',
    'page arguments' => array('search'),
    'access arguments' => array('access site reports'),
    'file' => 'dblog.admin.inc',
    'file path' => drupal_get_path('module', 'dblog'),
  );

  foreach (module_implements('search') as $name) {
    $items['search/' . $name . '/%menu_tail'] = array(
      'title callback' => 'module_invoke',
      'title arguments' => array($name, 'search', 'name', TRUE),
      'page callback' => 'search_view',
      'page arguments' => array($name),
      'access callback' => '_search_menu',
      'access arguments' => array($name),
      'type' => MENU_LOCAL_TASK,
      'parent' => 'search',
      'file' => 'search.pages.inc',
    );
  }
  return $items;
}