| 1 |
<?php |
| 2 |
|
| 3 |
function osc_theme_btngrp($params, $content = null) { |
| 4 |
extract(shortcode_atts(array( |
| 5 |
'style' => '', |
| 6 |
'class' => '' |
| 7 |
), $params)); |
| 8 |
$content = str_replace("]<br />", ']', $content); |
| 9 |
$content = str_replace("]<br />\n", ']', $content); |
| 10 |
$content = str_replace("<br />\n[", '[', $content); |
| 11 |
$out=''; |
| 12 |
if ($style =='vertical') { |
| 13 |
$out .= '<div class="btn-group-vertical ' . $class.EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</div>'; |
| 14 |
} elseif ($style =='justified') { |
| 15 |
$out .= '<div class="btn-group btn-group-justified ' . $class .EBS_CONTAINER_CLASS. '">' . do_shortcode($content) . '</div>'; |
| 16 |
}else{ |
| 17 |
$out .= '<div class="btn-group ' . $class.EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</div>'; |
| 18 |
} |
| 19 |
|
| 20 |
return $out; |
| 21 |
} |
| 22 |
|
| 23 |
ebs_backward_compatibility_callback('buttongroup', 'osc_theme_btngrp'); |
| 24 |
|