📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-26 10:29:22
📂
/
/
home
/
pallabnv
/
public_html
/
wp-content__3bb9dea
/
themes
/
berich
/
elements
/
widgets
✏️
Editing: pxl_counter.php
<?php //Register Counter Widget pxl_add_custom_widget( array( 'name' => 'pxl_counter', 'title' => esc_html__('Case Counter', 'berich'), 'icon' => 'eicon-counter-circle', 'categories' => array('pxltheme-core'), 'scripts' => array( 'elementor-waypoints', 'jquery-numerator', 'pxl-counter', 'pxl-counter-slide', 'berich-counter', ), 'params' => array( 'sections' => array( array( 'name' => 'section_layout', 'label' => esc_html__('Layout', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_LAYOUT, 'controls' => array( array( 'name' => 'layout', 'label' => esc_html__('Templates', 'berich' ), 'type' => 'layoutcontrol', 'default' => '1', 'options' => [ '1' => [ 'label' => esc_html__('Layout 1', 'berich' ), 'image' => get_template_directory_uri() . '/elements/widgets/img-layout/pxl_counter/layout1.jpg' ], '2' => [ 'label' => esc_html__('Layout 2', 'berich' ), 'image' => get_template_directory_uri() . '/elements/widgets/img-layout/pxl_counter/layout2.jpg' ], ], ), ), ), array( 'name' => 'section_content', 'label' => esc_html__('Content', 'berich'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 'controls' => array( array( 'name' => 'title', 'label' => esc_html__('Title', 'berich'), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, ), array( 'name' => 'sub_title', 'label' => esc_html__('Sub Title', 'berich'), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'description' => 'Only applies to layout 2.' ), array( 'name' => 'starting_number', 'label' => esc_html__('Starting Number', 'berich'), 'type' => \Elementor\Controls_Manager::NUMBER, 'default' => 1, ), array( 'name' => 'ending_number', 'label' => esc_html__('Ending Number', 'berich'), 'type' => \Elementor\Controls_Manager::NUMBER, 'default' => 100, ), array( 'name' => 'prefix', 'label' => esc_html__('Number Prefix', 'berich'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => '', ), array( 'name' => 'suffix', 'label' => esc_html__('Number Suffix', 'berich'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => '', ), array( 'name' => 'thousand_separator_char', 'label' => esc_html__('Number Separator', 'berich'), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ '' => 'Default', '.' => 'Dot', ',' => 'Comma', ' ' => 'Space', ], 'default' => '', ), array( 'name' => 'icon_type', 'label' => esc_html__('Icon Type', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'icon' => 'Icon', 'image' => 'Image', ], 'default' => 'icon', ), array( 'name' => 'pxl_icon', 'label' => esc_html__('Icon', 'berich' ), 'type' => \Elementor\Controls_Manager::ICONS, 'fa4compatibility' => 'icon', 'condition' => [ 'icon_type' => 'icon', ], ), array( 'name' => 'icon_image', 'label' => esc_html__( 'Icon Image', 'berich' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'description' => esc_html__('Select image icon.', 'berich'), 'condition' => [ 'icon_type' => 'image', ], ), array( 'name' => 'align', 'label' => esc_html__( 'Alignment', 'berich' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'control_type' => 'responsive', 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'berich' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'berich' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'berich' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => esc_html__( 'Justified', 'berich' ), 'icon' => 'eicon-text-align-justify', ], ], 'selectors' => [ '{{WRAPPER}} .pxl-counter1 .pxl-counter--inner' => 'text-align: {{VALUE}};', ], 'condition' => [ 'layout' => ['1'], ], ), ), ), array( 'name' => 'section_style_general', 'label' => esc_html__('General', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array( array( 'name' => 'effect', 'label' => esc_html__('Effect', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'effect-default' => 'Default', 'effect-slide' => 'Slide', ], 'default' => 'effect-default', ), array( 'name' => 'style_l1', 'label' => esc_html__('Style', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'style-1' => 'Style 1', 'style-2' => 'Style 2', 'style-3' => 'Style 3', ], 'default' => 'style-1', 'condition' => [ 'layout' => '1', ], ), ), ), array( 'name' => 'section_style_title', 'label' => esc_html__('Title', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array( array( 'name' => 'title_color', 'label' => esc_html__('Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--title' => 'color: {{VALUE}};', ], ), array( 'name' => 'title_typography', 'type' => \Elementor\Group_Control_Typography::get_type(), 'control_type' => 'group', 'selector' => '{{WRAPPER}} .pxl-counter .pxl-counter--title', ), array( 'name' => 't_width', 'label' => esc_html__('Max Width', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 3000, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--title' => 'max-width: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'layout' => ['1'], ], ), ), ), array( 'name' => 'section_style_icon', 'label' => esc_html__('Icon', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array( array( 'name' => 'icon_color', 'label' => esc_html__('Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--icon i' => 'color: {{VALUE}};text-fill-color: {{VALUE}};-webkit-text-fill-color: {{VALUE}};background-image: none;', ], ), array( 'name' => 'icon_font_size', 'label' => esc_html__('Icon Font Size', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--icon i' => 'font-size: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'icon_type' => 'icon', ], ), array( 'name' => 'icon_space_top', 'label' => esc_html__('Top Spacer', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--icon' => 'padding-top: {{SIZE}}{{UNIT}};', ], ), array( 'name' => 'icon_space_bottom', 'label' => esc_html__('Bottom Spacer', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--icon' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], 'separator' => 'after', ), ), ), array( 'name' => 'section_number', 'label' => esc_html__('Number', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array( array( 'name' => 'number_color', 'label' => esc_html__('Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--number' => 'color: {{VALUE}};', ], ), array( 'name' => 'color_gradient', 'label' => esc_html__('Color Gradient', 'berich'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'default' => false, 'condition' => [ 'layout' => '1', ], ), array( 'name' => 'color_gradient_from', 'label' => esc_html__( 'Gradient - Color From', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--number' => '--gradient-color-from: {{VALUE}};', ], 'condition' => [ 'color_gradient' => 'true', ], ), array( 'name' => 'color_gradient_to', 'label' => esc_html__( 'Gradient - Color To', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--number' => '--gradient-color-to: {{VALUE}};', ], 'condition' => [ 'color_gradient' => 'true', ], ), array( 'name' => 'number_typography', 'type' => \Elementor\Group_Control_Typography::get_type(), 'control_type' => 'group', 'selector' => '{{WRAPPER}} .pxl-counter .pxl-counter--number', ), array( 'name' => 'prefix_suffix_color', 'label' => esc_html__('Prefix/Suffix Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--number .pxl-counter--suffix, {{WRAPPER}} .pxl-counter .pxl-counter--number .pxl-counter--prefix' => 'color: {{VALUE}};', ], 'condition' => [ 'number_color_type' => ['color'], ], ), array( 'name' => 'duration', 'label' => esc_html__('Animation Duration', 'berich'), 'type' => \Elementor\Controls_Manager::NUMBER, 'default' => 2000, 'min' => 100, 'step' => 100, ), array( 'name' => 'number_space_top', 'label' => esc_html__('Top Spacer', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--number' => 'margin-top: {{SIZE}}{{UNIT}};', ], ), array( 'name' => 'number_space_bottom', 'label' => esc_html__('Bottom Spacer', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-counter .pxl-counter--number' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ), ), ), berich_widget_animation_settings(), ), ), ), berich_get_class_widget_path() );
💾 Save Changes
❌ Cancel