芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/premium-addons-for-elementor/widgets/premium-world-clock.php
options = apply_filters( 'pa_clock_options', array( 'skins' => array( 'digital' => array( 'label' => __( 'Digital', 'premium-addons-for-elementor' ), 'options' => array( 'skin-2' => __( 'Layout 1', 'premium-addons-for-elementor' ), 'skin-3' => __( 'Layout 2', 'premium-addons-for-elementor' ), 'skin-4' => __( 'Layout 3 (Pro)', 'premium-addons-for-elementor' ), ), ), 'analog' => array( 'label' => __( 'Analog', 'premium-addons-for-elementor' ), 'options' => array( 'skin-1' => __( 'Style 1', 'premium-addons-for-elementor' ), 'skin-5' => __( 'Style 2', 'premium-addons-for-elementor' ), 'skin-6' => __( 'Style 3 (Pro)', 'premium-addons-for-elementor' ), 'skin-7' => __( 'Style 4 (Pro)', 'premium-addons-for-elementor' ), ), ), ), 'skin_condition' => array( 'skin-4', 'skin-6', 'skin-7' ), ) ); $this->add_clock_controls(); $this->add_additional_option_controls(); $this->add_helpful_info_section(); $this->add_units_style_controls(); $this->add_clock_style_controls(); $this->add_info_style_controls(); $this->add_days_style_controls(); $this->add_clock_num_style_controls(); } /** Content Controls. */ private function add_clock_controls() { $this->start_controls_section( 'premium_world_clock_content', array( 'label' => __( 'Clock', 'premium-addons-for-elementor' ), ) ); $this->add_control( 'tz_type', array( 'label' => __( 'Timezone', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( 'local' => __( 'Current Timezone', 'premium-addons-for-elementor' ), 'custom' => __( 'Custom Timezone', 'premium-addons-for-elementor' ), ), 'default' => 'local', 'render_type' => 'template', ) ); $this->add_control( 'custom_tz', array( 'label' => __( 'Zone Name', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'description' => 'Get your Time Zone from
Time Zones Of The World.
.', 'dynamic' => array( 'active' => true ), 'condition' => array( 'tz_type' => 'custom', ), 'render_type' => 'template', ) ); $papro_activated = apply_filters( 'papro_activated', false ); $this->add_control( 'skin', array( 'label' => __( 'Layout', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'prefix_class' => 'premium-world-clock__', 'render_type' => 'template', 'groups' => $this->options['skins'], 'default' => 'skin-2', ) ); if ( ! $papro_activated ) { $get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'editor-page', 'wp-editor', 'get-pro' ); $this->add_control( 'clock_notice', array( 'type' => Controls_Manager::RAW_HTML, 'raw' => __( 'This option is available in Premium Addons Pro. ', 'premium-addons-for-elementor' ) . '
' . __( 'Upgrade now!', 'premium-addons-for-elementor' ) . '
', 'content_classes' => 'papro-upgrade-notice', 'condition' => array( 'skin' => $this->options['skin_condition'], ), ) ); } $this->add_control( 'clock_hands', array( 'label' => __( 'Clock Hands Style', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'prefix_class' => 'premium-world-clock__', 'options' => array( 'hand-0' => __( 'Style 1', 'premium-addons-for-elementor' ), 'hand-1' => __( 'Style 2', 'premium-addons-for-elementor' ), 'hand-2' => __( 'Style 3', 'premium-addons-for-elementor' ), 'hand-3' => __( 'Style 4', 'premium-addons-for-elementor' ), 'hand-4' => __( 'Style 5', 'premium-addons-for-elementor' ), 'hand-5' => __( 'Style 6', 'premium-addons-for-elementor' ), ), 'default' => 'hand-0', 'condition' => array( 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), ) ); $this->add_control( 'time_format', array( 'label' => __( 'Time Format', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( 'hh' => __( '12 Hours', 'premium-addons-for-elementor' ), 'HH' => __( '24 Hours', 'premium-addons-for-elementor' ), ), 'default' => 'HH', 'render_type' => 'template', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'show_time', array( 'label' => __( 'Show Clock', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ) ); $this->add_control( 'show_indicators', array( 'label' => __( 'Show Clock Faces', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'condition' => array( 'show_time' => 'yes', 'show_clock_num!' => 'yes', 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), ) ); $this->add_control( 'show_clock_num', array( 'label' => __( 'Show Clock Numbers', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'condition' => array( 'show_time' => 'yes', 'skin' => array( 'skin-1', 'skin-5', 'skin-6' ), ), ) ); $this->add_responsive_control( 'clock_num_spacing', array( 'label' => __( 'Clock Number Spacing', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-numbers' => 'width: calc( 100% - {{SIZE}}% ); height: calc( 100% - {{SIZE}}% );', ), 'condition' => array( 'show_time' => 'yes', 'show_clock_num' => 'yes', 'skin' => array( 'skin-1', 'skin-5', 'skin-6' ), ), ) ); $this->add_control( 'show_seconds', array( 'label' => __( 'Show Seconds', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'condition' => array( 'show_time' => 'yes', 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'show_meridiem', array( 'label' => __( 'Show Meridiem', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'conditions' => array( 'relation' => 'and', 'terms' => array( array( 'name' => 'show_time', 'operator' => '===', 'value' => 'yes', ), array( 'relation' => 'or', 'terms' => array( array( 'name' => 'skin', 'operator' => 'in', 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), array( 'relation' => 'and', 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), array( 'name' => 'time_format', 'operator' => '===', 'value' => 'hh', ), ), ), ), ), ), ), ) ); $this->add_control( 'meridiem_type', array( 'label' => __( 'Show As:', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'render_type' => 'template', 'options' => array( 'text' => __( 'Text', 'premium-addons-for-elementor' ), 'icon' => __( 'Icon', 'premium-addons-for-elementor' ), ), 'default' => 'text', 'condition' => array( 'time_format' => 'hh', 'show_time' => 'yes', 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'show_timezone_offset', array( 'label' => __( 'Show GMT Offset', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'description' => __( 'Shows the number of hours and minutes that the time differs from Greenwich Mean Time', 'premium-addons-for-elementor' ), ) ); $this->add_control( 'offset_format', array( 'label' => __( 'Offset Format', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( 'Z' => __( '+5HRS', 'premium-addons-for-elementor' ), 'ZZ' => __( '+05:00', 'premium-addons-for-elementor' ), ), 'default' => 'ZZ', 'render_type' => 'template', 'condition' => array( 'show_timezone_offset' => 'yes', ), ) ); $this->add_responsive_control( 'clock_size', array( 'label' => __( 'Clock Size', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 1000, ), ), 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-4) .premium-world-clock__time-wrapper, {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.premium-world-clock__skin-4 .premium-world-clock__time-wrapper, {{WRAPPER}}.premium-world-clock__skin-4 .premium-world-clock__date-wrapper' => 'width: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'skin!' => array( 'skin-3' ), 'show_time' => 'yes', ), ) ); $this->add_responsive_control( 'time_spacing', array( 'label' => __( 'Units Spacing', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), 'show_time' => 'yes', ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'gap: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'meridiem_hor', array( 'label' => __( 'Meridiem Horizontal Position', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => -100, 'max' => 300, ), ), 'conditions' => array( 'terms' => array( array( 'name' => 'show_time', 'operator' => '===', 'value' => 'yes', ), array( 'name' => 'show_meridiem', 'operator' => '===', 'value' => 'yes', ), array( 'relation' => 'or', 'terms' => array( array( 'name' => 'skin', 'operator' => 'in', 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), array( 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), array( 'name' => 'time_format', 'operator' => '===', 'value' => 'hh', ), ), ), ), ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__meridiem' => 'left: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'meridiem_ver', array( 'label' => __( 'Meridiem Vertical Position', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => -100, 'max' => 300, ), ), 'conditions' => array( 'terms' => array( array( 'name' => 'show_time', 'operator' => '===', 'value' => 'yes', ), array( 'name' => 'show_meridiem', 'operator' => '===', 'value' => 'yes', ), array( 'relation' => 'or', 'terms' => array( array( 'name' => 'skin', 'operator' => 'in', 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), array( 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), array( 'name' => 'time_format', 'operator' => '===', 'value' => 'hh', ), ), ), ), ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__meridiem' => 'top: {{SIZE}}px;', ), ) ); $this->end_controls_section(); } private function add_additional_option_controls() { $info_conditions = array( 'relation' => 'or', 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'date', 'value' => 'yes', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ); $info_display_conditions = array( 'relation' => 'or', 'terms' => array( array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'date', 'value' => 'yes', ), ), ), array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ), array( 'terms' => array( array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), array( 'name' => 'date', 'value' => 'yes', ), ), ), ), ); $this->start_controls_section( 'additional_options_section', array( 'label' => __( 'Additional Settings', 'premium-addons-for-elementor' ), 'condition' => array( 'skin!' => $this->options['skin_condition'], ), ) ); $this->add_control( 'clock_title', array( 'label' => __( 'Title', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => array( 'active' => true ), ) ); $this->add_control( 'date', array( 'label' => __( 'Show Date', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ) ); $this->add_control( 'days_num', array( 'label' => __( 'Days Before/After', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'description' => __( 'Number of days to show before/after the current day.', 'premium-addons-for-elementor' ), 'options' => array( '1' => __( '1 Day', 'premium-addons-for-elementor' ), '2' => __( '2 Days', 'premium-addons-for-elementor' ), '3' => __( '3 Days', 'premium-addons-for-elementor' ), ), 'default' => '3', 'render_type' => 'template', 'condition' => array( 'date' => 'yes', 'skin' => 'skin-3', ), ) ); $this->add_control( 'date_format', array( 'label' => __( 'Date Format', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'render_type' => 'template', 'options' => array( 'D' => __( '8/6/2023', 'premium-addons-for-elementor' ), 'DD' => __( 'Aug 6, 2023', 'premium-addons-for-elementor' ), 'DDD' => __( 'August 6, 2023', 'premium-addons-for-elementor' ), 'DDDD' => __( 'Wednesday, August 6, 2023', 'premium-addons-for-elementor' ), ), 'default' => 'DDD', 'condition' => array( 'date' => 'yes', 'skin!' => array( 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'date_format_digital', array( 'label' => __( 'Date Format', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'render_type' => 'template', 'options' => array( 'dn|m|d' => __( 'Day Number | Month | Day', 'premium-addons-for-elementor' ), 'm|dn|d' => __( 'Month | Day Number | Day', 'premium-addons-for-elementor' ), 'custom' => __( 'custom', 'premium-addons-for-elementor' ), ), 'default' => 'm|dn|d', 'condition' => array( 'date' => 'yes', 'skin' => 'skin-4', ), ) ); $this->add_control( 'custom_date_format', array( 'label' => __( 'Custom Date Format', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'description' => 'Use this option to re-arrange the date segments separated by |, EX: d|m|dn, d = day name, m = month name, dn = day number', 'render_type' => 'template', 'condition' => array( 'skin' => 'skin-4', 'date' => 'yes', 'date_format_digital' => 'custom', ), ) ); $this->add_responsive_control( 'unit_display', array( 'label' => __( 'Units Display', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'prefix_class' => 'premium-world-clock__unit-', 'toggle' => false, 'separator' => 'before', 'options' => array( 'row' => array( 'title' => __( 'Inline', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-horizontal', ), 'column' => array( 'title' => __( 'Block', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-vertical', ), ), 'default' => 'row', 'condition' => array( 'skin' => 'skin-2', 'show_time' => 'yes', ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'flex-direction: {{VALUE}}', ), ) ); $this->add_responsive_control( 'layout', array( 'label' => __( 'Display', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'prefix_class' => 'premium-world-clock__', 'toggle' => false, 'separator' => 'before', 'options' => array( 'row' => array( 'title' => __( 'Inline', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-horizontal', ), 'column' => array( 'title' => __( 'Block', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-vertical', ), ), 'default' => 'column', 'conditions' => array( 'terms' => array( array( 'name' => 'show_time', 'value' => 'yes', ), array( 'name' => 'skin', 'operator' => '!==', 'value' => 'skin-3', ), $info_conditions, ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-wrapper' => 'flex-direction: {{VALUE}}', ), ) ); $this->add_responsive_control( 'info_layout', array( 'label' => __( 'Info Display', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'prefix_class' => 'premium-world-clock__info-', 'toggle' => false, 'options' => array( 'row' => array( 'title' => __( 'Inline', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-horizontal', ), 'column' => array( 'title' => __( 'Block', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-vertical', ), ), 'default' => 'column', 'conditions' => array( 'terms' => array( array( 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-3', 'skin-4' ), ), $info_display_conditions, ), ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__additonal-info' => 'flex-direction: {{VALUE}}', ), ) ); $this->add_responsive_control( 'info_layout_digital', array( 'label' => __( 'Info Display', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'prefix_class' => 'premium-world-clock__info-', 'toggle' => false, 'options' => array( 'row' => array( 'title' => __( 'Inline', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-horizontal', ), 'column' => array( 'title' => __( 'Block', 'premium-addons-for-elementor' ), 'icon' => 'eicon-navigation-vertical', ), ), 'default' => 'column', 'conditions' => array( 'terms' => array( array( 'name' => 'skin', 'operator' => 'in', 'value' => array( 'skin-3', 'skin-4' ), ), array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__additonal-info' => 'flex-direction: {{VALUE}}', ), ) ); $this->add_responsive_control( 'info_order', array( 'label' => __( 'Clock Info Order', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'toggle' => false, 'options' => array( '0' => array( 'title' => __( 'Start', 'premium-addons-for-elementor' ), 'icon' => 'eicon-order-start', ), '2' => array( 'title' => __( 'End', 'premium-addons-for-elementor' ), 'icon' => 'eicon-order-end', ), ), 'default' => '0', 'conditions' => array( 'terms' => array( array( 'name' => 'show_time', 'operator' => '===', 'value' => 'yes', ), $info_conditions, ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__additonal-info' => 'order: {{VALUE}}', ), ) ); $this->add_responsive_control( 'title_order', array( 'label' => __( 'Title Order', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'toggle' => false, 'options' => array( '0' => array( 'title' => __( 'Start', 'premium-addons-for-elementor' ), 'icon' => 'eicon-order-start', ), '2' => array( 'title' => __( 'End', 'premium-addons-for-elementor' ), 'icon' => 'eicon-order-end', ), ), 'default' => '0', 'conditions' => array( 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-3', 'skin-4' ), ), array( 'relation' => 'or', 'terms' => array( array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'date', 'value' => 'yes', ), ), ), array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ), ), ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-title' => 'order: {{VALUE}}', ), ) ); $this->add_control( 'clock_alignment', array( 'label' => __( 'Clock Alignment', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'flex-start' => array( 'title' => __( 'Start', 'premium-addons-for-elementor' ), 'icon' => 'eicon-order-start', ), 'center' => array( 'title' => __( 'Center', 'premium-addons-for-elementor' ), 'icon' => 'eicon-h-align-center', ), 'flex-end' => array( 'title' => __( 'End', 'premium-addons-for-elementor' ), 'icon' => 'eicon-order-end', ), ), 'default' => 'center', 'toggle' => false, 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__column) .premium-world-clock__clock-wrapper' => 'justify-content: {{VALUE}};', '{{WRAPPER}}.premium-world-clock__column .premium-world-clock__clock-wrapper' => 'align-items: {{VALUE}};', ), ) ); $this->add_responsive_control( 'clock_ver_align', array( 'label' => __( 'Clock Vertical Alignment', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'flex-start' => array( 'title' => __( 'Top', 'premium-addons-for-elementor' ), 'icon' => 'eicon-arrow-up', ), 'center' => array( 'title' => __( 'Center', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-justify', ), 'flex-end' => array( 'title' => __( 'Bottom', 'premium-addons-for-elementor' ), 'icon' => 'eicon-arrow-down', ), ), 'default' => 'center', 'toggle' => false, 'conditions' => array( 'relation' => 'and', 'terms' => array( $info_conditions, array( 'name' => 'layout', 'value' => 'row', ), array( 'name' => 'show_time', 'value' => 'yes', ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-wrapper' => 'align-items: {{VALUE}};', ), ) ); $this->add_responsive_control( 'info_txt_align', array( 'label' => __( 'Info Alignment', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-left', ), 'center' => array( 'title' => __( 'Center', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-center', ), 'right' => array( 'title' => __( 'Right', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-right', ), ), 'toggle' => false, 'default' => 'center', 'conditions' => array( 'relation' => 'and', 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-3', 'skin-4' ), ), array( 'name' => 'info_layout', 'operator' => '===', 'value' => 'column', ), array( 'relation' => 'or', 'terms' => array( array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'date', 'value' => 'yes', ), ), ), array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ), array( 'terms' => array( array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), array( 'name' => 'date', 'value' => 'yes', ), ), ), ), ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__additonal-info' => 'text-align: {{VALUE}};', ), ) ); $this->add_responsive_control( 'info_txt_align_digital', array( 'label' => __( 'Info Alignment', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'flex-start' => array( 'title' => __( 'Start', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-left', ), 'center' => array( 'title' => __( 'Center', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-center', ), 'flex-end' => array( 'title' => __( 'End', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-right', ), ), 'toggle' => false, 'default' => 'center', 'conditions' => array( 'relation' => 'or', 'terms' => array( array( 'relation' => 'and', 'terms' => array( array( 'name' => 'skin', 'operator' => '===', 'value' => 'skin-4', ), array( 'name' => 'info_layout', 'operator' => '===', 'value' => 'column', ), array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ), array( 'relation' => 'and', 'terms' => array( array( 'name' => 'skin', 'operator' => '===', 'value' => 'skin-3', ), array( 'relation' => 'or', 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ), ), ), ), ), 'selectors' => array( '{{WRAPPER}}.premium-world-clock__info-column .premium-world-clock__additonal-info' => 'align-items: {{VALUE}};', '{{WRAPPER}}:not(.premium-world-clock__info-column) .premium-world-clock__additonal-info' => 'justify-content: {{VALUE}};', ), ) ); $this->add_responsive_control( 'days_align', array( 'label' => __( 'Days Alignment', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-left', ), 'center' => array( 'title' => __( 'Center', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-center', ), 'right' => array( 'title' => __( 'Right', 'premium-addons-for-elementor' ), 'icon' => 'eicon-text-align-right', ), ), 'toggle' => false, 'default' => 'left', 'condition' => array( 'skin' => 'skin-3', 'date' => 'yes', ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'text-align: {{VALUE}};', ), ) ); $this->add_responsive_control( 'clock_container_spacing', array( 'label' => __( 'Spacing', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'separator' => 'before', 'conditions' => array( 'terms' => array( array( 'name' => 'show_time', 'value' => 'yes', ), array( 'name' => 'skin', 'operator' => '!==', 'value' => 'skin-4', ), $info_conditions, ), ), 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__clock-wrapper' => 'gap: {{SIZE}}px;', '{{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__clock-wrapper' => 'gap: unset; column-gap: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'info_spacing', array( 'label' => __( 'Info Spacing', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'conditions' => array( 'relation' => 'and', 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-3', 'skin-4' ), ), array( 'relation' => 'or', 'terms' => array( array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'date', 'value' => 'yes', ), ), ), array( 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ), array( 'terms' => array( array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), array( 'name' => 'date', 'value' => 'yes', ), ), ), ), ), ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__additonal-info' => 'gap: {{SIZE}}px;', ), ) ); $this->add_control( 'equal_width', array( 'label' => __( 'Equal Units Width', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'description' => __( 'Applies equal width on the time units', 'premium-addons-for-elementor' ), 'separator' => 'before', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'language_prefix', array( 'label' => __( 'Language', 'premium-addons-pro' ), 'type' => Controls_Manager::TEXT, 'description' => __( 'Enter language prefix, eg. en for English, ja for Japanese, if you don\'t know your language prefix, please check
here
' ), ) ); $this->end_controls_section(); } private function add_helpful_info_section() { $this->start_controls_section( 'section_pa_docs', array( 'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ), ) ); $docs = array( 'https://premiumaddons.com/docs/elementor-world-clock-widget/' => __( 'Getting started »', 'premium-addons-for-elementor' ), ); $doc_index = 1; foreach ( $docs as $url => $title ) { $doc_url = Helper_Functions::get_campaign_link( $url, 'editor-page', 'wp-editor', 'get-support' ); $this->add_control( 'doc_' . $doc_index, array( 'type' => Controls_Manager::RAW_HTML, 'raw' => sprintf( '
%s
', $doc_url, $title ), 'content_classes' => 'editor-pa-doc', ) ); ++$doc_index; } $this->end_controls_section(); } /** Style Controls. */ private function add_clock_style_controls() { $this->start_controls_section( 'clock_style_section', array( 'label' => __( 'Clock', 'premium-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'show_time' => 'yes', 'skin!' => $this->options['skin_condition'], ), ) ); $this->add_control( 'clock_face_fill', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__circle > svg, {{WRAPPER}} .premium-world-clock__circle > svg *' => 'fill: {{VALUE}};', ), 'condition' => array( 'skin' => array( 'skin-5', 'skin-6', 'skin-7' ), ), ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'clock_box_shadow', 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__time-wrapper, {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle', ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'clock_background', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__time-wrapper, {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'clock_border', 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__time-wrapper, {{WRAPPER}}.premium-world-clock__skin-1 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-5 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-6 .premium-world-clock__circle, {{WRAPPER}}.premium-world-clock__skin-7 .premium-world-clock__circle', ) ); $this->add_control( 'time_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'time_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__time-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->end_controls_section(); } private function add_info_style_controls() { $info_conditions = array( 'relation' => 'or', 'terms' => array( array( 'name' => 'clock_title', 'operator' => '!==', 'value' => '', ), array( 'name' => 'date', 'value' => 'yes', ), array( 'name' => 'show_timezone_offset', 'value' => 'yes', ), ), ); $this->start_controls_section( 'clock_info_style_section', array( 'label' => __( 'Clock Info', 'premium-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'conditions' => $info_conditions, ) ); $this->add_control( 'title_heading', array( 'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'condition' => array( 'clock_title!' => '', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'clock_title_typo', 'selector' => '{{WRAPPER}} .premium-world-clock__clock-title', 'condition' => array( 'clock_title!' => '', ), ) ); $this->add_control( 'clock_title_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => array( 'default' => Global_Colors::COLOR_SECONDARY, ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-title' => 'color: {{VALUE}};', ), 'condition' => array( 'clock_title!' => '', ), ) ); $this->add_control( 'date_heading', array( 'label' => esc_html__( 'Date', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => array( 'date' => 'yes', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'date_typo', 'selector' => '{{WRAPPER}} .premium-world-clock__date, {{WRAPPER}} .premium-world-clock__month, {{WRAPPER}} .premium-world-clock__day, {{WRAPPER}} .premium-world-clock__date-segment', 'condition' => array( 'date' => 'yes', ), ) ); $this->add_control( 'date_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => array( 'default' => Global_Colors::COLOR_SECONDARY, ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__date, {{WRAPPER}} .premium-world-clock__month-wrapper, {{WRAPPER}} .premium-world-clock__day-wrapper, {{WRAPPER}} .premium-world-clock__date-segment' => 'color: {{VALUE}};', ), 'condition' => array( 'date' => 'yes', ), ) ); $this->add_control( 'date_border_color', array( 'label' => __( 'Border Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => array( 'default' => Global_Colors::COLOR_SECONDARY, ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__date-segment' => 'border-color: {{VALUE}};', ), 'condition' => array( 'date' => 'yes', 'skin' => 'skin-4', ), ) ); $this->add_responsive_control( 'date_border_width', array( 'label' => __( 'Border Thickness', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__date-segment' => 'border-width: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'date' => 'yes', 'skin' => 'skin-4', ), ) ); $this->add_control( 'date_cont_heading', array( 'label' => esc_html__( 'Date Container', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => array( 'date' => 'yes', 'skin' => 'skin-4', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'date_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__date-wrapper', 'condition' => array( 'date' => 'yes', 'skin' => 'skin-4', ), ) ); $this->add_control( 'date_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__date-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'date' => 'yes', 'skin' => 'skin-4', ), ) ); $this->add_responsive_control( 'date_margin', array( 'label' => __( 'Margin', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em', 'custom' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__date-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'date' => 'yes', 'skin' => 'skin-4', ), ) ); $this->add_control( 'offset_heading', array( 'label' => esc_html__( 'GMT Offset', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => array( 'show_timezone_offset' => 'yes', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'offset_typo', 'selector' => '{{WRAPPER}} .premium-world-clock__gmt-offset', 'condition' => array( 'show_timezone_offset' => 'yes', ), ) ); $this->add_control( 'offset_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => array( 'default' => Global_Colors::COLOR_SECONDARY, ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__gmt-offset' => 'color: {{VALUE}};', ), 'condition' => array( 'show_timezone_offset' => 'yes', ), ) ); $this->add_control( 'info_cont_heading', array( 'label' => esc_html__( 'Info Container', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'clock_info_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additonal-info', ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'clock_info_shadow', 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additonal-info', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'clock_info_border', 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additonal-info', ) ); $this->add_control( 'clock_info_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additonal-info' => 'border-radius: {{SIZE}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'clock_info_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additonal-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'clock_info_margin', array( 'label' => __( 'Margin', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em', 'custom' ), 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__skin-3):not(.premium-world-clock__skin-4) .premium-world-clock__additonal-info' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->end_controls_section(); } private function add_units_style_controls() { $mer_conditions = array( 'relation' => 'and', 'terms' => array( array( 'name' => 'show_time', 'operator' => '===', 'value' => 'yes', ), array( 'name' => 'show_meridiem', 'operator' => '===', 'value' => 'yes', ), array( 'relation' => 'or', 'terms' => array( array( 'name' => 'skin', 'operator' => '!in', 'value' => array( 'skin-2', 'skin-3', 'skin-4' ), ), array( 'relation' => 'and', 'terms' => array( array( 'name' => 'skin', 'operator' => 'in', 'value' => array( 'skin-2', 'skin-3', 'skin-4' ), ), array( 'name' => 'time_format', 'operator' => '===', 'value' => 'hh', ), ), ), ), ), ), ); $this->start_controls_section( 'time_style_section', array( 'label' => __( 'Time Units', 'premium-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'show_time' => 'yes', 'skin!' => $this->options['skin_condition'], ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'time_typo', 'label' => 'Units Typography', 'selector' => '{{WRAPPER}} .premium-world-clock__time-wrapper *:not(.premium-world-clock__meridiem)', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'time_text_shadow', 'selector' => '{{WRAPPER}} .premium-world-clock__time-wrapper *', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'meridiem_typo', 'label' => 'Meridiem Typography', 'selector' => '{{WRAPPER}} .premium-world-clock__meridiem', 'conditions' => $mer_conditions, ) ); $this->add_control( 'meridiem_size', array( 'label' => __( 'Meridiem Icon Size', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__meridiem > svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'show_meridiem' => 'yes', 'time_format' => 'hh', 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), 'meridiem_type' => 'icon', ), ) ); $this->add_responsive_control( 'time_skew', array( 'label' => __( 'Skew (deg)', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'deg' ), 'default' => array( 'size' => '-10', 'unit' => 'deg', ), 'range' => array( 'deg' => array( 'min' => -50, 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__hand, {{WRAPPER}} .premium-world-clock__separator' => 'transform: skew({{SIZE}}deg);', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->start_controls_tabs( 'clock_units_tabs' ); $this->start_controls_tab( 'hours_tab', array( 'label' => __( 'Hours', 'premium-addons-for-elementor' ), ) ); $this->add_control( 'hours_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}}.premium-world-clock__hand-0 .premium-world-clock__hours::before, {{WRAPPER}}.premium-world-clock__hand-1 .premium-world-clock__hours::before, {{WRAPPER}}.premium-world-clock__hand-2 .premium-world-clock__hours::before, {{WRAPPER}}.premium-world-clock__hand-3 .premium-world-clock__hours::before, {{WRAPPER}}.premium-world-clock__hand-4 .premium-world-clock__hours::before, {{WRAPPER}}.premium-world-clock__hand-5 .premium-world-clock__hours::before' => 'background-color: {{VALUE}};', '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__hours' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'hours_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__hours', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'hours_border', 'selector' => '{{WRAPPER}} .premium-world-clock__hours', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'hours_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__hours' => 'border-radius: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'hours_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__hours' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'hours_thickness', array( 'label' => __( 'Thickness', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 10, ), ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__hours::before' => 'width: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'hours_len', array( 'label' => __( 'Length', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 500, ), ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__hours' => 'width: {{SIZE}}px; height: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'hours_pos', array( 'label' => __( 'Position', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( '%' ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__hours::before' => 'height: calc( 50% + {{SIZE}}% );', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'min_tab', array( 'label' => __( 'Minutes', 'premium-addons-for-elementor' ), ) ); $this->add_control( 'min_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}}.premium-world-clock__hand-0 .premium-world-clock__minutes::before, {{WRAPPER}}.premium-world-clock__hand-1 .premium-world-clock__minutes::before, {{WRAPPER}}.premium-world-clock__hand-2 .premium-world-clock__minutes::before, {{WRAPPER}}.premium-world-clock__hand-3 .premium-world-clock__minutes::before, {{WRAPPER}}.premium-world-clock__hand-4 .premium-world-clock__minutes::before, {{WRAPPER}}.premium-world-clock__hand-5 .premium-world-clock__minutes::before' => 'background-color: {{VALUE}};', '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__minutes' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'min_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__minutes', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'min_border', 'selector' => '{{WRAPPER}} .premium-world-clock__minutes', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'min_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__minutes' => 'border-radius: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'min_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__minutes' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'min_thickness', array( 'label' => __( 'Thickness', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 10, ), ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__minutes::before' => 'width: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'min_len', array( 'label' => __( 'Length', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 500, ), ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__minutes' => 'width: {{SIZE}}px; height: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'min_pos', array( 'label' => __( 'Position', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( '%' ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__minutes::before' => 'height: calc( 50% + {{SIZE}}% );', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'sec_tab', array( 'label' => __( 'Seconds', 'premium-addons-for-elementor' ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'sec_typo', 'selector' => '{{WRAPPER}} .premium-world-clock__seconds', 'condition' => array( 'skin' => 'skin-3', ), ) ); $this->add_control( 'sec_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__seconds::before' => 'background-color: {{VALUE}};', '{{WRAPPER}}:not(.premium-world-clock__skin-1):not(.premium-world-clock__skin-5):not(.premium-world-clock__skin-6):not(.premium-world-clock__skin-7) .premium-world-clock__seconds, {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper *' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'sec_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'sec_border', 'selector' => '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper', 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'sec_border_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'sec_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}}:not(.premium-world-clock__skin-3) .premium-world-clock__seconds, {{WRAPPER}}.premium-world-clock__skin-3 .premium-world-clock__sec-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'sec_thickness', array( 'label' => __( 'Thickness', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 10, ), ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__seconds::before' => 'width: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'sec_len', array( 'label' => __( 'Length', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 500, ), ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__seconds' => 'width: {{SIZE}}px; height: {{SIZE}}px;', ), ) ); $this->add_responsive_control( 'sec_pos', array( 'label' => __( 'Position', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( '%' ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__seconds::before' => 'height: calc( 50% + {{SIZE}}% );', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'mer_tab', array( 'label' => __( 'Meridiem', 'premium-addons-for-elementor' ), 'conditions' => $mer_conditions, ) ); $this->add_control( 'mer_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__meridiem' => 'color: {{VALUE}};', '{{WRAPPER}} .premium-world-clock__meridiem *' => 'fill: {{VALUE}};', ), 'conditions' => $mer_conditions, ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'mer_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__meridiem', 'conditions' => $mer_conditions, ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'mer_border', 'selector' => '{{WRAPPER}} .premium-world-clock__meridiem', 'conditions' => $mer_conditions, ) ); $this->add_control( 'mer_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__meridiem' => 'border-radius: {{SIZE}}{{UNIT}};', ), 'conditions' => $mer_conditions, ) ); $this->add_responsive_control( 'mer_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__meridiem' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'conditions' => $mer_conditions, ) ); $this->end_controls_tab(); $this->start_controls_tab( 'faces_tab', array( 'label' => __( 'Faces', 'premium-addons-for-elementor' ), 'condition' => array( 'show_indicators' => 'yes', 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), ) ); $this->add_control( 'clock_face_color', array( 'label' => __( 'Clock Face Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__face' => 'background-color: {{VALUE}};', '{{WRAPPER}}:not(.premium-world-clock__skin-1) .premium-world-clock__circle > svg, {{WRAPPER}}:not(.premium-world-clock__skin-1) .premium-world-clock__circle > svg *' => 'fill: {{VALUE}};', ), 'condition' => array( 'show_indicators' => 'yes', 'skin' => array( 'skin-1', 'skin-5', 'skin-6', 'skin-7' ), ), ) ); $this->add_responsive_control( 'clock_face_thickness', array( 'label' => __( 'Clock Faces Thickness', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 10, ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__face' => 'height: {{SIZE}}px;', ), 'condition' => array( 'show_indicators' => 'yes', 'skin' => array( 'skin-1' ), ), ) ); $this->add_responsive_control( 'clock_face_len', array( 'label' => __( 'Clock Faces Length', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__face' => 'width: {{SIZE}}px;', ), 'condition' => array( 'show_indicators' => 'yes', 'skin' => array( 'skin-1' ), ), ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'separator_color', array( 'label' => __( 'Separator Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'separator' => 'before', 'selectors' => array( '{{WRAPPER}} .premium-world-clock__separator' => 'color: {{VALUE}};', ), 'condition' => array( 'skin' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'clock_rounder', array( 'label' => esc_html__( 'Rounder', 'premium-addons-for-elementor' ), 'separator' => 'before', 'type' => Controls_Manager::HEADING, 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_responsive_control( 'rounder_size', array( 'label' => __( 'Size', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 10, ), ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__rounder' => 'width: {{SIZE}}px; height: {{SIZE}}px;', ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'rounder_bg', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__rounder' => 'background-color: {{VALUE}};', ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->add_control( 'rounder_border_color', array( 'label' => __( 'Border Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__rounder' => 'border-color: {{VALUE}};', ), 'condition' => array( 'skin!' => array( 'skin-2', 'skin-3', 'skin-4' ), ), ) ); $this->end_controls_section(); } private function add_days_style_controls() { $this->start_controls_section( 'days_style_section', array( 'label' => __( 'Days', 'premium-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'date' => 'yes', 'skin' => 'skin-3', ), ) ); $this->start_controls_tabs( 'days_tabs' ); $this->start_controls_tab( 'normal_tab', array( 'label' => __( 'Normal', 'premium-addons-for-elementor' ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'day_typo', 'selector' => '{{WRAPPER}} .premium-world-clock__day-name', ) ); $this->add_control( 'days_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__day-name' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'days_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__day-name', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'days_border', 'selector' => '{{WRAPPER}} .premium-world-clock__day-name', ) ); $this->add_control( 'days_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__day-name' => 'border-radius: {{SIZE}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'days_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__day-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'active_tab', array( 'label' => __( 'Active', 'premium-addons-for-elementor' ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'day_typo_act', 'selector' => '{{WRAPPER}} .premium-world-clock__day-name.current-day', ) ); $this->add_control( 'days_color_act', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__day-name.current-day' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'days_bg_act', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__day-name.current-day', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'days_border_act', 'selector' => '{{WRAPPER}} .premium-world-clock__day-name.current-day', ) ); $this->add_control( 'days_rad_act', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__day-name.current-day' => 'border-radius: {{SIZE}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'days_padding_act', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__day-name.current-day' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'days_container', array( 'label' => esc_html__( 'Container', 'premium-addons-for-elementor' ), 'separator' => 'before', 'type' => Controls_Manager::HEADING, ) ); $this->add_responsive_control( 'days_spacing', array( 'label' => __( 'Spacing', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'gap: {{SIZE}}{{UNIT}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'days_cont_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__days-wrapper', ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'days_cont_shadow', 'selector' => '{{WRAPPER}} .premium-world-clock__days-wrapper', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'days_cont_border', 'selector' => '{{WRAPPER}} .premium-world-clock__days-wrapper', ) ); $this->add_control( 'days_cont_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'days_cont_padding', array( 'label' => __( 'Padding', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'days_cont_margin', array( 'label' => __( 'Margin', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__days-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->end_controls_section(); } private function add_clock_num_style_controls() { $this->start_controls_section( 'clock_num_style_section', array( 'label' => __( 'Clock Numbers', 'premium-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'show_time' => 'yes', 'show_clock_num' => 'yes', 'skin' => array( 'skin-1', 'skin-5', 'skin-6' ), ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'clock_num_typo', 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'clock_num_shadow', 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', ) ); $this->add_control( 'clock_num_color', array( 'label' => __( 'Color', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-number' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'clock_num_bg', 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'clock_num_border', 'selector' => '{{WRAPPER}} .premium-world-clock__clock-number', ) ); $this->add_control( 'clock_num_rad', array( 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-number' => 'border-radius: {{SIZE}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'clock_num_size', array( 'label' => __( 'Size', 'premium-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} .premium-world-clock__clock-number' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ), ) ); $this->end_controls_section(); } /** * Render title 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(); $papro_activated = apply_filters( 'papro_activated', false ); if ( ! $papro_activated && in_array( $settings['skin'], array( 'skin-4', 'skin-6', 'skin-7' ), true ) ) { ?>
Premium Addons Pro.', 'premium-addons-for-elementor' ); echo wp_kses_post( $message ); ?>
$time_zone, 'format' => in_array( $skin, $analog_skins, true ) ? 'hh' : $settings['time_format'], 'skin' => $skin, 'showSeconds' => $show_seconds, 'showMeridiem' => $show_meridiem, 'meridiemType' => $settings['meridiem_type'], 'date' => $show_date, 'gmtOffset' => $show_timezone, 'showClockNum' => $show_clock_numbers, 'equalWidth' => 'yes' === $settings['equal_width'] && in_array( $skin, array( 'skin-2', 'skin-3', 'skin-4' ), true ) ? true : false, 'language' => $settings['language_prefix'] ); if ( $show_date ) { if ( 'skin-4' === $skin ) { $digital_date_format = 'custom' === $settings['date_format_digital'] ? explode( '|', $settings['custom_date_format'] ) : explode( '|', $settings['date_format_digital'] ); $clock_setting['dateFormat'] = $digital_date_format; } elseif ( 'skin-3' === $skin ) { $clock_setting['daysNum'] = $settings['days_num']; } else { $clock_setting['dateFormat'] = $settings['date_format']; } } if ( $show_timezone ) { $clock_setting['offsetFormat'] = $settings['offset_format']; } $this->add_render_attribute( 'pa-clock-wrapper', array( 'class' => array( 'premium-world-clock__clock-wrapper', 'premium-addons__v-hidden' ), 'data-settings' => wp_json_encode( $clock_setting ), ) ); ?>
get_render_attribute_string( 'pa-clock-wrapper' ) ); ?>>
get_clock_face( $skin ); } ?>
3
4
5
6
7
8
9
10
11
12
1
2
AM
:
:
:
S
M
D
:
:
'
', 'skin-6' => '
', 'skin-7' => '
', ); echo $clock_faces[ $skin ]; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } }