function bs_shortcodes_collapsibles in Bootstrap 3 shortcodes 7
bs_shortcodes_collapsibles
@author Filip Stefansson @since 1.0
File
- ./
bs_shortcodes.module, line 1260
Code
function bs_shortcodes_collapsibles($attrs, $content = '') {
extract(shortcode_attrs(array(
"xclass" => '',
"data" => '',
), $attrs));
$class = 'panel-group';
$class .= $xclass ? ' ' . $xclass : '';
$id = 'custom-collapse-' . $GLOBALS['collapsibles_count'];
$data_props = _bs_shortcodes_parse_data_attributes($data);
if (isset($GLOBALS['collapsibles_count'])) {
$GLOBALS['collapsibles_count']++;
}
return sprintf('<div class="%s" id="%s"%s>%s</div>', check_plain($class), drupal_html_id($id), $data_props ? ' ' . $data_props : '', $content);
}