# easy-bootstrap-shortcodes/4.4/shortcode/btngrp/plugin_shortcode.php

Easy Bootstrap Shortcode, version 4.4. 24 lines.

- Page: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.4/code/shortcode/btngrp/plugin_shortcode.php
- Raw: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.4/raw/shortcode/btngrp/plugin_shortcode.php
- Modified: 2015-05-27T06:08:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.4/code/shortcode/btngrp/plugin_shortcode.php#L10-L20`.

```php
<?php

function osc_theme_btngrp($params, $content = null) {
    extract(shortcode_atts(array(
        'style' => '',
        'class' => ''
    ), $params));
    $content = str_replace("]<br />", ']', $content);
    $content = str_replace("]<br />\n", ']', $content);
    $content = str_replace("<br />\n[", '[', $content);
    $out='';
    if ($style =='vertical') {
        $out .= '<div class="btn-group-vertical '  . $class.EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</div>';
    } elseif ($style =='justified') {
        $out .= '<div class="btn-group btn-group-justified '  . $class .EBS_CONTAINER_CLASS. '">' . do_shortcode($content) . '</div>';
    }else{
        $out .= '<div class="btn-group '  . $class.EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</div>';
    }

    return $out;
}

ebs_backward_compatibility_callback('buttongroup', 'osc_theme_btngrp');

```
