function captcha_menu in CAPTCHA 7
Same name and namespace in other branches
- 5.3 captcha.module \captcha_menu()
- 6.2 captcha.module \captcha_menu()
- 6 captcha.module \captcha_menu()
Implements of hook_menu().
File
- ./
captcha.module, line 62 - This module enables basic CAPTCHA functionality: administrators can add a CAPTCHA to desired forms that users without the 'skip CAPTCHA' permission (typically anonymous visitors) have to solve.
Code
function captcha_menu() {
$items = array();
// Main configuration page of the basic CAPTCHA module.
$items['admin/config/people/captcha'] = array(
'title' => 'CAPTCHA',
'description' => 'Administer how and where CAPTCHAs are used.',
'file' => 'captcha.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'captcha_admin_settings',
),
'access arguments' => array(
'administer CAPTCHA settings',
),
'type' => MENU_NORMAL_ITEM,
);
// The default local task (needed when other modules want to offer,
// alternative CAPTCHA types and their own configuration page as local task).
$items['admin/config/people/captcha/captcha'] = array(
'title' => 'CAPTCHA',
'access arguments' => array(
'administer CAPTCHA settings',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -20,
);
$items['admin/config/people/captcha/captcha/settings'] = array(
'title' => 'General settings',
'access arguments' => array(
'administer CAPTCHA settings',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['admin/config/people/captcha/captcha/examples'] = array(
'title' => 'Examples',
'description' => 'An overview of the available challenge types with examples.',
'file' => 'captcha.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'captcha_examples',
6,
7,
),
'access arguments' => array(
'administer CAPTCHA settings',
),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
);
$items['admin/config/people/captcha/captcha/captcha_point'] = array(
'title' => 'CAPTCHA point administration',
'file' => 'captcha.admin.inc',
'page callback' => 'captcha_point_admin',
'page arguments' => array(
6,
7,
),
'access arguments' => array(
'administer CAPTCHA settings',
),
'type' => MENU_CALLBACK,
);
return $items;
}