You are here

function theme_fb_markup in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb.theme.inc \theme_fb_markup()
  2. 7.4 fb.theme.inc \theme_fb_markup()
1 theme call to theme_fb_markup()
fb_connect_block_view in ./fb_connect.module

File

./fb.theme.inc, line 12

Code

function theme_fb_markup($params) {
  $options = isset($params['options']) ? $params['options'] : array();
  $not_connected_markup = isset($params['not_connected']) ? $params['not_connected'] : NULL;
  $connected_markup = isset($params['not_connected']) ? $params['connected'] : NULL;
  if ($not_connected_markup == $connected_markup) {
    return $not_connected_markup;
  }

  // Merge in defaults
  $options += array(
    'wrapper' => 'div',
  );
  $output = '';
  if ($not_connected_markup) {
    $output .= '<' . $options['wrapper'] . ' class="fb_not_connected">' . $not_connected_markup . '</' . $options['wrapper'] . '>';
  }
  if ($connected_markup) {
    $output .= '<' . $options['wrapper'] . ' class="fb_connected">' . $connected_markup . '</' . $options['wrapper'] . '>';
  }
  return $output;
}