function wikitools_menu in Wikitools 6
Same name and namespace in other branches
- 5 wikitools.module \wikitools_menu()
- 6.2 wikitools.module \wikitools_menu()
- 7 wikitools.module \wikitools_menu()
Implementation of hook_menu().
File
- ./
wikitools.module, line 32 - A non-intrusive module to have some wiki-like behaviour.
Code
function wikitools_menu() {
$items = array();
$items['admin/settings/wikitools'] = array(
'title' => t('Wikitools'),
'description' => t('Settings for wiki-like behaviour.'),
'access arguments' => array(
'administer site configuration',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'wikitools_admin_settings',
),
'file' => 'wikitools.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
if (wikitools_enforce_unique_titles()) {
$items['admin/content/wikitools'] = array(
'title' => t('Duplicate titles'),
'description' => t('List nodes which have duplicate titles'),
'page callback' => 'wikitools_page_duplicates',
'access arguments' => array(
'administer nodes',
),
'file' => 'wikitools.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
}
if ($wiki_path = wikitools_wiki_path()) {
$items[$wiki_path] = array(
'page callback' => 'wikitools_handle_request',
'access arguments' => array(
'access content',
),
'file' => 'wikitools.pages.inc',
'type' => MENU_CALLBACK,
);
}
if (module_exists('freelinking') && wikitools_hijack_freelinking()) {
// Add a new path under the freelinking path.
$callbacks['freelinking/%'] = array(
'page callback' => 'wikitools_handle_request',
'access arguments' => array(
'access content',
),
'file' => 'wikitools.pages.inc',
'type' => MENU_CALLBACK,
);
}
return $items;
}