You are here

function image_captcha_menu in CAPTCHA 5.3

Same name and namespace in other branches
  1. 6.2 image_captcha/image_captcha.module \image_captcha_menu()
  2. 6 image_captcha/image_captcha.module \image_captcha_menu()
  3. 7 image_captcha/image_captcha.module \image_captcha_menu()

Implementation of hook_menu().

File

image_captcha/image_captcha.module, line 32
Implementation of image CAPTCHA for use with the CAPTCHA module

Code

function image_captcha_menu($may_cache) {
  $items = array();
  if ($may_cache) {

    // add an administration tab for image_captcha
    $items[] = array(
      'path' => 'admin/user/captcha/image_captcha',
      'title' => t('Image CAPTCHA'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'image_captcha_settings_form',
      ),
      'type' => MENU_LOCAL_TASK,
    );

    // callback for generating an image
    $items[] = array(
      'path' => 'image_captcha',
      'type' => MENU_CALLBACK,
      'access' => TRUE,
      'callback' => 'image_captcha_image',
    );
  }
  return $items;
}