| 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 |
|