%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/19851/cwd/wp-content/themes/evenex/components/editor/elementor/widgets/schedule/
Upload File :
Create Path :
Current File : //proc/19851/cwd/wp-content/themes/evenex/components/editor/elementor/widgets/schedule/schedule.php

<?php

namespace Elementor;
if ( ! defined( 'ABSPATH' ) ) exit;

class Evenex_Schedule_Widget extends Widget_Base {

    public function get_name() {
        return 'evenex-schedule';
    }

    public function get_title() {
        return esc_html__( 'Evenex Schedule', 'evenex' );
    }

    public function get_icon() {
        return 'eicon-post-list';
    }

    public function get_categories() {
        return [ 'evenex-elements' ];
    }

    protected function _register_controls() {
        $this->start_controls_section(
            'schedule_list_option_tab',
            [
                'label' => esc_html__( 'Query', 'evenex' ),
            ]
        );

        $this->add_control(
			'schedule_style_choose_option',
			[
				'label'       => esc_html__( 'Schedule Style', 'evenex' ),
				'type'        => Controls_Manager::SELECT,
                'default'     => 'schedule_list',
                'label_block' => true,
				'options' => [
					'schedule_list'           => esc_html__( 'Schedule List', 'evenex' ),
					'schedule_tab_vertical'   => esc_html__( 'Schedule Tab Vertical', 'evenex' ),
					'schedule_tab_horizontal' => esc_html__( 'Schedule Tab Horizontal', 'evenex' ),
					'schedule_horizontal_tab_with_accordion' => esc_html__( 'Schedule Tab Horizontal With Accordion', 'evenex' ),
				],
			]
        );

        $this->add_control(
            'schedule_service_posts_day_num',
            [
                'label'     => esc_html__( 'Posts Day Count', 'evenex' ),
                'type'      => Controls_Manager::NUMBER,
                'min'       => 1,
                'max'       => 100,
                'default'   => 6,
            ]
        );

        $this->add_control(
            'schedule_service_posts_num',
            [
                'label'     => esc_html__( 'Posts Count', 'evenex' ),
                'type'      => Controls_Manager::NUMBER,
                'min'       => 1,
                'max'       => 100,
                'default'   => 6,
            ]
        );

        $this->add_control('schedule__cat',
            [
                'label'     => esc_html__( 'Category', 'evenex' ),
                'type'      => Controls_Manager::SELECT2,
                'multiple'  => true,
                'default'   => '',
                'options'   => $this->getCategories(),
                'label_block' => 'true'
            ]
        );

        $this->add_control(
            'schedule__offset',
            [
                'label'     => esc_html__( 'Offset', 'evenex' ),
                'type'      => Controls_Manager::NUMBER,
                'min'       => 0,
                'max'       => 20,
                'default'   => 0,
            ]
        );

        $this->add_control(
            'schedule__posts_order_by',
            [
                'label'   => esc_html__( 'Order by', 'evenex' ),
                'type'    => Controls_Manager::SELECT,
                'options' => [
                    'date'          => esc_html__( 'Date', 'evenex' ),
                    'title'         => esc_html__( 'Title', 'evenex' ),
                ],
                'default' => 'date',
            ]
        );

        $this->add_control(
            'schedule_service_posts_sort',
            [
                'label'   => esc_html__( 'Order', 'evenex' ),
                'type'    => Controls_Manager::SELECT,
                'options' => [
                    'ASC'  => esc_html__( 'ASC', 'evenex' ),
                    'DESC' => esc_html__( 'DESC', 'evenex' ),
                ],
                'default' => 'DESC',
            ]
        );

        $this->add_control(
            'schedule_service_posts_speakers',
            [
                'label'     => esc_html__( 'Posts Speaker', 'evenex' ),
                'type'      => Controls_Manager::NUMBER,
                'min'       => 1,
                'max'       => 5,
                'description' => 'Minimum 1 and Maximum 5',
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'evenex_schedule', [
                'label'	 => esc_html__( 'Evenex Schedule Info', 'evenex' ),
                'tab'	 => Controls_Manager::TAB_STYLE,
            ]
        );

        $this->add_control(
            'schedule_icon_color', [
                'label'		 => esc_html__( 'Icon Color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .watermark-icon' => 'color: {{VALUE}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']]
            ]
        );
        $this->add_control(
            'schedule_icon_active_color', [
                'label'		 => esc_html__( 'Icon active color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .nav-tabs .nav-link.active .watermark-icon' => 'color: {{VALUE}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical']]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_icon_typo',
                'selector'	 => '{{WRAPPER}} .watermark-icon',
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']],
            ]
        );

        $this->add_control(
            'schedule_info_title_shape', [
                'label'		 => esc_html__( 'Title shape color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-info .hr' => 'background-color: {{VALUE}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_list']],
            ]
        );
        $this->add_control(
            'schedule_title_color', [
                'label'		 => esc_html__( 'Schedule title Color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-title' => 'color: {{VALUE}};',
                ],
            ]
        );
        $this->add_control(
            'schedule_title_active_color', [
                'label'		 => esc_html__( 'Schedule title active Color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .nav-tabs .nav-link.active .schedule-title' => 'color: {{VALUE}};',
                ],
                'separator' => 'before',
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']],
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_title_typo',
                'selector'	 => '{{WRAPPER}} .schedule-title',
            ]
        );
        $this->add_responsive_control(
            'schedule_title_margin',
            [
                'label' => esc_html__( 'Schedule tilte margin', 'evenex' ),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors' => [
                    '{{WRAPPER}} .schedule-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );
        $this->add_control(
            'schedule_subtitle_color', [
                'label'		 => esc_html__( 'Schedule sub title Color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}}  .schedule-subtitle' => 'color: {{VALUE}};',
                ],
                'separator' => 'before',
            ]
        );
        $this->add_control(
            'schedule_subtitle_active_color', [
                'label'		 => esc_html__( 'Sub title active color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}}  .nav-tabs .nav-link.active .schedule-subtitle' => 'color: {{VALUE}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']],
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_subtitle_typo',
                'selector'	 => '{{WRAPPER}} .schedule-subtitle',
            ]
        );
        $this->add_responsive_control(
            'schedule_subtitle_margin',
            [
                'label' => esc_html__( 'Schedule sub tilte margin', 'evenex' ),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors' => [
                    '{{WRAPPER}} .schedule-subtitle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );
        $this->add_control(
            'schedule_info_place_color', [
                'label'		 => esc_html__( 'Schedule place Color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-place' => 'color: {{VALUE}};',
                ],
                'separator' => 'before',
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']]
            ]
        );
        $this->add_control(
            'schedule_info_place_active_color', [
                'label'		 => esc_html__( 'Schedule place active color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .nav-tabs .nav-link.active .schedule-place' => 'color: {{VALUE}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_info_speaker_typo',
                'selector'	 => '{{WRAPPER}} .schedule-place',
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']]
            ]
        );
        $this->add_control(
            'schedule_location_color', [
                'label'		 => esc_html__( 'Location Color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-location' => 'color: {{VALUE}};',
                ],
                'separator' => 'before',
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']]

            ]
        );
        $this->add_control(
            'schedule_location_active_color', [
            'label'		 => esc_html__( 'Location active Color', 'evenex' ),
            'type'		 => Controls_Manager::COLOR,
            'selectors'	 => [
                '{{WRAPPER}} .nav-tabs .nav-link.active .schedule-location' => 'color: {{VALUE}};',
            ],
            'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_location_typo',
                'selector'	 => '{{WRAPPER}} .schedule-location',
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']]
            ]
        );

        $this->start_controls_tabs( 'schedule_info_tabs' );

        $this->start_controls_tab(
            'schedule_ino_tabs',
            [
                'label' => esc_html__( 'Normal', 'evenex' ),
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']]
            ]
        );

        $this->add_group_control(
			Group_Control_Background::get_type(),
			[
				'name'       => 'tab_bg_normal_bg',
                'label'		 => esc_html__( 'Tab BG Color', 'evenex' ),
                'types'      => [ 'classic' ],
                'selector'   => '{{WRAPPER}} .nav-tabs .nav-link',
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']]
			]
        );

        $this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			[
				'name' => 'schedule_info_box_shadow',
                'label'		 => esc_html__( 'Schedule info box shadow', 'evenex' ),
                'selector' => '{{WRAPPER}} .nav-tabs .nav-link',
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical']]
			]
		);

        $this->add_control(
            'schedule_nav_link_shape_color', [
                'label'		 => esc_html__( 'Nav link shape color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .nav-tabs .nav-link::before' => 'color: {{VALUE}};',
                ],
               'condition' => ["schedule_style_choose_option" => ['schedule_tab_horizontal']]
            ]
        );

        $this->end_controls_tab();

        $this->start_controls_tab(
            'tab_style_active',
                [
                    'label' =>esc_html__( 'Active', 'evenex' ),
                    'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']]
                ]
        );

        $this->add_group_control(
			Group_Control_Background::get_type(),
			[
				'name' => 'tab_bg_active_bg',
                'label'		 => esc_html__( 'Tab active BG color', 'evenex' ),
				'types' => [ 'gradient' ],
                'selector' => '{{WRAPPER}} .nav-tabs .nav-link.active',
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical','schedule_tab_horizontal']]
			]
        );
        $this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			[
				'name' => 'schedule_info_box_shadow_active',
                'label'		 => esc_html__( 'Schedule info box shadow active', 'evenex' ),
                'selector' => '{{WRAPPER}} .nav-tabs .nav-link.active',
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_vertical']]
			]
		);

        $this->add_control(
            'schedule_nav_link_active_shape_color', [
                'label'		 => esc_html__( 'Nav link active shape color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .nav-tabs .nav-link.active::before' => 'color: {{VALUE}};',
                ],
               'condition' => ["schedule_style_choose_option" => ['schedule_tab_horizontal']]
            ]
        );

        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->end_controls_section();

        $this->start_controls_section(
            'evenex_schedule_list', [
                'label'	 => esc_html__( 'Evenex Schedule List', 'evenex' ),
                'tab'	 => Controls_Manager::TAB_STYLE,
            ]
        );

        $this->add_control(
            'schedule_list_title_color', [
                'label'		 => esc_html__( 'Schedule list title color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-list .schedule-list-title' => 'color: {{VALUE}};',
                    '{{WRAPPER}} .xs-schedule-accordion .schedule-accordion-card .schedule-list-title' => 'color: {{VALUE}};',
                ],
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_list_title_typo',
                'selector'	 => '{{WRAPPER}} .schedule-list .schedule-list-title, {{WRAPPER}} .xs-schedule-accordion .schedule-accordion-card .schedule-list-title',
            ]
        );
        $this->add_responsive_control(
            'schedule_list_title_margin',
            [
                'label' => esc_html__( 'Tilte margin', 'evenex' ),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors' => [
                    '{{WRAPPER}} .schedule-list .schedule-list-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    '{{WRAPPER}} .xs-schedule-accordion .schedule-accordion-card .schedule-list-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
                'separator' => 'after',
            ]
        );
        $this->add_control(
            'schedule_list_desc_color', [
                'label'		 => esc_html__( 'Description color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-list > p' => 'color: {{VALUE}};',
                    '{{WRAPPER}} .schedule-accordion-short-desc' => 'color: {{VALUE}};',
                ],
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_list_desc_typo',
                'selector'	 => '{{WRAPPER}} .schedule-list > p, {{WRAPPER}} .schedule-accordion-short-desc',
            ]
        );
        $this->add_responsive_control(
            'schedule_list_desc_margin',
            [
                'label' => esc_html__( 'Description margin', 'evenex' ),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors' => [
                    '{{WRAPPER}} .schedule-list > p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    '{{WRAPPER}} .schedule-accordion-short-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
                'separator' => 'after'
            ]
        );
        $this->add_control(
            'schedule_list_meta_color', [
                'label'		 => esc_html__( 'Meta color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-meta-info>span' => 'color: {{VALUE}};',
                ],
                'condition' => [
                    'schedule_style_choose_option!' => 'schedule_horizontal_tab_with_accordion'
                ]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_list_meta_typo',
                'selector'	 => '{{WRAPPER}} .schedule-meta-info>span',
                'condition' => [
                    'schedule_style_choose_option!' => 'schedule_horizontal_tab_with_accordion'
                ]
            ]
        );
        $this->add_control(
            'schedule_list_meta_icon_color', [
                'label'		 => esc_html__( 'Meta icon color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .schedule-list .schedule-meta-info>span>i' => 'color: {{VALUE}};',
                ],
                'condition' => [
                    'schedule_style_choose_option!' => 'schedule_horizontal_tab_with_accordion'
                ]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_list_meta_icon_typo',
                'selector'	 => '{{WRAPPER}} .schedule-list .schedule-meta-info>span>i',
                'condition' => [
                    'schedule_style_choose_option!' => 'schedule_horizontal_tab_with_accordion'
                ]
            ]
        );
        $this->add_responsive_control(
            'schedule_list_meta_margin',
            [
                'label' => esc_html__( 'Schedule list meta margin', 'evenex' ),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors' => [
                    '{{WRAPPER}} .schedule-list .schedule-meta-info' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
                'condition' => [
                    'schedule_style_choose_option!' => 'schedule_horizontal_tab_with_accordion'
                ]
            ]
        );

        $this->add_control(
            'schedule_list_speaker_color', [
                'label'		 => esc_html__( 'Speaker color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .speaker-name' => 'color: {{VALUE}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_horizontal']]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_list_speaker_typo',
                'selector'	 => '{{WRAPPER}} .speaker-name',
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_horizontal']]
            ]
        );
        $this->add_control(
            'schedule_list_speaker_degination_color', [
                'label'		 => esc_html__( 'Speaker degination color', 'evenex' ),
                'type'		 => Controls_Manager::COLOR,
                'selectors'	 => [
                    '{{WRAPPER}} .speaker-designation' => 'color: {{VALUE}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_horizontal']]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(), [
                'name'		 => 'schedule_list_speaker_degination_typo',
                'selector'	 => '{{WRAPPER}} .speaker-designation',
                'condition' => ["schedule_style_choose_option" => ['schedule_tab_horizontal']]
            ]
        );

        $this->add_responsive_control(
            'schedule_list_margin',
            [
                'label' => esc_html__( 'Schedule list margin', 'evenex' ),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors' => [
                    '{{WRAPPER}} .schedule-list:not(:last-child)' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']]
            ]
        );

        $this->end_controls_section();



        $this->start_controls_section(
            'evenex_schedule_additional', [
                'label'	 => esc_html__( 'Evenex Schedule Additional', 'evenex' ),
                'tab'	 => Controls_Manager::TAB_STYLE,
                'condition' => ["schedule_style_choose_option" => ['schedule_list','schedule_tab_vertical']]
            ]
        );

        $this->add_responsive_control(
            'schedule_row_spacing',
            [
                'label' => esc_html__( 'Schedule row spacing', 'evenex' ),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'rem' ],
                'selectors' => [
                    '{{WRAPPER}} .schedule-container:not(:last-child)' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
			'schedule_style_accordion_date',
			[
				'label' => esc_html__( 'Date Style', 'evenex' ),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
                'condition' => ["schedule_style_choose_option" => ['schedule_horizontal_tab_with_accordion']]
			]
        );

        $this->add_control(
			'schedule_style_accordion_date_title_color',
			[
				'label' => esc_html__( 'Color', 'evenex' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .schedule-time' => 'color: {{VALUE}}',
				],
			]
        );

        $this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			[
				'name' => 'contentschedule_style_accordion_date_title_typography',
				'label' => esc_html__( 'Typography', 'evenex' ),
				'selector' => '{{WRAPPER}} .schedule-time',
			]
        );

        $this->add_control(
			'contentschedule_style_accordion_date_title_vertical_alignment',
			[
				'label' => esc_html__( 'Vertical Position', 'evenex' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px'],
				'range' => [
					'px' => [
						'min' => -30,
						'max' => 50,
						'step' => 1,
					]
				],

				'selectors' => [
					'{{WRAPPER}} .schedule-time' => 'transform: translateY({{SIZE}}{{UNIT}});',
				],
			]
		);

        $this->end_controls_section();

        $this->start_controls_section(
			'schedule_style_accordion_layout_style',
			[
				'label' => esc_html__( 'Layout Style', 'evenex' ),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
                'condition' => ["schedule_style_choose_option" => ['schedule_horizontal_tab_with_accordion']]
			]
        );

        $this->add_control(
			'schedule_style_accordion_border_color',
			[
				'label' => esc_html__( 'Border Color', 'evenex' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .xs-schedule-accordion .schedule-accordion-card' => 'border-color: {{VALUE}}',
				],
			]
        );

        $this->add_control(
			'schedule_style_icon_section_title',
			[
				'label' => esc_html__( 'Icon section', 'evenex' ),
				'type' => \Elementor\Controls_Manager::HEADING,
				'separator' => 'before',
			]
		);


        $this->start_controls_tabs(
			'schedule_style_icon_style'
		);
		$this->start_controls_tab(
			'schedule_style_normal_tab',
			[
				'label' => esc_html__( 'Normal', 'evenex' ),
			]
        );

        $this->add_control(
			'schedule_style_accordion_icon_bg_normal',
			[
				'label' => esc_html__( 'Background Color', 'evenex' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .xs-schedule-accordion .schedule-accordion-toggle-icon' => 'background-color: {{VALUE}}',
				],
			]
        );

        $this->end_controls_tab();

        $this->start_controls_tab(
			'schedule_style_hover_tab',
			[
				'label' => esc_html__( 'Active', 'evenex' ),
			]
        );

        $this->add_control(
			'schedule_style_accordion_icon_bg_active',
			[
				'label' => esc_html__( 'Background Color', 'evenex' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .xs-schedule-accordion .schedule-accordion-card.show .schedule-accordion-toggle-icon' => 'background-color: {{VALUE}}',
				],
			]
        );
        $this->end_controls_tab();
        $this->end_controls_tabs();

        $this->add_control(
			'schedule_style_heading_section',
			[
				'label' => esc_html__( 'Tab Heading Bg section', 'evenex' ),
				'type' => \Elementor\Controls_Manager::HEADING,
				'separator' => 'before',
			]
        );

        $this->start_controls_tabs(
			'schedule_style_tab_heading'
		);
		$this->start_controls_tab(
			'schedule_style_normal_tab_heading_option',
			[
				'label' => esc_html__( 'Normal', 'evenex' ),
			]
        );

        $this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name' => 'schedule_style_accordion_tile_typo',
				'label' => esc_html__( 'Typography', 'evenex' ),
				'scheme' => Scheme_Typography::TYPOGRAPHY_1,
				'selector' => '{{WRAPPER}} .schedule-nav-tab-horizontal-style-2 .schedule-title',
			]
		);

        $this->add_responsive_control(
			'schedule_style_accordion_tile_color_normal',
			[
				'label' => esc_html__( 'Title Color', 'evenex' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .schedule-nav-tab-horizontal-style-2 .schedule-title' => 'color: {{VALUE}}',
				],
			]
		);

        $this->add_control(
			'schedule_style_accordion_tile_border_normal',
			[
				'label' => esc_html__( 'Border Color', 'evenex' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .schedule-nav-tab-horizontal-style-2>.nav-item>.nav-link' => 'border-color: {{VALUE}}',
				],
			]
        );
        $this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name' => 'schedule_style_accordion_tile_bg_normal',
				'label' => esc_html__( 'Background', 'evenex' ),
				'types' => [ 'classic', 'gradient'],
				'selector' => '{{WRAPPER}} .schedule-nav-tab-horizontal-style-2 .nav-link',
			]
		);


        $this->end_controls_tab();

        $this->start_controls_tab(
			'schedule_style_hover_ac_title',
			[
				'label' => esc_html__( 'Active', 'evenex' ),
			]
        );

        $this->add_responsive_control(
			'schedule_style_accordion_tile_color_active',
			[
				'label' => esc_html__( 'Title Color', 'evenex' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .schedule-nav-tab-horizontal-style-2>.nav-item>.nav-link.active .schedule-title' => 'color: {{VALUE}}',
				],
			]
		);

        $this->add_control(
			'schedule_style_accordion_tile_border_active',
			[
				'label' => esc_html__( 'Active Border Color', 'evenex' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .schedule-nav-tab-horizontal-style-2>.nav-item>.nav-link.active' => 'border-color: {{VALUE}}',
				],
			]
        );

        $this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name' => 'schedule_style_accordion_tile_bg_active',
				'label' => esc_html__( 'Background', 'evenex' ),
				'types' => [ 'classic', 'gradient'],
				'selector' => '{{WRAPPER}} .schedule-nav-tab-horizontal-style-2 .nav-link.active',
			]
		);

        $this->end_controls_tab();
        $this->end_controls_tabs();

        $this->end_controls_section();
    }

    protected function render( ) {
        $settings = $this->get_settings_for_display();

        extract($settings);

        global $post;

        $args = array(
            'post_type' 	   => 'xs-schedule',
            'suppress_filters' => false,
            'posts_per_page'   => $schedule_service_posts_day_num,
            'order' 		   => $schedule_service_posts_sort,
            'orderby'          => $schedule__posts_order_by,
            'offset'           => $schedule__offset,
        );

        if(!empty($schedule__cat)){
            $args['tax_query'] = array(
                array(
                    'taxonomy' => 'schedule_category',
                    'terms' => $schedule__cat,
                    'field' => 'id',
                )
            );
        }

        $posts = get_posts($args);
        if (is_array($posts) && !empty($posts)) {
            include EVENEX_SHORTCODE_DIR_WIDGETS.'/schedule/style/'.$schedule_style_choose_option.'.php';
        }
    }

    protected function _content_template() { }

    public function getCategories(){

        $terms = get_terms( array(
            'taxonomy'    => 'schedule_category',
            'hide_empty'  => false,
            'posts_per_page' => -1,
        ));


        $cat_list = [];
        if(is_array($terms) && '' != $terms) {
            foreach($terms as $post) {
                $cat_list[$post->term_id]  = [$post->name];
            }
        };
        return $cat_list;
    }
}

Zerion Mini Shell 1.0