You are here

function fb_post_menu in Drupal for Facebook 7.4

Implements hook_menu().

File

./fb_post.module, line 34

Code

function fb_post_menu() {
  $items = array();

  // Administration
  $items[FB_POST_PATH_ADMIN] = array(
    'title' => 'Post to Facebook',
    'description' => 'Site-wide connection to Facebook.com.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fb_post_admin_form',
    ),
    'access arguments' => array(
      FB_PERM_ADMINISTER,
    ),
    'file' => 'fb_post.admin.inc',
    'file path' => drupal_get_path('module', 'fb_post'),
  );

  // Per-node administration.
  $items['node/%node/fb'] = array(
    'title' => 'Facebook',
    'page callback' => 'fb_post_entity_page',
    'page arguments' => array(
      'node',
      1,
    ),
    'access arguments' => array(
      FB_PERM_ADMINISTER,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  return $items;
}