You are here

function bs_shortcodes_nav in Bootstrap 3 shortcodes 7

bs_shortcodes_nav

File

./bs_shortcodes.module, line 403

Code

function bs_shortcodes_nav($attrs, $content = '') {
  extract(shortcode_attrs(array(
    "type" => '',
    "stacked" => '',
    "justified" => '',
    "xclass" => '',
    "data" => '',
  ), $attrs));
  $class = 'nav';
  $class .= $type ? ' nav-' . $type : ' nav-tabs';
  $class .= $stacked != '' ? ' nav-stacked' : '';
  $class .= $justified != '' ? ' nav-justified' : '';
  $class .= $xclass ? ' ' . $xclass : '';
  $data_props = _bs_shortcodes_parse_data_attributes($data);
  return sprintf('<ul class="%s"%s>%s</ul>', check_plain($class), $data_props ? ' ' . $data_props : '', $content);
}