PluginProbe
Easy Bootstrap Shortcode / 3.5
Easy Bootstrap Shortcode v3.5
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.5, at shortcode/panel/plugin_shortcode.php

44 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 'class' => '',
6 ), $atts));
7 $content = str_replace("]<br />", ']', $content);
8
9 $content = str_replace("<br />\n[", '[', $content);
10 $result = '<div class="panel ' . $class . '">';
11 $result .= do_shortcode($content);
12 $result .= '</div>';
13
14 return $result;
15 }
16
17 add_shortcode('panel', 'osc_theme_panel');
18
19 function osc_theme_panel_footer($atts, $content = null) {
20 $result = '<div class="panel-footer">';
21 $result .= do_shortcode($content);
22 $result .= '</div>';
23 return $result;
24 }
25
26 add_shortcode('panel-footer', 'osc_theme_panel_footer');
27
28 function osc_theme_panel_heading($atts, $content = null) {
29 $result = '<div class="panel-heading">';
30 $result .= do_shortcode($content);
31 $result .= '</div>';
32 return $result;
33 }
34
35 add_shortcode('panel-header', 'osc_theme_panel_heading');
36
37 function osc_theme_panel_content($atts, $content = null) {
38 $result = '<div class="panel-body">';
39 $result .= do_shortcode($content);
40 $result .= '</div>';
41 return $result;
42 }
43
44 add_shortcode('panel-content', 'osc_theme_panel_content');