You are here

function bs_shortcodes_progress in Bootstrap 3 shortcodes 7

bs_shortcodes_progress

File

./bs_shortcodes.module, line 514

Code

function bs_shortcodes_progress($attrs, $content = '') {
  extract(shortcode_attrs(array(
    "striped" => '',
    "animated" => '',
    "xclass" => '',
    "data" => '',
  ), $attrs));
  $class = 'progress';
  $class .= $striped != '' ? ' progress-striped' : '';
  $class .= $animated != '' ? ' active' : '';
  $class .= $xclass ? ' ' . $xclass : '';
  $data_props = _bs_shortcodes_parse_data_attributes($data);
  return sprintf('<div class="%s"%s>%s</div>', check_plain($class), $data_props ? ' ' . $data_props : '', $content);
}