<?php
/**
 * @subpackage  tcshortcodes plugin
*/
//no direct accees
defined ('_JEXEC') or die('resticted aceess');

//[Progressbar]
if(!function_exists('progressbar_sc')) 
{
	function progressbar_sc($atts, $content='')
	{
		extract(shtcode_atts(array(
			"text"=>'',
			"type"=>'',
			"striped"=>'',
			"active"=>'',
			"bar"=>''
		), $atts));

		$striped 	= ( $striped === 'yes' ) ? 'progress-striped' : '';
		$active 	= ( $active  === 'yes' ) ? 'active' : '';
		
		$output  	= '<div class="progress progress-' . $type . ' ' . $striped . ' ' . $active . '">';
 		$output    .= '<div class="bar" style="width: ' . $bar . ';">' . do_shtcode( $text ) . ' ' . $bar . '</div>';
		$output    .= '</div>';

		return $output;
	}

	add_shtcode('progressbar', 'progressbar_sc');
}