| 1 |
<?php |
| 2 |
|
| 3 |
/* * ********************************************************* |
| 4 |
* BUTTONS |
| 5 |
* ********************************************************* */ |
| 6 |
|
| 7 |
function osc_theme_icon($params, $content = null) { |
| 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>'; |
| 26 |
return $out; |
| 27 |
} |
| 28 |
|
| 29 |
ebs_backward_compatibility_callback('icon', 'osc_theme_icon'); |