PluginProbe
Easy Bootstrap Shortcode / trunk
Easy Bootstrap Shortcode vtrunk
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 / well / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode trunk, at shortcode/well/plugin_shortcode.php

33 lines 817 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5 use EBS\Security\Sanitizer;
6
7 /* * *********************************************************
8 * BUTTONS
9 * ********************************************************* */
10
11 function osc_theme_well( $params, $content = 'Label' ) {
12 $atts = shortcode_atts(
13 array(
14 'type' => '',
15 'class' => '',
16 ),
17 $params
18 );
19
20 $out = '';
21 $content = str_replace( '<br class="osc" />', '', $content );
22 $content = str_replace( '<br class="osc" />\n', '', $content );
23
24 $type = Sanitizer::class_list( $atts['type'] );
25 $class = Sanitizer::class_list( $atts['class'] );
26
27 $out = '<div class="well ' . $type . ' ' . EBS_CONTAINER_CLASS . ' ' . $class . '">' . do_shortcode( $content ) . '</div>';
28
29 return $out;
30 }
31
32 ebs_backward_compatibility_callback( 'well', 'osc_theme_well' );
33