You are here

function twitter_menu in Twitter 6.5

Same name and namespace in other branches
  1. 6.2 twitter.module \twitter_menu()
  2. 6.3 twitter.module \twitter_menu()
  3. 6.4 twitter.module \twitter_menu()
  4. 7.6 twitter.module \twitter_menu()
  5. 7.3 twitter.module \twitter_menu()
  6. 7.4 twitter.module \twitter_menu()
  7. 7.5 twitter.module \twitter_menu()

Implements hook_menu().

File

./twitter.module, line 16
Provides API integration with the Twitter microblogging service.

Code

function twitter_menu() {
  $items = array();
  $items[variable_get('twitter_oauth_callback_url', TWITTER_OAUTH_CALLBACK_URL)] = array(
    'title' => 'Twitter OAuth',
    // Allow all requests to this URL so that OAuth may work correctly.
    'access callback' => TRUE,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'twitter_oauth_callback',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'twitter.pages.inc',
  );
  $items['admin/settings/twitter'] = array(
    'title' => 'Twitter',
    'description' => 'Twitter accounts and settings.',
    'page callback' => 'twitter_user_settings',
    'access arguments' => array(
      'administer twitter accounts',
    ),
    'file' => 'twitter.pages.inc',
  );
  $items['admin/settings/twitter/default'] = array(
    'title' => 'Twitter',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/twitter/settings'] = array(
    'title' => 'Settings',
    'description' => 'Twitter settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'twitter_admin_form',
    ),
    'access arguments' => array(
      'administer twitter',
    ),
    'file' => 'twitter.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['user/%user/edit/twitter'] = array(
    'title' => 'Twitter accounts',
    'page callback' => 'twitter_user_settings',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'twitter_account_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 10,
    'file' => 'twitter.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}