| 1 |
<?php |
| 2 |
|
| 3 |
/* * ********************************************************* |
| 4 |
* BUTTONS |
| 5 |
* ********************************************************* */ |
| 6 |
|
| 7 |
function osc_theme_progressbar($params, $content = null) { |
| 8 |
extract(shortcode_atts(array( |
| 9 |
'value' => '50', |
| 10 |
'barstyle' => '', |
| 11 |
'bartype' => '', |
| 12 |
'class' => '', |
| 13 |
'label' => '' |
| 14 |
), $params)); |
| 15 |
$out = $label != '' ? '<div class="osc_bar_outer"><label class="osc-progressbar-label'.EBS_CONTAINER_CLASS.'">' . $label . '</label>' : ''; |
| 16 |
$out.='<div class="progress ' . $barstyle . ' ' . $class . ' osc-progressbar'.EBS_CONTAINER_CLASS.'"> |
| 17 |
<div class="progress-bar ' . $bartype . EBS_CONTAINER_CLASS.'" role="progressbar" aria-valuenow="' . $value . '" aria-valuemin="0" aria-valuemax="100" style="width: ' . $value . '%"> |
| 18 |
<span class="sr-only'.EBS_CONTAINER_CLASS.'">' . $value . '% Complete</span> |
| 19 |
</div> |
| 20 |
</div>'; |
| 21 |
$out .= $label != '' ?'</div>':''; |
| 22 |
return $out; |
| 23 |
} |
| 24 |
|
| 25 |
add_shortcode('progressbar', 'osc_theme_progressbar'); |
| 26 |
|
| 27 |
|