'circle-process', 'value' => '100', 'color1' => '#e5e5e5', 'color2' => '#ffd21e', 'value_color' => '', 'value_size' => '30', 'bg_color' => '', 'radius' => '150', 'width' => '3', 'height' => '5', 'border_radius' => '0', 'align' => '', ),$attr)); $el_class = $css_string = $bg_class = $c_class1 = $c_class2 = $css_string2 = $line_class = $line_class2 = ''; if(!empty($value_color)) $css_string .= 'color:'.$value_color.';'; if(!empty($bg_color)) $bg_class = SV_Assets::build_css('background:'.$bg_color.';'); if(!empty($value_size)) $css_string .= 'font-size:'.$value_size.'px !important;'; if(!empty($css_string)) $el_class = SV_Assets::build_css($css_string); if(!empty($color1)) $c_class1 = SV_Assets::build_css('background-color: '.$color1.';fill: '.$color1.';'); if(!empty($color2)) $c_class2 = SV_Assets::build_css('background-color: '.$color2.';fill: '.$color2.';'); if(!empty($height)) $css_string2 .= 'height:'.$height.'px;'; $css_string2 .= 'border-radius:'.$border_radius.'px;'; if(!empty($color1)) $css_string2 .= 'background:'.$color1.' !important;'; if(!empty($css_string2)) $line_class = SV_Assets::build_css($css_string2); if(!empty($color2)) $line_class2 = SV_Assets::build_css('background:'.$color2.' !important;'); $num = uniqid(); switch ($style) { case 'line-process': $html .= '
'; break; case 'pie-chart': $value2 = 100 - (int)$value; $html .= '
'; break; default: $html .= '
'; break; } return $html; } } stp_reg_shortcode('sv_process_bar','sv_vc_process_bar'); vc_map( array( "name" => esc_html__("SV Process Bar", 'bigc'), "base" => "sv_process_bar", "icon" => "icon-st", "category" => '7Up-theme', "params" => array( array( "type" => "dropdown", "holder" => "div", "heading" => esc_html__("Style",'bigc'), "param_name" => "style", "value" => array( esc_html__("Circle",'bigc') => 'circle-process', esc_html__("Pie Chart",'bigc') => 'pie-chart', esc_html__("Line",'bigc') => 'line-process', ) ), array( "type" => "textfield", "holder" => "div", "heading" => esc_html__("Value",'bigc'), "param_name" => "value", 'description' => esc_html__( 'Enter number 1~100. Default is 100', 'bigc' ), ), array( "type" => "textfield", "heading" => esc_html__("Radius",'bigc'), "param_name" => "radius", 'description' => esc_html__( 'Enter number. Default is 150', 'bigc' ), ), array( "type" => "textfield", "heading" => esc_html__("Width",'bigc'), "param_name" => "width", 'description' => esc_html__( 'Enter number. Default is 3', 'bigc' ), ), array( "type" => "colorpicker", "heading" => esc_html__("Color 1",'bigc'), "param_name" => "color1", 'description' => esc_html__( 'Default is #e5e5e5', 'bigc' ), ), array( "type" => "colorpicker", "heading" => esc_html__("Color 2",'bigc'), "param_name" => "color2", 'description' => esc_html__( 'Default is #ffd21e', 'bigc' ), ), array( "type" => "colorpicker", "heading" => esc_html__("Value Color",'bigc'), "param_name" => "value_color", ), array( "type" => "textfield", "heading" => esc_html__("Value Size",'bigc'), "param_name" => "value_size", 'description' => esc_html__( 'Default is 30. Unit(px)', 'bigc' ), ), array( "type" => "textfield", "heading" => esc_html__("Height",'bigc'), "param_name" => "height", 'description' => esc_html__( 'Default is 5. Unit(px)', 'bigc' ), ), array( "type" => "textfield", "heading" => esc_html__("Border Radius",'bigc'), "param_name" => "height", 'description' => esc_html__( 'Default is 0. Unit(px)', 'bigc' ), ), array( "type" => "dropdown", "heading" => esc_html__("Align",'bigc'), "param_name" => "align", "value" => array( esc_html__("Default",'bigc') => '', esc_html__("Pull left",'bigc') => 'pull-left', esc_html__("Pull right",'bigc') => 'pull-right', ) ), array( "type" => "colorpicker", "heading" => esc_html__("Background Color",'bigc'), "param_name" => "bg_color", ), ) ));