function fb_connect_menu in Drupal for Facebook 7.4
Same name and namespace in other branches
- 5.2 fb_connect.module \fb_connect_menu()
- 6.3 fb_connect.module \fb_connect_menu()
- 6.2 fb_connect.module \fb_connect_menu()
- 7.3 fb_connect.module \fb_connect_menu()
Implements hook_menu().
File
- ./
fb_connect.module, line 12
Code
function fb_connect_menu() {
$items = array();
// Use Drupal's menu alter trick to put a connect button on the menu.
$items['fb/connect'] = array(
'title' => 'Facebook Connect',
'page callback' => 'drupal_not_found',
// Because we alter link, below.
//'menu_name' => 'fb_connect',
'options' => array(
'alter' => TRUE,
'html' => TRUE,
'attributes' => array(
'class' => array(
'fb',
),
),
),
'access callback' => TRUE,
);
// Administration
$items[FB_CONNECT_PATH_ADMIN] = array(
'title' => 'Connect',
'description' => 'Site-wide connection to Facebook.com.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'fb_connect_admin_form',
),
'access arguments' => array(
FB_PERM_ADMINISTER,
),
'file' => 'fb_connect.admin.inc',
'file path' => drupal_get_path('module', 'fb_connect'),
);
return $items;
}