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
← All changes | shortcode/panel/plugin_shortcode.php +13 -20 trunk3.7 View file →
@@ -1,22 +1,15 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - exit;
4 -}
5 -use EBS\Security\Sanitizer;
6 2
7 3 function osc_theme_panel($atts, $content = null) {
8 - $atts = shortcode_atts(array(
9 - 'style' => '',
10 - 'class' => ''
11 - ), $atts);
4 + extract(shortcode_atts(array(
5 + 'style' => '',
6 + 'class' => ''
7 + ), $atts));
8 + $content = str_replace("]<br />", ']', $content);
12 9
13 - $style = Sanitizer::class_list( $atts['style'] );
14 - $class = Sanitizer::class_list( $atts['class'] );
15 -
16 - $content = str_replace("]<br />", ']', $content);
17 10 $content = str_replace("<br />\n[", '[', $content);
18 - $result = '<div class="panel ' . $style . ' ' . $class . EBS_CONTAINER_CLASS . '">';
11 + $result = '<div class="panel ' . $style . ' ' . $class . '">';
19 12 $result .= do_shortcode($content);
20 13 $result .= '</div>';
21 14
22 15 return $result;
@@ -21,32 +14,32 @@
21 14
22 15 return $result;
23 16 }
24 17
25 -ebs_backward_compatibility_callback('panel', 'osc_theme_panel');
18 +add_shortcode('panel', 'osc_theme_panel');
26 19
27 20 function osc_theme_panel_footer($atts, $content = null) {
28 - $result = '<div class="panel-footer' . EBS_CONTAINER_CLASS . '">';
21 + $result = '<div class="panel-footer">';
29 22 $result .= do_shortcode($content);
30 23 $result .= '</div>';
31 24 return $result;
32 25 }
33 26
34 -ebs_backward_compatibility_callback('panel-footer', 'osc_theme_panel_footer');
27 +add_shortcode('panel-footer', 'osc_theme_panel_footer');
35 28
36 29 function osc_theme_panel_heading($atts, $content = null) {
37 - $result = '<div class="panel-heading' . EBS_CONTAINER_CLASS . '">';
30 + $result = '<div class="panel-heading">';
38 31 $result .= do_shortcode($content);
39 32 $result .= '</div>';
40 33 return $result;
41 34 }
42 35
43 -ebs_backward_compatibility_callback('panel-header', 'osc_theme_panel_heading');
36 +add_shortcode('panel-header', 'osc_theme_panel_heading');
44 37
45 38 function osc_theme_panel_content($atts, $content = null) {
46 - $result = '<div class="panel-body' . EBS_CONTAINER_CLASS . '">';
39 + $result = '<div class="panel-body">';
47 40 $result .= do_shortcode($content);
48 41 $result .= '</div>';
49 42 return $result;
50 43 }
51 44
52 -ebs_backward_compatibility_callback('panel-content', 'osc_theme_panel_content');
45 +add_shortcode('panel-content', 'osc_theme_panel_content');