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/icon/plugin_shortcode.php +6 -18 4.43.7 View file →
@@ -5,25 +5,13 @@
5 5 * ********************************************************* */
6 6
7 7 function osc_theme_icon($params, $content = null) {
8 8 extract(shortcode_atts(array(
9 - 'type' => '',
10 - 'color'=>'',
11 - 'class' => '',
12 - 'fontsize'=>''
13 - ), $params));
14 - if($color!=''){
15 - $color='color:'.$color.';';
16 - }
17 - if($fontsize!=''){
18 - $fontsize=' font-size:'.$fontsize.'px;';
19 - }
20 - $iconcount=explode(' ',$type);
21 - array_filter($iconcount);
22 - if(count($iconcount)==1){
23 - $type= 'glyphicon '.$type;
24 - }
25 - $out = '<i class=" ' . $type . ' ' . $class . '" style="'.$color.$fontsize.'"></i>';
9 + 'type' => '',
10 + 'class' => '',
11 + ), $params));
12 + $out = '<i class="glyphicon ' . $type . ' ' . $class . '"></i>';
26 13 return $out;
27 14 }
28 15
29 -ebs_backward_compatibility_callback('icon', 'osc_theme_icon');
16 +add_shortcode('icon', 'osc_theme_icon');
17 +