PluginProbe
Easy Bootstrap Shortcode / 3.6
Easy Bootstrap Shortcode v3.6
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 / panel / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 3.6, at shortcode/panel/plugin_shortcode.php

45 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 function osc_theme_panel($atts, $content = null) {
4 extract(shortcode_atts(array(
5 'style' => '',
6 'class' => ''
7 ), $atts));
8 $content = str_replace("]<br />", ']', $content);
9
10 $content = str_replace("<br />\n[", '[', $content);
11 $result = '<div class="panel ' . $style . ' ' . $class . '">';
12 $result .= do_shortcode($content);
13 $result .= '</div>';
14
15 return $result;
16 }
17
18 add_shortcode('panel', 'osc_theme_panel');
19
20 function osc_theme_panel_footer($atts, $content = null) {
21 $result = '<div class="panel-footer">';
22 $result .= do_shortcode($content);
23 $result .= '</div>';
24 return $result;
25 }
26
27 add_shortcode('panel-footer', 'osc_theme_panel_footer');
28
29 function osc_theme_panel_heading($atts, $content = null) {
30 $result = '<div class="panel-heading">';
31 $result .= do_shortcode($content);
32 $result .= '</div>';
33 return $result;
34 }
35
36 add_shortcode('panel-header', 'osc_theme_panel_heading');
37
38 function osc_theme_panel_content($atts, $content = null) {
39 $result = '<div class="panel-body">';
40 $result .= do_shortcode($content);
41 $result .= '</div>';
42 return $result;
43 }
44
45 add_shortcode('panel-content', 'osc_theme_panel_content');