You are here

function fb_devel_menu in Drupal for Facebook 7.4

Same name and namespace in other branches
  1. 5.2 fb_devel.module \fb_devel_menu()
  2. 5 fb_devel.module \fb_devel_menu()
  3. 6.3 fb_devel.module \fb_devel_menu()
  4. 6.2 fb_devel.module \fb_devel_menu()
  5. 7.3 fb_devel.module \fb_devel_menu()

File

./fb_devel.module, line 18
Makes development with Drupal for Facebook much easier. Keep this module enabled until you're confident your app works perfectly.

Code

function fb_devel_menu() {
  $base = array(
    'type' => MENU_NORMAL_ITEM,
    'access arguments' => array(
      'access devel information',
    ),
    'menu_name' => 'devel',
  );
  $items['fb/devel'] = array(
    'page callback' => 'fb_devel_page',
    'title' => 'Facebook devel',
  ) + $base;
  $items['fb_devel'] = array(
    'page callback' => 'fb_devel_page',
    'title' => 'Facebook devel',
  ) + $base;
  $items['fb/devel/default'] = array(
    'title' => 'Facebook Devel',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -20,
  ) + $base;
  $items['fb/devel/app'] = array(
    'title' => 'Application',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'fb_devel_page_app',
  ) + $base;
  $items['fb/devel/test'] = array(
    'title' => 'Test',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'fb_devel_page_test',
  ) + $base;

  // Special item forwards user to facebook linter for the current page.
  $items['fb/devel_linter'] = array(
    'title' => 'Facebook linter',
    'page callback' => 'drupal_not_found',
    // Because we alter link, below.
    'options' => array(
      'alter' => TRUE,
    ),
  ) + $base;

  // Previous version of modules/fb used fb_cb as a URL prefix.  This version does not support that convention.  This menu item will help administrators find that problem.
  $items['fb_cb'] = array(
    'title' => 'Bad Facebook Callback URL',
    'page callback' => 'fb_devel_cb_help',
    'access callback' => TRUE,
  ) + $base;
  return $items;
}