# easy-bootstrap-shortcodes/3.5/shortcode/popover/plugin_shortcode.php

Easy Bootstrap Shortcode, version 3.5. 28 lines.

- Page: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/3.5/code/shortcode/popover/plugin_shortcode.php
- Raw: https://pluginprobe.com/plugins/easy-bootstrap-shortcodes/3.5/raw/shortcode/popover/plugin_shortcode.php
- Modified: 2013-09-15T09:05:18+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.5/code/shortcode/popover/plugin_shortcode.php#L10-L20`.

```php
<?php


function osc_theme_popover($params, $content = 'Popover') {
    extract(shortcode_atts(array(
                'trigger' => '',
                'title' => '',
                'pop_content' => '',
                'style' => '',
                'size' => '',
                'type' => ''
                    ), $params));
    $out = '';
    $out = '<button class="osc_popover btn ' . $size . ' ' . $type . '" data-content="' . $pop_content . '" data-placement="' . $style . '" data-toggle="popover" data-trigger="'.$trigger.'" data-container="body" type="button" data-title="' . $title . '"> ' . $content . ' </button>';


    $out .= "
    <script>
       jQuery(document).ready(function(){
        jQuery('.osc_popover').popover();
        });
    </script>
    ";

    return $out;
}

add_shortcode('popover', 'osc_theme_popover');
```
