Submit
Path:
~
/
home
/
getwphos
/
www
/
twinkletown
/
wp-content
/
plugins
/
wuko-core
/
includes
/
elementor
/
widgets
/
File Content:
wgl-countdown.php
<?php /** * This template can be overridden by copying it to `yourtheme[-child]/wgl-extensions/elementor/widgets/wgl-countdown.php`. */ namespace WGL_Extensions\Widgets; defined('ABSPATH') || exit; // Abort, if called directly. use Elementor\{ Widget_Base, Controls_Manager, Group_Control_Typography }; use WGL_Extensions\{ WGL_Framework_Global_Variables as WGL_Globals, Templates\WGLCountDown }; class WGL_CountDown extends Widget_Base { public function get_name() { return 'wgl-countdown'; } public function get_title() { return esc_html__('WGL Countdown Timer', 'wuko-core'); } public function get_icon() { return 'wgl-countdown'; } public function get_keywords() { return [ 'countdown', 'timer', 'date', 'coming', 'soon' ]; } public function get_categories() { return ['wgl-modules']; } public function get_script_depends() { return [ 'jquery-countdown', 'wgl-widgets', ]; } protected function register_controls() { /*-----------------------------------------------------------------------------------*/ /* CONTENT -> GENERAL /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'section_content_general', ['label' => esc_html__('General', 'wuko-core')] ); $this->add_control( 'h_tip', [ 'label' => esc_html__('Choose the specific date:', 'wuko-core'), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'countdown_year', [ 'label' => esc_html__('Year', 'wuko-core'), 'type' => Controls_Manager::TEXT, 'dynamic' => ['active' => true], 'placeholder' => esc_html__('Example: 2026', 'wuko-core'), 'default' => esc_html__('2026', 'wuko-core'), ] ); $this->add_control( 'countdown_month', [ 'label' => esc_html__('Month', 'wuko-core'), 'type' => Controls_Manager::TEXT, 'dynamic' => ['active' => true], 'placeholder' => esc_html__('Example: 12', 'wuko-core'), 'default' => esc_html__('12', 'wuko-core'), ] ); $this->add_control( 'countdown_day', [ 'label' => esc_html__('Day', 'wuko-core'), 'type' => Controls_Manager::TEXT, 'dynamic' => ['active' => true], 'placeholder' => esc_html__('Example: 31', 'wuko-core'), 'default' => esc_html__('31', 'wuko-core'), ] ); $this->add_control( 'countdown_hours', [ 'label' => esc_html__('Hours', 'wuko-core'), 'type' => Controls_Manager::TEXT, 'dynamic' => ['active' => true], 'placeholder' => esc_html__('Example: 24', 'wuko-core'), 'default' => esc_html__('24', 'wuko-core'), ] ); $this->add_control( 'countdown_min', [ 'label' => esc_html__('Minutes', 'wuko-core'), 'type' => Controls_Manager::TEXT, 'dynamic' => ['active' => true], 'placeholder' => esc_html__('Example: 59', 'wuko-core'), 'default' => esc_html__('0', 'wuko-core'), ] ); $this->add_responsive_control( 'alignment', [ 'label' => esc_html__('Alignment', 'wuko-core'), 'type' => Controls_Manager::CHOOSE, 'separator' => 'before', 'options' => [ 'left' => [ 'title' => esc_html__('Left', 'wuko-core'), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__('Center', 'wuko-core'), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__('Right', 'wuko-core'), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => esc_html__('Full Width', 'wuko-core'), 'icon' => 'eicon-text-align-justify', ], ], 'description' => esc_html__('Too large a font size can affect alignment', 'wuko-core'), 'default' => 'center', 'prefix_class' => 'a%s', ] ); $this->add_control( 'demo', [ 'label' => esc_html__('Demo Mode', 'wuko-core'), 'description' => esc_html__('XX Days Left Until the New Year', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__('Yes', 'wuko-core'), 'label_off' => esc_html__('No', 'wuko-core'), 'render_type' => 'template', ] ); $this->end_controls_section(); /*-----------------------------------------------------------------------------------*/ /* CONTENT -> CONTENT /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'section_content_content', [ 'label' => esc_html__('Content', 'wuko-core') ] ); $this->add_control( 'show_value_names', [ 'label' => esc_html__('Show Title?', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, 'prefix_class' => 'show_title_', 'default' => 'yes', ] ); $this->add_control( 'show_separating', [ 'label' => esc_html__('Show Separating Dots?', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'frontend_available' => true, 'selectors' => [ '{{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount::before, {{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount::after' => 'visibility: visible;' ] ] ); $this->add_control( 'hide_day', [ 'label' => esc_html__('Hide Days?', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, ] ); $this->add_control( 'hide_hours', [ 'label' => esc_html__('Hide Hours?', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, ] ); $this->add_control( 'hide_minutes', [ 'label' => esc_html__('Hide Minutes?', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, ] ); $this->add_control( 'hide_seconds', [ 'label' => esc_html__('Hide Seconds?', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, ] ); $this->end_controls_section(); /*-----------------------------------------------------------------------------------*/ /* STYLE -> SECTION /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'countdown_style_section', [ 'label' => esc_html__('Section', 'wuko-core'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'countdown_section_padding', [ 'label' => esc_html__('Padding', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', 'vw', 'custom' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ], 'em' => [ 'min' => 0, 'max' => 2 ], ], 'default' => [ 'top' => '0', 'right' => '0.8', 'bottom' => '0', 'left' => '0.8', 'unit' => 'em', 'isLinked' => false ], 'tablet_default' => [ 'top' => '0', 'right' => '0.4', 'bottom' => '0', 'left' => '0.4', 'unit' => 'em', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-section' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'general_font_size', [ 'label' => esc_html__('Font Size', 'wuko-core'), 'type' => Controls_Manager::SLIDER, 'dynamic' => ['active' => true], 'range' => [ 'px' => [ 'min' => 12, 'max' => 200, ], 'vw' => [ 'min' => 1, 'max' => 20, ], ], 'size_units' => ['px', 'vw', 'custom'], 'default' => [ 'size' => 80, 'unit' => 'px', ], 'tablet_extra_default' => [ 'size' => 70, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 60, 'unit' => 'px', ], 'mobile_extra_default' => [ 'size' => 8, 'unit' => 'vw', ], 'mobile_default' => [ 'size' => 8, 'unit' => 'vw', ], 'selectors' => [ '{{WRAPPER}} .wgl-countdown' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); /*-----------------------------------------------------------------------------------*/ /* STYLE -> NUMBERS /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'countdown_style_numbers', [ 'label' => esc_html__('Numbers', 'wuko-core'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'label' => esc_html__('Typography', 'wuko-core'), 'name' => 'custom_fonts_number', 'selector' => '{{WRAPPER}} .wgl-countdown .countdown-amount', ] ); $this->add_control( 'numbers_font', [ 'label' => esc_html__('Theme Font Family', 'wuko-core'), 'type' => Controls_Manager::SELECT, 'options' => [ '' => esc_html__('Default', 'wuko-core'), 'header' => esc_html__('Headings Font', 'wuko-core'), 'content' => esc_html__('Content Font', 'wuko-core'), 'additional' => esc_html__('Additional Font', 'wuko-core'), ], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-amount' => 'font-family: var(--wuko-{{VALUE}}-font-family);', ], ] ); $this->add_control( 'number_color_idle', [ 'label' => esc_html__('Text Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-amount' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'number_bg_idle', [ 'label' => esc_html__('Background Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-amount' => 'background-color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'number_width', [ 'label' => esc_html__('Min Width(em)', 'wuko-core'), 'type' => Controls_Manager::SLIDER, 'dynamic' => ['active' => true], 'range' => [ 'px' => [ 'min' => 20, 'max' => 400, ], 'em' => [ 'min' => 0.8, 'max' => 3, 'step' => 0.1, ], ], 'default' => [ 'size' => 1.25, 'unit' => 'em', ], 'tablet_default' => [ 'size' => 1.6, 'unit' => 'em', ], 'mobile_default' => [ 'size' => 2.2, 'unit' => 'em', ], 'condition' => ['alignment!' => 'justify'], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-amount' => 'min-width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'number_padding', [ 'label' => esc_html__('Padding', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'separator' => 'before', 'size_units' => ['px', 'em'], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-amount' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /*-----------------------------------------------------------------------------------*/ /* STYLE -> TITLES /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'section_style_titles', [ 'label' => esc_html__('Titles', 'wuko-core'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'label' => esc_html__('Typography', 'wuko-core'), 'name' => 'custom_fonts_titles', 'selector' => '{{WRAPPER}} .wgl-countdown .countdown-period', ] ); $this->add_control( 'titles_font', [ 'label' => esc_html__('Theme Font Family', 'wuko-core'), 'type' => Controls_Manager::SELECT, 'options' => [ '' => esc_html__('Default', 'wuko-core'), 'header' => esc_html__('Headings Font', 'wuko-core'), 'content' => esc_html__('Content Font', 'wuko-core'), 'additional' => esc_html__('Additional Font', 'wuko-core'), ], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-period' => 'font-family: var(--wuko-{{VALUE}}-font-family);', ], ] ); $this->add_responsive_control( 'titles_alignment', [ 'label' => esc_html__('Alignment', 'wuko-core'), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__('Left', 'wuko-core'), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__('Center', 'wuko-core'), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__('Right', 'wuko-core'), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'left', 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-period' => 'text-align: {{VALUE}};', ], ] ); $this->add_responsive_control( 'titles_margin', [ 'label' => esc_html__('Margin', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'custom'], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-period' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'titles_padding', [ 'label' => esc_html__('Padding', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'custom'], 'default' => [ 'top' => '16', 'right' => '0', 'bottom' => '0', 'left' => '7', 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-period' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'titles_color_idle', [ 'label' => esc_html__('Text Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'selectors' => [ '{{WRAPPER}} .wgl-countdown .countdown-period' => 'color: {{VALUE}};', ], ] ); $this->end_controls_section(); /*-----------------------------------------------------------------------------------*/ /* STYLE -> DOTS /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'section_style_dots', [ 'label' => esc_html__('Dots', 'wuko-core'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => ['show_separating!' => ''], ] ); $this->add_control( 'dots_color_idle', [ 'label' => esc_html__('Dots Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'selectors' => [ '{{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount::before, {{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount::after' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'dots_shape', [ 'label' => esc_html__('Dots Shape', 'wuko-core'), 'type' => Controls_Manager::SELECT, 'options' => [ 'font' => esc_html__('Current Font', 'wuko-core'), 'circle' => esc_html__('Circle', 'wuko-core'), 'rhombus' => esc_html__('Rhombus', 'wuko-core'), 'square' => esc_html__('Square', 'wuko-core'), ], 'default' => 'circle', 'prefix_class' => 'dots_style-', ] ); $this->add_responsive_control( 'dots_size', [ 'label' => esc_html__('Dots Size', 'wuko-core'), 'type' => Controls_Manager::SLIDER, 'dynamic' => ['active' => true], 'size_units' => [ 'px', 'custom' ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 30 ], ], 'condition' => ['dots_shape!' => ['font', 'rectangle']], 'default' => [ 'size' => 10, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 8, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 3, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount' => '--dots-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'dots_interval', [ 'label' => esc_html__('Dots Interval', 'wuko-core'), 'type' => Controls_Manager::SLIDER, 'dynamic' => ['active' => true], 'size_units' => [ 'px', 'em' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ], 'em' => [ 'min' => 0, 'max' => 1, 'step' => 0.01 ], ], 'condition' => ['dots_shape!' => 'font'], 'default' => [ 'size' => 0.35, 'unit' => 'em', ], 'selectors' => [ '{{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount' => '--dots-interval: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'dots_v_position', [ 'label' => esc_html__('Dots Vertical Position', 'wuko-core'), 'type' => Controls_Manager::SLIDER, 'dynamic' => ['active' => true], 'size_units' => [ 'px', 'em', '%', 'custom' ], 'range' => [ '%' => [ 'min' => 0, 'max' => 100 ], 'px' => [ 'min' => 0, 'max' => 100 ], 'em' => [ 'min' => 0, 'max' => 1, 'step' => 0.01 ], ], 'condition' => ['dots_shape!' => 'font'], 'default' => [ 'size' => 0.3, 'unit' => 'em', ], 'selectors' => [ '{{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount' => '--dots-v-pos: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'dots_h_position', [ 'label' => esc_html__('Dots Horizontal Position', 'wuko-core'), 'type' => Controls_Manager::SLIDER, 'dynamic' => ['active' => true], 'range' => [ '%' => [ 'min' => -100, 'max' => 100 ], 'px' => [ 'min' => -100, 'max' => 100 ], ], 'condition' => ['dots_shape!' => 'font'], 'selectors' => [ '{{WRAPPER}} .countdown-section:not(:last-child) .countdown-amount' => '--dots-h-pos: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); } protected function render() { $atts = $this->get_settings_for_display(); $countdown = new WGLCountDown(); $countdown->render($this, $atts); } public function wpml_support_module() { add_filter( 'wpml_elementor_widgets_to_translate', [$this, 'wpml_widgets_to_translate_filter']); } public function wpml_widgets_to_translate_filter( $widgets ){ return \WGL_Extensions\Includes\WGL_WPML_Settings::get_translate( $this, $widgets ); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
wgl-accordion-service.php
110791 bytes
0644
wgl-background-clip-text.php
21249 bytes
0644
wgl-blog.php
54012 bytes
0644
wgl-button-physics.php
48634 bytes
0644
wgl-button-widget.php
78290 bytes
0644
wgl-carousel.php
5648 bytes
0644
wgl-cases.php
174614 bytes
0644
wgl-circuit-service.php
21621 bytes
0644
wgl-clients.php
28542 bytes
0644
wgl-combo-menu.php
17440 bytes
0644
wgl-contact-form-7.php
64476 bytes
0644
wgl-countdown.php
19442 bytes
0644
wgl-counter.php
36515 bytes
0644
wgl-demo-item.php
33716 bytes
0644
wgl-double-heading.php
71788 bytes
0644
wgl-dynamic-title.php
11086 bytes
0644
wgl-flipbox.php
154999 bytes
0644
wgl-gallery.php
53821 bytes
0644
wgl-highlight-board.php
64418 bytes
0644
wgl-horizontal-scroll.php
25075 bytes
0644
wgl-image-animate.php
20947 bytes
0644
wgl-image-comparison.php
6032 bytes
0644
wgl-image-hotspots.php
52892 bytes
0644
wgl-image-layers.php
25243 bytes
0644
wgl-infinity-carousel.php
30821 bytes
0644
wgl-info-box.php
224793 bytes
0644
wgl-instagram.php
38631 bytes
0644
wgl-link-overlay.php
2495 bytes
0644
wgl-pie-chart.php
22332 bytes
0644
wgl-portfolio.php
115147 bytes
0644
wgl-pricing-table.php
209138 bytes
0644
wgl-products-categories.php
51718 bytes
0644
wgl-products-grid.php
79654 bytes
0644
wgl-progress-bar.php
30822 bytes
0644
wgl-rotated-text.php
22605 bytes
0644
wgl-satellite-service.php
35978 bytes
0644
wgl-showcase.php
208669 bytes
0644
wgl-social-icons.php
22240 bytes
0644
wgl-steps.php
48391 bytes
0644
wgl-striped-services.php
183259 bytes
0644
wgl-tabs-horizontal.php
42144 bytes
0644
wgl-tabs.php
53431 bytes
0644
wgl-team.php
36456 bytes
0644
wgl-template.php
8246 bytes
0644
wgl-testimonials.php
61375 bytes
0644
wgl-text-editor.php
55551 bytes
0644
wgl-text-path.php
41438 bytes
0644
wgl-time-line-horizontal.php
37694 bytes
0644
wgl-time-line-vertical.php
199396 bytes
0644
wgl-toggle-accordion.php
66819 bytes
0644
wgl-video-popup.php
30956 bytes
0644
wgl-working-hours.php
10870 bytes
0644
wgl-zoom.php
24854 bytes
0644
N4ST4R_ID | Naxtarrr