'', 'id' => '', 'animated_stripes' => 'no', 'filledcolor' => '', 'percentage' => '70', 'striped' => 'no', 'textcolor' => '', 'unfilledcolor' => '', 'unit' => '', ), $args ); extract( $defaults ); self::$args = $defaults; if( ! $filledcolor ) { self::$args['filledcolor'] = $smof_data['progressbar_filled_color']; } if( ! $textcolor ) { self::$args['textcolor'] = $smof_data['progressbar_text_color']; } if( ! $unfilledcolor ) { self::$args['unfilledcolor'] = $smof_data['progressbar_unfilled_color']; } $html = sprintf( '
%s %s%s
', FusionCore_Plugin::attributes( 'progressbar-shortcode' ), FusionCore_Plugin::attributes( 'progressbar-shortcode-content' ), FusionCore_Plugin::attributes( 'progressbar-shortcode-span' ), $content, $percentage, $unit ); return $html; } function attr() { $attr = array(); $attr['style'] = sprintf( 'background-color:%s;', self::$args['unfilledcolor'] ); $attr['class'] = 'fusion-progressbar progress-bar'; if( self::$args['striped'] == "yes" ) { $attr['class'] .= ' progress-striped'; } if( self::$args['animated_stripes'] == "yes" ) { $attr['class'] .= ' active'; } if( self::$args['class'] ) { $attr['class'] .= ' ' . self::$args['class']; } if( self::$args['id'] ) { $attr['id'] = self::$args['id']; } return $attr; } function content_attr() { $attr = array(); $attr['class'] = 'progress progress-bar-content'; $attr['style'] = sprintf( 'width:%s%%;background-color:%s;', 0, self::$args['filledcolor'] ); $attr['role'] = 'progressbar'; $attr['aria-valuemin'] = '0'; $attr['aria-valuemax'] = '100'; $attr['aria-valuenow'] = self::$args['percentage']; return $attr; } function span_attr() { $attr = array(); $attr['class'] = 'progress-title sr-only'; $attr['style'] = sprintf( 'color:%s;', self::$args['textcolor'] ); return $attr; } } new FusionSC_Progressbar();