function bs_shortcodes_responsive in Bootstrap 3 shortcodes 7
bs_shortcodes_responsive
File
- ./
bs_shortcodes.module, line 1792
Code
function bs_shortcodes_responsive($attrs, $content = '') {
extract(shortcode_attrs(array(
"visible" => '',
"hidden" => '',
"block" => '',
"inline" => '',
"inline_block" => '',
"xclass" => '',
"data" => '',
), $attrs));
$class = '';
if ($visible) {
$visible = explode(' ', $visible);
foreach ($visible as $v) {
$class .= "visible-{$v} ";
}
}
if ($hidden) {
$hidden = explode(' ', $hidden);
foreach ($hidden as $h) {
$class .= "hidden-{$h} ";
}
}
if ($block) {
$block = explode(' ', $block);
foreach ($block as $b) {
$class .= "visible-{$b}-block ";
}
}
if ($inline) {
$inline = explode(' ', $inline);
foreach ($inline as $i) {
$class .= "visible-{$i}-inline ";
}
}
if ($inline_block) {
$inline_block = explode(' ', $inline_block);
foreach ($inline_block as $ib) {
$class .= "visible-{$ib}-inline ";
}
}
$class .= $xclass ? ' ' . $xclass : '';
$data_props = _bs_shortcodes_parse_data_attributes($data);
return sprintf('<span class="%s"%s>%s</span>', check_plain($class), $data_props ? ' ' . $data_props : '', $content);
}