PluginProbe
Easy Bootstrap Shortcode / 3.7
Easy Bootstrap Shortcode v3.7
trunk 2.4.0 2.5 3.4 3.5 3.6 3.7 4.0.0 4.4 4.5 4.5.4 5.0.0 5.0.1 5.0.2
easy-bootstrap-shortcodes / shortcode / oscpopover / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 3.7, at shortcode/oscpopover/plugin_shortcode.php

28 lines 902 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 function osc_theme_popover($params, $content = 'Popover') {
4 extract(shortcode_atts(array(
5 'trigger' => '',
6 'title' => '',
7 'pop_content' => '',
8 'style' => '',
9 'size' => '',
10 'type' => '',
11 'class' => ''
12 ), $params));
13 $out = '';
14 $out = '<button class="osc_popover btn ' . $size . ' ' . $type . ' ' . $class . '" data-content="' . $pop_content . '" data-placement="' . $style . '" data-toggle="popover" data-trigger="' . $trigger . '" data-container="body" type="button" data-title="' . $title . '"> ' . do_shortcode($content) . ' </button>';
15
16
17 $out .= "
18 <script>
19 jQuery(document).ready(function(){
20 jQuery('.osc_popover').popover();
21 });
22 </script>
23 ";
24
25 return $out;
26 }
27
28 add_shortcode('popover', 'osc_theme_popover');