You are here

function bs_shortcodes_table_wrap in Bootstrap 3 shortcodes 7

bs_shortcodes_table_wrap

@author Filip Stefansson @since 1.0

File

./bs_shortcodes.module, line 997

Code

function bs_shortcodes_table_wrap($attrs, $content = '') {
  extract(shortcode_attrs(array(
    'bordered' => '',
    'striped' => '',
    'hover' => '',
    'condensed' => '',
    'responsive' => '',
    'xclass' => '',
    'data' => '',
  ), $attrs));
  $class = 'table';
  $class .= $bordered != '' ? ' table-bordered' : '';
  $class .= $striped != '' ? ' table-striped' : '';
  $class .= $hover != '' ? ' table-hover' : '';
  $class .= $condensed != '' ? ' table-condensed' : '';
  $class .= $xclass ? ' ' . $xclass : '';
  $return = '';
  $tag = array(
    'table',
  );
  $title = '';
  $content = $content;
  $return .= _bs_shortcodes_scrape_dom_element($tag, $content, $class, $title, $data);
  if ($responsive != '') {
    $return = '<div class="table-responsive">' . $return . '</div>';
  }
  return $return;
}