# easy-bootstrap-shortcodes/4.5/shortcode/notifications/plugin_shortcode.php

Easy Bootstrap Shortcode, version 4.5. 27 lines.

- Page: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.5/code/shortcode/notifications/plugin_shortcode.php
- Raw: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/4.5/raw/shortcode/notifications/plugin_shortcode.php
- Modified: 2015-09-28T11:09: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.5/code/shortcode/notifications/plugin_shortcode.php#L10-L20`.

```php
<?php

function osc_theme_notification($atts, $content = null) {
    extract(shortcode_atts(array(
                'type' => '',
                'close' => 'false',
                'class' => ''
                    ), $atts));
    $type = ($close == 'true' ? $type . ' alert-dismissable' : $type);


    $result = '<div class = "alert ' . $type . ' ' . $class .EBS_CONTAINER_CLASS. '">';
    if ($close == 'true') {
        $result .= '<button type = "button" class = "close'.EBS_CONTAINER_CLASS.'" data-dismiss = "alert" aria-hidden = "true">&times;
    </button>';
    }
    $result .= do_shortcode($content);
    $result .= '</div>';

    return $result;
}

ebs_backward_compatibility_callback('notification', 'osc_theme_notification');




```
