You are here

function fb_devel_block in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 5.2 fb_devel.module \fb_devel_block()
  2. 5 fb_devel.module \fb_devel_block()
  3. 6.3 fb_devel.module \fb_devel_block()

File

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

Code

function fb_devel_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {

    // Provide two copies of same block, for iframe scenarios.
    $items['fb_devel']['info'] = t('Facebook Devel Page Info');
    $items['fb_devel_2']['info'] = t('Facebook Devel Page Info 2');
    return $items;
  }
  elseif ($op == 'view') {
    if (user_access('access devel information')) {
      return array(
        'subject' => t('Facebook Devel Info'),
        'content' => drupal_get_form('fb_devel_info'),
      );
    }
  }
}