PluginProbe
Easy Bootstrap Shortcode / 4.4
Easy Bootstrap Shortcode v4.4
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 / badge / plugin_shortcode.php

plugin_shortcode.php in Easy Bootstrap Shortcode 4.4, at shortcode/badge/plugin_shortcode.php

27 lines 922 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /* * *********************************************************
4 * Badges
5 * ********************************************************* */
6
7 function osc_theme_badge($params, $content = '') {
8 extract(shortcode_atts(array(
9 'bgcolor' => '',
10 'color' => '',
11 'value' => '',
12 'float_right' => '',
13 'class' => ''
14 ), $params));
15 $out = '';
16 $content = str_replace('<br class="osc" />', '', $content);
17 $content = str_replace('<br class="osc" />\n', '', $content);
18 $style=$bgcolor!=''?'background:'.$bgcolor.';':'';
19 $style.=$color!=''?'color:'.$color.';':'';
20 $style=$style!=''?' style="'.$style.'"':'';
21 $float_right=$float_right=='true'?' pull-right':'';
22 $out = '<span class="badge ' . $class .$float_right.EBS_CONTAINER_CLASS. '"'.$style.'>' . ($value) . '</span>';
23 return $out;
24 }
25
26 ebs_backward_compatibility_callback('badge', 'osc_theme_badge');
27