# easy-bootstrap-shortcodes/3.4/shortcode/panel/plugin_shortcode.php

Easy Bootstrap Shortcode, version 3.4. 44 lines.

- Page: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/3.4/code/shortcode/panel/plugin_shortcode.php
- Raw: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/3.4/raw/shortcode/panel/plugin_shortcode.php
- Modified: 2013-09-14T06:23:08+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/3.4/code/shortcode/panel/plugin_shortcode.php#L10-L20`.

```php
<?php

function osc_theme_panel($atts, $content = null) {
    extract(shortcode_atts(array(
                'class' => '',
                    ), $atts));
    $content = str_replace("]<br />", ']', $content);

    $content = str_replace("<br />\n[", '[', $content);
    $result = '<div class="panel ' . $class . '">';
    $result .= do_shortcode($content);
    $result .= '</div>';

    return $result;
}

add_shortcode('panel', 'osc_theme_panel');

function osc_theme_panel_footer($atts, $content = null) {
    $result = '<div class="panel-footer">';
    $result .= do_shortcode($content);
    $result .= '</div>';
    return $result;
}

add_shortcode('panel-footer', 'osc_theme_panel_footer');

function osc_theme_panel_heading($atts, $content = null) {
    $result = '<div class="panel-heading">';
    $result .= do_shortcode($content);
    $result .= '</div>';
    return $result;
}

add_shortcode('panel-header', 'osc_theme_panel_heading');

function osc_theme_panel_content($atts, $content = null) {
    $result = '<div class="panel-body">';
    $result .= do_shortcode($content);
    $result .= '</div>';
    return $result;
}

add_shortcode('panel-content', 'osc_theme_panel_content');
```
