%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/gachan/www/wp-content/plugins/jekas_extensions/vc_extended/template/
Upload File :
Create Path :
Current File : /home/gachan/www/wp-content/plugins/jekas_extensions/vc_extended/template/vc_progress_bar.php

<?php
$output = $title = $values = $bgcolor = $custombgcolor = $options = $el_class = '';
extract( shortcode_atts( array(
	'title' => '',
	'values' => '',
	'bgcolor' => 'bar_grey',
	'custombgcolor' => '',
	'options' => '',
	'el_class' => ''
), $atts ) );
//wp_enqueue_script( 'waypoints' );

$el_class = $this->getExtraClass( $el_class );

$bar_options = '';
$options = explode( ",", $options );
if ( in_array( "animated", $options ) ) $bar_options .= " animated";
if ( in_array( "striped", $options ) ) $bar_options .= " striped";

$bgcolor=str_replace('bar_','',$bgcolor);

//$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_progress_bar wpb_content_element' . $el_class, $this->settings['base'], $atts );
/*$output = '<div class="' . $css_class . '">';
$output .= wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_progress_bar_heading' ) );*/

$graph_lines = explode( ",", $values );
$graph_lines_data = array();
foreach ( $graph_lines as $line ) {
	$new_line = array();
	$color_index = 2;
	$data = explode( "|", $line );
	$new_line['value'] = isset( $data[0] ) ? $data[0] : 0;
	$new_line['percentage_value'] = isset( $data[1] ) && preg_match( '/^\d{1,2}\%$/', $data[1] ) ? (float)str_replace( '%', '', $data[1] ) : false;
	if ( $new_line['percentage_value'] != false ) {
		$color_index += 1;
		$new_line['label'] = isset( $data[2] ) ? $data[2] : '';
	} else {
		$new_line['label'] = isset( $data[1] ) ? $data[1] : '';
	}
	$new_line['bgcolor'] = ( $bgcolor!='custom') ?  $bgcolor  : $custombgcolor;

/*	if ( $new_line['percentage_value'] === false && $max_value < (float)$new_line['value'] ) {
		$max_value = $new_line['value'];
	}*/

	$graph_lines_data[] = $new_line;
}
?>
<div class="skills-wrapper <?php print $el_class?>">
<?php if(!empty($title)) print "<h1>$title</h1>"?>
<?php foreach ( $graph_lines_data as $line ): ?>
 <h6 class="heading-progress"> <?php print $line['label']?> <span class="pull-right"><?php print $line['value']?>%</span></h6>
 <div class="progress">
  <div class="progress-bar" style="width: <?php print $line['value'].'%;'; if(!empty($line['bgcolor'])) print 'background:'.$line['bgcolor'].';';?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php print $line['value'] ?>" role="progressbar">
                                        </div>
                                    </div>
 <?php endforeach;?>  
 </div>

Zerion Mini Shell 1.0