You are here

function shorten_menu in Shorten URLs 6

Same name and namespace in other branches
  1. 7.2 shorten.module \shorten_menu()
  2. 7 shorten.module \shorten_menu()

Implementation of hook_menu().

File

./shorten.module, line 24
Shortens URLs via external services.

Code

function shorten_menu() {
  $items = array();
  $items['admin/settings/shorten'] = array(
    'title' => 'Shorten',
    'description' => 'Adjust certain display settings for Shorten.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'shorten_admin',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'shorten.admin.inc',
  );
  $items['admin/settings/shorten/general'] = array(
    'title' => 'General',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => -1,
  );
  $items['admin/settings/shorten/keys'] = array(
    'title' => 'Shorten API Keys',
    'description' => 'Fill in API keys to use certain services.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'shorten_keys',
    ),
    'access arguments' => array(
      'manage Shorten URLs API keys',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'shorten.admin.inc',
  );
  $items['shorten'] = array(
    'title' => 'Shorten URLs',
    'page callback' => 'shorten_form_display',
    'access arguments' => array(
      'use Shorten URLs page',
    ),
  );
  $items['shorten/js'] = array(
    'title' => 'Save Shorten form',
    'page callback' => 'shorten_save_js',
    'access callback' => '_shorten_true',
    'type' => MENU_CALLBACK,
  );
  return $items;
}