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/deslist/plugin_shortcode.php +17 -35 trunk3.7 View file →
@@ -1,43 +1,25 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - exit;
4 -}
5 -use EBS\Security\Sanitizer;
6 2
7 -function osc_theme_deslist( $params, $content = null ) {
8 - $atts = shortcode_atts(
9 - array(
10 - 'class' => '',
11 - 'style' => '',
12 - ),
13 - $params
14 - );
15 -
16 - $content = str_replace( ']<br />', ']', $content );
17 - $content = str_replace( "]<br />\n", ']', $content );
18 - $content = str_replace( "<br />\n[", '[', $content );
19 -
20 - $style = Sanitizer::class_list( $atts['style'] );
21 - $class = Sanitizer::class_list( $atts['class'] );
22 -
23 - return '<dl class="osc-deslist ' . $style . ' ' . $class . EBS_CONTAINER_CLASS . '">' . do_shortcode( $content ) . '</dl>';
3 +function osc_theme_deslist($params, $content = null) {
4 + extract(shortcode_atts(array(
5 + 'class' => '',
6 + 'style' =>''
7 + ), $params));
8 + $content = str_replace("]<br />", ']', $content);
9 + $content = str_replace("]<br />\n", ']', $content);
10 + $content = str_replace("<br />\n[", '[', $content);
11 + return '<dl class="osc-deslist ' . $style . ' '.$class.'">' . do_shortcode($content) . '</dl>';
24 12 }
25 13
26 -ebs_backward_compatibility_callback( 'dl', 'osc_theme_deslist' );
14 +add_shortcode('dl', 'osc_theme_deslist');
27 15
28 -function osc_theme_dlitem( $params, $content = null ) {
29 - $atts = shortcode_atts(
30 - array(
31 - 'heading' => '',
32 - ),
33 - $params
34 - );
35 -
36 - $heading = do_shortcode( Sanitizer::shortcode_content( $atts['heading'] ) );
37 - $out = '<dt>' . $heading . '</dt>';
38 - $out .= '<dd>' . do_shortcode( $content ) . '</dd>';
39 -
16 +function osc_theme_dlitem($params, $content = null) {
17 + extract(shortcode_atts(array(
18 + 'heading' => ''
19 + ), $params));
20 + $out='<dt>'.do_shortcode($heading).'</dt>';
21 + $out.='<dd>'.do_shortcode($content).'</dd>';
40 22 return $out;
41 23 }
42 24
43 -ebs_backward_compatibility_callback( 'dlitem', 'osc_theme_dlitem' );
25 +add_shortcode('dlitem', 'osc_theme_dlitem');