Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
lynchestinegroup.com
/
wp-content
/
plugins
/
koncrete-core_2
/
elementor
/
counter
/
Editing: class.php
<?php /** * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\Koncrete_Core; use Elementor\Controls_Manager; use \Elementor\Utils; use Elementor\Group_Control_Background; use Elementor\Group_Control_Typography; if ( ! defined( 'ABSPATH' ) ) exit; class Counter extends Custom_Widget_Base { public function __construct( $data = array(), $args = null ){ $this->rt_name = esc_html__( 'Counter', 'koncrete-core' ); $this->rt_base = 'rt-counter'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'mode' => 'section_start', 'id' => 'sec_general', 'label' => esc_html__( 'General', 'koncrete-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'theme', 'label' => esc_html__( 'Theme', 'koncrete-core' ), 'options' => array( 'light-theme' => esc_html__( 'Light Background', 'koncrete-core' ), 'dark-theme' => esc_html__( 'Dark Background', 'koncrete-core' ), ), 'default' => 'light-theme', ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'number', 'label' => esc_html__( 'Number', 'koncrete-core' ), 'default' => '480', ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'time', 'description' => 'One Second equal to 1000 millisecond. Here Default 15000 millisecond equal 15 seconds', 'label' => __( 'Total duration in millisecond', 'koncrete-core' ), 'default' => 5000, ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'delay', 'description' => 'The delay in milliseconds per number count up', 'label' => __( 'Delay in millisecond', 'koncrete-core' ), 'default' => 50, ), array( 'type' => Controls_Manager::TEXT, 'id' => 'title', 'label' => esc_html__( 'Title', 'koncrete-core' ), 'default' => "Finished projects", ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'has_right_border', 'label_on' => esc_html__( 'Show', 'koncrete-core' ), 'label_off' => esc_html__( 'Hide', 'koncrete-core' ), 'label' => esc_html__( 'Enable Right border', 'koncrete-core' ), 'default' => "yes", ), array( 'type' => Controls_Manager::ICON, 'id' => 'icon_class', 'label' => esc_html__( 'Icon', 'koncrete-core' ), 'default' => "fa fa-dribbble", ), array( 'mode' => 'section_end', ), // Counting Number Style array( 'mode' => 'section_start', 'id' => 'counting_number_style', 'label' => esc_html__( 'Counting Number Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'counting_number_typo', 'label' => esc_html__( 'Counting Number Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media .rtin-media-body .rtin-title, {{WRAPPER}} noselector, {{WRAPPER}} noselector, {{WRAPPER}} noselector ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'counting_number_color', 'label' => esc_html__( 'Counting Number Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media .rtin-media-body .rtin-title' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'counting_number_content_margin', 'label' => __( 'Counting Number Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media .rtin-media-body .rtin-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), // Title Style array( 'mode' => 'section_start', 'id' => 'title_style', 'label' => esc_html__( 'Title Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => esc_html__( 'Title Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media .rtin-media-body .rtin-subtitle, {{WRAPPER}} noselector, {{WRAPPER}} noselector, {{WRAPPER}} noselector ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'title_color', 'label' => esc_html__( 'Title Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media .rtin-media-body .rtin-subtitle' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'title_content_margin', 'label' => __( 'Title Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media .rtin-media-body .rtin-subtitle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), array( 'mode' => 'section_start', 'id' => 'icon_style', 'label' => esc_html__( 'Icon Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'icon_size', 'label' => __( 'Icon Size', 'koncrete-core' ), 'size_units' => array( 'px', ), 'range' => array( 'px' => array( 'min' => 10, 'max' => 400, ), ), 'selectors' => array( '{{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media i:before' => 'font-size: {{SIZE}}{{UNIT}};', ) ), array( 'type' => Controls_Manager::COLOR, 'id' => 'icon_color', 'label' => esc_html__( 'Icon Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media i:before' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'icon_content_margin', 'label' => __( 'icon Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-progress-1 .rtin-content .rtin-media i' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), ); return $fields; } protected function rt_load_scripts() { wp_enqueue_script('waypoints'); wp_enqueue_script('jquery-counterup'); } protected function render() { $this->rt_load_scripts(); $data = $this->get_settings(); $template = 'view'; return $this->rt_template( $template, $data ); } }
Save
Cancel