You are here

function vkxp_menu in VK CrossPoster 7.2

Same name and namespace in other branches
  1. 6.3 vkxp.module \vkxp_menu()
  2. 6 vkxp.module \vkxp_menu()
  3. 6.2 vkxp.module \vkxp_menu()
  4. 7 vkxp.module \vkxp_menu()

Implements hook_menu().

File

./vkxp.module, line 46

Code

function vkxp_menu() {
  $items['admin/config/services/vkxp'] = array(
    'title' => 'VKontakte CrossPoster',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'vkxp_admin_main_settings',
    ),
    'access arguments' => array(
      'administer vkontakte crossposter',
    ),
    'file' => 'vkxp.admin.inc',
  );

  // Module settings page.
  $items['admin/config/services/vkxp/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'vkxp_admin_main_settings',
    ),
    'access arguments' => array(
      'administer vkontakte crossposter',
    ),
    'file' => 'vkxp.admin.inc',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 1,
  );

  // Page for building access token.
  $items['admin/config/services/vkxp/access_token'] = array(
    'title' => 'Recieve access token',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'vkxp_admin_access_token',
    ),
    'access arguments' => array(
      'administer vkontakte crossposter',
    ),
    'file' => 'vkxp.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  if (variable_get('vkxp_add_post_tab', FALSE)) {
    $items['node/%/post_to_vk'] = array(
      'title' => 'Post to VK.com',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'vkxp_post_tab_form',
      ),
      'access arguments' => array(
        'post to vkontakte',
      ),
      'file' => 'vkxp.forms.inc',
      'type' => MENU_LOCAL_TASK,
      'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    );
  }
  return $items;
}