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