OwlCyberSecurity - MANAGER
Edit File: stats-counter.php
<?php /** * Stats Counter */ add_shortcode( 'pearl_stats_counter', 'pearl_stats_counter' ); function pearl_stats_counter( $atts ) { extract( shortcode_atts( array( 'first_count_title' => '', 'first_count_num' => '', 'second_count_title' => '', 'second_count_num' => '', 'third_count_title' => '', 'third_count_num' => '', 'fourth_count_title' => '', 'fourth_count_num' => '', 'fifth_count_title' => '', 'fifth_count_num' => '', 'style' => 'simple' ), $atts ) ); ob_start(); if ( $style == 'simple' ) { ?> <div class="fun-facts counter-iconic" id="counters"> <div class="row"> <?php if ( ! empty( $first_count_title ) && ! empty( $first_count_num ) ) { ?> <div class="col-md-3"> <div class="counter"> <span class="number quantity-counter1 quantity-counter highlight"><?php echo $first_count_num; ?></span> <span class="what-do"><?php echo $first_count_title; ?></span> </div> </div> <?Php } if ( ! empty( $second_count_title ) && ! empty( $second_count_num ) ) { ?> <div class="col-md-3"> <div class="counter"> <span class="number quantity-counter2 quantity-counter highlight"><?php echo $second_count_num; ?></span> <span class="what-do"><?php echo $second_count_title; ?></span> </div> </div> <?Php } if ( ! empty( $third_count_title ) && ! empty( $third_count_num ) ) { ?> <div class="col-md-3"> <div class="counter"> <span class="number quantity-counter3 quantity-counter highlight"><?php echo $third_count_num; ?></span> <span class="what-do"><?php echo $third_count_title; ?></span> </div> </div> <?Php } if ( ! empty( $fourth_count_title ) && ! empty( $fourth_count_num ) ) { ?> <div class="col-md-3"> <div class="counter"> <span class="number quantity-counter4 quantity-counter highlight"><?php echo $fourth_count_num; ?></span> <span class="what-do"><?php echo $fourth_count_title; ?></span> </div> </div> <?Php } ?> </div> </div> <?php } else { ?> <div id="pie-charts" class="container"> <div class="text-center"> <?php if ( ! empty( $first_count_title ) && ! empty( $first_count_num ) ) { ?> <span class="chart first" data-percent="<?php echo $first_count_num; ?>"> <span class="percent"><?php echo $first_count_num; ?></span> <span class="year"><?php echo $first_count_title; ?></span> <canvas height="181" width="181"></canvas></span> <?Php } if ( ! empty( $second_count_title ) && ! empty( $second_count_num ) ) { ?> <span class="chart" data-percent="<?php echo $second_count_num; ?>"> <span class="percent"><?php echo $second_count_num; ?></span> <span class="year"><?php echo $second_count_title; ?></span> <canvas height="181" width="181"></canvas></span> <?Php } if ( ! empty( $third_count_title ) && ! empty( $third_count_num ) ) { ?> <span class="chart" data-percent="<?php echo $third_count_num; ?>"> <span class="percent"><?php echo $third_count_num; ?></span> <span class="year"><?php echo $third_count_title; ?></span> <canvas height="181" width="181"></canvas></span> <?Php } if ( ! empty( $fourth_count_title ) && ! empty( $fourth_count_num ) ) { ?> <span class="chart" data-percent="<?php echo $fourth_count_num; ?>"> <span class="percent"><?php echo $fourth_count_num; ?></span> <span class="year"><?php echo $fourth_count_title; ?></span> <canvas height="181" width="181"></canvas></span> <?Php } if ( ! empty( $fifth_count_title ) && ! empty( $fifth_count_num ) ) { ?> <span class="chart" data-percent="<?php echo $fifth_count_num; ?>"> <span class="percent"><?php echo $fifth_count_num; ?></span> <span class="year"><?php echo $fifth_count_title; ?></span> <canvas height="181" width="181"></canvas></span> <?Php } ?> </div> </div> <?php } return ob_get_clean(); } /** * Stats Counter */ vc_map( array( "name" => esc_html__( "Pearl Stats Counter", 'pearl-medical-framework' ), "base" => "pearl_stats_counter", "class" => "", "category" => esc_html__( "MedicalGuide Theme", 'pearl-medical-framework' ), 'admin_enqueue_css' => array( get_template_directory_uri() . '/css/piechart-style.css' ), "params" => array( array( "type" => "dropdown", "class" => "", "heading" => esc_html__( "Style", 'pearl-medical-framework' ), "param_name" => "style", "value" => array( 'Simple' => 'simple', 'Circle' => 'circle' ), "admin_label" => true ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "First Counter Title", 'pearl-medical-framework' ), "param_name" => "first_count_title", "value" => "", "admin_label" => true, "group" => 'First' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "First Counter Numbers", 'pearl-medical-framework' ), "param_name" => "first_count_num", "value" => "", "group" => 'First' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Second Counter Title", 'pearl-medical-framework' ), "param_name" => "second_count_title", "value" => "", "admin_label" => true, "group" => 'Second' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Second Counter Numbers", 'pearl-medical-framework' ), "param_name" => "second_count_num", "value" => "", "group" => 'Second' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Third Counter Title", 'pearl-medical-framework' ), "param_name" => "third_count_title", "value" => "", "admin_label" => true, "group" => 'Third' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Third Counter Numbers", 'pearl-medical-framework' ), "param_name" => "third_count_num", "value" => "", "group" => 'Third' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Fourth Counter Title", 'pearl-medical-framework' ), "param_name" => "fourth_count_title", "value" => "", "admin_label" => true, "group" => 'Fourth' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Fourth Counter Numbers", 'pearl-medical-framework' ), "param_name" => "fourth_count_num", "value" => "", "group" => 'Fourth' ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Fifth Counter Title", 'pearl-medical-framework' ), "param_name" => "fifth_count_title", "value" => "", "admin_label" => true, "group" => 'Fifth', "dependency" => array( 'element' => 'style', 'value' => array( 'circle' ) ) ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Fifth Counter Numbers", 'pearl-medical-framework' ), "param_name" => "fifth_count_num", "value" => "", "group" => 'Fifth', "dependency" => array( 'element' => 'style', 'value' => array( 'circle' ) ) ), ) ) );