You are here

function search_log_menu in Search Log 6

Same name and namespace in other branches
  1. 7 search_log.module \search_log_menu()

Implementation of hook_menu().

File

./search_log.module, line 23
Replaces default report of top search phrases.

Code

function search_log_menu() {
  $items = array();
  $items['admin/reports/search'] = array(
    'title' => 'Top search terms',
    'description' => 'View most popular search terms.',
    'page callback' => 'search_log_report',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer search',
    ),
    'file' => 'search_log.admin.inc',
  );

  // Add settings as task under the default search menu.
  $items['admin/settings/search/default'] = array(
    'title' => 'Search',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/search/search_log'] = array(
    'title' => 'Search log',
    'description' => 'Setting for storing search results in the log.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'search_log_admin_settings',
    ),
    'access arguments' => array(
      'administer search',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'search_log.admin.inc',
  );
  $items['admin/settings/search/search_log/clear'] = array(
    'title' => 'Search log',
    'description' => 'Clear the search log.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'search_log_confirm_truncate',
    ),
    'access arguments' => array(
      'administer search',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'search_log.admin.inc',
  );
  return $items;
}