Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
public_html
/
wp-content
/
plugins
/
profundcore
/
addons
/
widgets
/
Editing: counter.php
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Elementor counter widget. * * Elementor widget that displays stats and numbers in an escalating manner. * * @since 1.0.0 */ class profund_Counter_Widget extends Widget_Base { /** * Get widget name. * * Retrieve counter widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'counter'; } /** * Get widget title. * * Retrieve counter widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return __( 'Counter', 'profundcore' ); } /** * Get widget icon. * * Retrieve counter widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-counter'; } /** * Retrieve the list of scripts the counter widget depended on. * * Used to set scripts dependencies required to run the widget. * * @since 1.3.0 * @access public * * @return array Widget scripts dependencies. */ public function get_script_depends() { return [ 'jquery-numerator' ]; } /** * Get widget keywords. * * Retrieve the list of keywords the widget belongs to. * * @since 2.1.0 * @access public * * @return array Widget keywords. */ public function get_keywords() { return [ 'counter' ]; } /** * Register counter widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * @access protected */ protected function register_controls() { $this->start_controls_section( 'section_counter', [ 'label' => __( 'Counter', 'profundcore' ), ] ); $this->add_control( 'counter_icon_type', [ 'label' => __('Icon Type','profundcore'), 'type' =>Controls_Manager::CHOOSE, 'options' =>[ 'icon' =>[ 'title' =>__('Icon','profundcore'), 'icon' =>'fa fa-info', ], 'img' =>[ 'title' =>__('Image','profundcore'), 'icon' =>'fa fa-picture-o', ] ], 'default' => 'icon', ] ); $this->add_control( 'icon_image', [ 'label' => __('Image Icon','profundcore'), 'type'=>Controls_Manager::MEDIA, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], 'condition' => [ 'counter_icon_type' => 'img', ] ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'icon_imagesize', 'default' => 'large', 'separator' => 'none', 'condition' => [ 'counter_icon_type' => 'img', ] ] ); $this->add_control( 'icon_font', [ 'label' =>esc_html__('Icon','profundcore'), 'type'=>Controls_Manager::ICON, 'default' => 'fa fa-cogs', 'condition' => [ 'counter_icon_type' => 'icon', ] ] ); $this->add_control( 'starting_number', [ 'label' => __( 'Starting Number', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, ] ); $this->add_control( 'ending_number', [ 'label' => __( 'Ending Number', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'default' => 100, ] ); $this->add_control( 'prefix', [ 'label' => __( 'Number Prefix', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'default' => '', 'placeholder' => 1, ] ); $this->add_control( 'suffix', [ 'label' => __( 'Number Suffix', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'default' => '', 'placeholder' => __( 'Plus', 'profundcore' ), ] ); $this->add_control( 'duration', [ 'label' => __( 'Animation Duration', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'default' => 2000, 'min' => 100, 'step' => 100, ] ); $this->add_control( 'thousand_separator', [ 'label' => __( 'Thousand Separator', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'label_on' => __( 'Show', 'profundcore' ), 'label_off' => __( 'Hide', 'profundcore' ), ] ); $this->add_control( 'thousand_separator_char', [ 'label' => __( 'Separator', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'condition' => [ 'thousand_separator' => 'yes', ], 'options' => [ '' => 'Default', '.' => 'Dot', ' ' => 'Space', ], ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => __( 'Cool Number', 'profundcore' ), 'placeholder' => __( 'Cool Number', 'profundcore' ), ] ); $this->add_control( 'view', [ 'label' => __( 'View', 'profundcore' ), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional', ] ); $this->end_controls_section(); // Counter Style tab section $this->start_controls_section( 'counter_box_style_section', [ 'label' => __( 'Box Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->start_controls_tabs('counter_box_style_tab'); $this->start_controls_tab( 'counter_box_normal', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_responsive_control( 'counter_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-counter' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'counter_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '30', 'right' => '30', 'bottom' => '30', 'left' => '30', 'isLinked' => false ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-counter' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'counter_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profund-counter', ] ); $this->add_responsive_control( 'counter_text_align', [ 'label' => __( 'Alignment', 'profundcore' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'profundcore' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'profundcore' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'profundcore' ), 'icon' => 'fa fa-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'profundcore' ), 'icon' => 'fa fa-align-justify', ], ], 'selectors' => [ '{{WRAPPER}} .profund-counter' => 'text-align: {{VALUE}};', ], 'default' => 'left', 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'counter_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-counter', ] ); $this->add_responsive_control( 'counter_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profund-counter' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], 'default' => [ 'top' => '5', 'right' => '5', 'bottom' => '5', 'left' => '5', 'isLinked' => false ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'counter_box_shadow', 'label' => __( 'Box Shadow', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-counter', ] ); $this->add_control( 'counter_box_transform', [ 'label' => __( 'Transform', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'default' => 'translateY(0)', 'selectors' => [ '{{WRAPPER}} .profund-counter' => 'transform: {{VALUE}}', ], ] ); $this->add_control( 'counter_box_transition', [ 'label' => __( 'Transition Duration', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0.3, ], 'range' => [ 'px' => [ 'max' => 3, 'step' => 0.1, ], ], 'selectors' => [ '{{WRAPPER}} .profund-counter' => 'transition-duration: {{SIZE}}s', ], ] ); $this->end_controls_tab(); // Hover Style tab Start $this->start_controls_tab( 'counter_box_hover', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'counter_hover_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profund-counter:hover', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'counter_border_hover', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-counter:hover', ] ); $this->add_responsive_control( 'counter_hover_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profund-counter:hover' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], 'default' => [ 'top' => '3', 'right' => '3', 'bottom' => '3', 'left' => '3', 'isLinked' => false ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'counter_box_hover_shadow', 'label' => __( 'Box Shadow', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-counter:hover', ] ); $this->add_control( 'counter_box_hover_transform', [ 'label' => __( 'Transform', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'default' => 'translateY(0)', 'selectors' => [ '{{WRAPPER}} .profund-counter:hover' => 'transform: {{VALUE}}', ], ] ); $this->end_controls_tab(); // Hover Style tab end $this->end_controls_tabs();// Box Style tabs end $this->end_controls_section(); // Counter Box section style end $this->start_controls_section( 'section_number', [ 'label' => __( 'Number', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->start_controls_tabs('counter_number_tabs'); $this->start_controls_tab( 'counter_number_tab', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'number_color', [ 'label' => __( 'Text Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#0a0c19', 'selectors' => [ '{{WRAPPER}} .profund-counter-number-wrapper' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'typography_number', 'selector' => '{{WRAPPER}} .profund-counter-number-wrapper', ] ); $this->add_responsive_control( 'counter_number_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-counter-number-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'counter_number_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-counter-number-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_control( 'counter_number_transition', [ 'label' => __( 'Transition Duration', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0.3, ], 'range' => [ 'px' => [ 'max' => 3, 'step' => 0.1, ], ], 'selectors' => [ '{{WRAPPER}} .profund-counter-number-wrapper' => 'transition-duration: {{SIZE}}s', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'counter_number_tab_hover', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'number_color_hover', [ 'label' => __( 'Text Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}:hover .profund-counter-number-wrapper' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'section_title', [ 'label' => __( 'Title', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->start_controls_tabs('counter_title_tabs'); $this->start_controls_tab( 'counter_title_tab', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'title_color', [ 'label' => __( 'Text Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#0a0c19', 'selectors' => [ '{{WRAPPER}} .profund-counter-title' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typo', 'selector' => '{{WRAPPER}} .profund-counter-title', ] ); $this->add_responsive_control( 'counter_title_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-counter-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'counter_title_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-counter-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_control( 'counter_title_transition', [ 'label' => __( 'Transition Duration', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0.3, ], 'range' => [ 'px' => [ 'max' => 3, 'step' => 0.1, ], ], 'selectors' => [ '{{WRAPPER}} .profund-counter-title' => 'transition-duration: {{SIZE}}s', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'counter_title_tab_hover', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'title_color_hover', [ 'label' => __( 'Text Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}:hover .profund-counter-title' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'section_icon', [ 'label' => __( 'Icon', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->start_controls_tabs( 'counter_icon_tabs' ); $this->start_controls_tab( 'counter_icon_normal', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'icon_color', [ 'label' => __( 'Icon Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#d5d2fe', 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'typography_icon', 'selector' => '{{WRAPPER}} .counter-icon', ] ); $this->add_responsive_control( 'icon_width', [ 'label' => __( 'Icon Width', 'growthcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vw' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vw' ], 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'width: {{SIZE}}{{UNIT}};display: inline-block;', ], ] ); $this->add_responsive_control( 'icon_height', [ 'label' => __( 'Icon Height', 'growthcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vh' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vh' ], 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'height: {{SIZE}}{{UNIT}};line-height: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'icon_normal_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'opacity: {{SIZE}}', ], ] ); $this->add_responsive_control( 'icon_hr_offset', [ 'label' => __( 'Horizontal Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'position:absolute;right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_vr_offset', [ 'label' => __( 'Vertical Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vh' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vh' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'position:absolute;top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_z_index', [ 'label' => __( 'Z Index', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => -100, 'max' => 100, 'step' => 1, 'default' => -1, 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'z-index: {{SIZE}};', ], ] ); $this->add_control( 'counter_icon_transition', [ 'label' => __( 'Transition Duration', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0.3, ], 'range' => [ 'px' => [ 'max' => 3, 'step' => 0.1, ], ], 'selectors' => [ '{{WRAPPER}} .counter-icon' => 'transition-duration: {{SIZE}}s', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'counter_icon_hover', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'icon_hover_color', [ 'label' => __( 'Icon Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}:hover .counter-icon' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'icon_hover_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}}:hover .counter-icon' => 'opacity: {{SIZE}}', ], ] ); $this->add_responsive_control( 'icon_hover_width', [ 'label' => __( 'Icon Width', 'growthcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vw' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vw' ], 'selectors' => [ '{{WRAPPER}}:hover .counter-icon' => 'width: {{SIZE}}{{UNIT}};display: inline-block;', ], ] ); $this->add_responsive_control( 'icon_hover_height', [ 'label' => __( 'Icon Height', 'growthcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vh' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vh' ], 'selectors' => [ '{{WRAPPER}}:hover .counter-icon' => 'height: {{SIZE}}{{UNIT}};line-height: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'icon_hr_hover_offset', [ 'label' => __( 'Horizontal Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}}:hover .counter-icon' => 'position:absolute;right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_vr_hover_offset', [ 'label' => __( 'Vertical Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vh' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vh' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}}:hover .counter-icon' => 'position:absolute;top: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } /** * Render counter widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $this->add_render_attribute( 'counter', [ 'class' => 'elementor-counter-number', 'data-duration' => $settings['duration'], 'data-to-value' => $settings['ending_number'], ] ); $counter_image = Group_Control_Image_Size::get_attachment_image_html( $settings, 'icon_imagesize', 'icon_image' ); if( $settings['counter_icon_type'] == 'icon' and !empty($settings['icon_font']) ){ $counter_icon = '<div class="counter-icon"><i class="'.esc_attr($settings['icon_font']).'"></i></div>'; }elseif( $settings['counter_icon_type'] == 'img' and !empty($counter_image) ){ $counter_icon = '<div class="counter-icon">'.$counter_image.'</div>'; }else{ $counter_icon = ''; } if ( ! empty( $settings['thousand_separator'] ) ) { $delimiter = empty( $settings['thousand_separator_char'] ) ? ',' : $settings['thousand_separator_char']; $this->add_render_attribute( 'counter', 'data-delimiter', $delimiter ); } ?> <div class="profund-counter"> <?php echo wp_kses($counter_icon, wp_kses_allowed_html('post')); ?> <h3 class="profund-counter-number-wrapper"><span class="profund-counter-number-prefix"><?php echo $settings['prefix']; ?></span><span <?php echo $this->get_render_attribute_string( 'counter' ); ?>> <?php echo $settings['starting_number']; ?></span><span class="profund-counter-number-suffix"> <?php echo $settings['suffix']; ?></span></h3> <?php if ( $settings['title'] ) : ?> <div class="profund-counter-title"> <?php echo $settings['title']; ?> </div> <?php endif; ?> </div> <?php } } Plugin::instance()->widgets_manager->register_widget_type( new profund_Counter_Widget );
Save
Cancel