You are here

function shorten_menu in Shorten URLs 7

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

Implements hook_menu().

File

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

Code

function shorten_menu() {
  $items = array();
  $items['admin/config/services/shorten'] = array(
    'title' => 'Shorten',
    'description' => 'Adjust certain display settings for Shorten.',
    'page callback' => 'shorten_admin_form',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'shorten.admin.inc',
  );
  $items['admin/config/services/shorten/general'] = array(
    'title' => 'General',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'weight' => -1,
  );
  $items['admin/config/services/shorten/keys'] = array(
    'title' => 'Shorten API Keys',
    'description' => 'Fill in API keys to use certain services.',
    'page callback' => 'shorten_keys_form',
    '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_shorten_form',
    'page arguments' => array(
      'shorten_form_shorten',
    ),
    'access arguments' => array(
      'use Shorten URLs page',
    ),
  );
  return $items;
}