You are here

function bs_shortcodes_dropdown_item in Bootstrap 3 shortcodes 7

bs_shortcodes_dropdown_item

@author M. W. Delaney

File

./bs_shortcodes.module, line 317

Code

function bs_shortcodes_dropdown_item($attrs, $content = '') {
  extract(shortcode_attrs(array(
    "link" => '',
    "disabled" => '',
    "xclass" => '',
    "data" => '',
  ), $attrs));
  $li_class = '';
  $li_class .= $disabled != '' ? ' disabled' : '';
  $a_class = '';
  $a_class .= $xclass ? ' ' . $xclass : '';
  $data_props = _bs_shortcodes_parse_data_attributes($data);
  return sprintf('<li role="presentation" class="%s"><a role="menuitem" href="%s" class="%s"%s>%s</a></li>', check_plain($li_class), check_url($link), check_plain($a_class), $data_props ? ' ' . $data_props : '', $content);
}