| @@ -1,28 +1,28 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | - | |
| 4 | -function osc_theme_popover($params, $content = 'Popover') { | |
| 5 | - extract(shortcode_atts(array( | |
| 6 | - 'trigger' => '', | |
| 7 | - 'title' => '', | |
| 8 | - 'pop_content' => '', | |
| 9 | - 'style' => '', | |
| 10 | - 'size' => '', | |
| 11 | - 'type' => '' | |
| 12 | - ), $params)); | |
| 13 | - $out = ''; | |
| 14 | - $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>'; | |
| 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 | - | |
| 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 | 28 | add_shortcode('popover', 'osc_theme_popover'); |