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/buttons/plugin_shortcode.php +7 -17 4.53.7 View file →
@@ -7,32 +7,21 @@
7 7 function osc_theme_button($params, $content = null) {
8 8 extract(shortcode_atts(array(
9 9 'title' => 'osCitas',
10 10 'link' => '',
11 - 'linkrel' => '',
12 11 'type' => 'link',
13 12 'style' => '',
14 13 'align' => '',
15 14 'target' => '',
16 15 'icon' => '',
17 - 'class' => '',
18 - 'iconcolor'=>''
16 + 'class' => ''
19 17 ), $params));
20 18 $out = '';
21 - $iconcount = array();
22 - if ($icon) $iconcount=explode(' ',$icon);
23 - array_filter($iconcount);
24 - if(count($iconcount)==1){
25 - $icon= 'glyphicon '.$icon;
26 - }
27 19 if($icon!=''){
28 - if($iconcolor!=''){
29 - $iconcolor='style="color:'.$iconcolor.';"';
30 - }
31 20 if($align=='right'){
32 - $value=$title.' <i class="'.$icon.'" '.$iconcolor.'></i>';
21 + $value=$title.' <i class="glyphicon '.$icon.'"></i>';
33 22 } else{
34 - $value='<i class="'.$icon.'" '.$iconcolor.'></i> '.$title;
23 + $value='<i class="glyphicon '.$icon.'"></i> '.$title;
35 24 }
36 25 }else{
37 26 $value=$title;
38 27 }
@@ -37,12 +26,13 @@
37 26 $value=$title;
38 27 }
39 28 $target = ' target="'.($target != 'false' ? '_blank':'_self').'"';
40 29 if ($type == 'link') {
41 - $out = '<a class="btn ' . $style . ' ' . $class . ' '.EBS_CONTAINER_CLASS.'" href="' . $link . '" rel="' . $linkrel . '" ' . ($target) . '>' . $value . '</a>';
30 + $out = '<a class="btn ' . $style . ' ' . $class . '" href="' . $link . '" ' . ($target) . '>' . $value . '</a>';
42 31 } elseif ($type == 'button') {
43 - $out = '<button class="btn ' . $style . ' ' . $class . ' '.EBS_CONTAINER_CLASS.'" >' . $value . '</button>';
32 + $out = '<button class="btn ' . $style . ' ' . $class . '" >' . $value . '</button>';
44 33 }
45 34 return $out;
46 35 }
47 36
48 -ebs_backward_compatibility_callback('button', 'osc_theme_button');
37 +add_shortcode('button', 'osc_theme_button');
38 +