| @@ -3,26 +3,20 @@ | ||
| 3 | 3 | function osc_theme_iconhead($params, $content = null) { |
| 4 | 4 | extract(shortcode_atts(array( |
| 5 | 5 | 'class' => '', |
| 6 | 6 | 'style' => '', |
| 7 | - 'type' => 'h1', | |
| 8 | - 'color'=>'' | |
| 7 | + 'type' => 'h1' | |
| 9 | 8 | ), $params)); |
| 10 | 9 | $out = ''; |
| 11 | - if($color!=''){ | |
| 12 | - $color='style="color:'.$color.';"'; | |
| 10 | + if ($style != '') { | |
| 11 | + $style = ' <span class="glyphicon ' . $style . '"></span> '; | |
| 13 | 12 | } |
| 14 | - if ($style != '') { | |
| 15 | - $iconcount=explode(' ',$style); | |
| 16 | - array_filter($iconcount); | |
| 17 | - if(count($iconcount)==1){ | |
| 18 | - $style= 'glyphicon '.$style; | |
| 19 | - } | |
| 20 | - $style = ' <span class=" ' . $style . '" '.$color.'></span> '; | |
| 13 | + if ($class != '') { | |
| 14 | + $class = ' class="' . $class . '"'; | |
| 21 | 15 | } |
| 16 | + $out = '<' . $type . $class . '>' . $style . do_shortcode($content) . '</' . $type . '>'; | |
| 22 | 17 | |
| 23 | - $out = '<' . $type . ' class="' . $class .EBS_CONTAINER_CLASS. '" >' . $style . do_shortcode($content) . '</' . $type . '>'; | |
| 24 | - | |
| 25 | 18 | return $out; |
| 26 | 19 | } |
| 27 | 20 | |
| 28 | -ebs_backward_compatibility_callback('iconheading', 'osc_theme_iconhead'); | |
| 21 | +add_shortcode('iconheading', 'osc_theme_iconhead'); | |
| 22 | + | |