403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/stirizo/wp-content/plugins/widgetkit-pro/widgets/elements/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/stirizo/wp-content/plugins/widgetkit-pro/widgets/elements/widget_post_tab.php
<?php
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;
use Elementor\Scheme_Color;
use Elementor\Group_Control_Typography;
Use Elementor\Core\Schemes\Typography;
use Elementor\Group_Control_Border;
use Elementor\Utils;
use Elementor\Controls_Stack;

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

class Widgetkit_Pro_Post_Tab extends Widget_Base
{

    public function get_name()
    {
        return 'widgetkit-pro-post-tab';
    }

    public function get_title()
    {
        return __('Post Tab', 'widgetkit-pro');
    }

    public function get_icon()
    {
        return 'eicon-nav-menu';
    }

    public function get_categories()
    {
        return ['widgetkit_pro'];
    }

    /**
	 * A list of style that the widgets is depended in
	 **/
	public function get_style_depends() {
        return [
            // 'widgetkit_bs',
            // 'animate-text',
            'widgetkit_pro_default',
        ];
    }
	/**
	 * A list of scripts that the widgets is depended in
	 **/
	public function get_script_depends() {
		return [ 
			// 'animate-text',
			'layout',
		 ];
	}

    protected function _register_controls()
    {
        /**
         * get all categories
         */
        $cat_names = array();
        $terms = get_terms( array(
            'taxonomy' => 'category',
            'hide_empty' => false,
        ) );
        foreach( $terms as $t ):
            $cat_names[$t->term_id] = $t->name;
        endforeach;

        /**
         * Layout
         */
        $this->start_controls_section(
            'section_layout',
            [
                'label' => __('Layout', 'widgetkit-pro'),
                'class' => __('Dynamic layout', 'widgetkit-pro'),
            ]
        );
            $this->add_control(
                'post_tab_layout',
                [
                    'label' => esc_html__( 'Style', 'widgetkit-pro' ),
                    'type'  => Controls_Manager::CHOOSE,
                    'default'   => 'horizontal',
                    'options' => [
                        'horizontal' => [
                            'title' => esc_html__( 'Horizontal', 'widgetkit-pro' ),
                            'icon'  => 'eicon-h-align-right',
                        ],
                        'vertical' => [
                            'title' => esc_html__( 'Vertical', 'widgetkit-pro' ),
                            'icon'  => 'eicon-v-align-bottom',
                        ],
                    ],
                ]
            );
            $this->add_control(
                'layout_title',
                [
                    'label'       => __( 'Title', 'widgetkit-pro' ),
                    'type'        => Controls_Manager::TEXT,
                    'default'     => __( 'Title Text', 'widgetkit-pro' ),
                ]
            );
            $this->add_control(
                'inner-spacing',
                [
                    'label' => __( 'Inner Spacing', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SLIDER,
                    'default' => [
                        'size' => 30
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 30,
                            'step' => 1,
                        ],
                    ],
                    'size_units' => [ 'px' ],
                    'selectors' => [
                        '{{WRAPPER}} .dynamic-layout .cat-post-list .cat-post-list-wrapper' => 'grid-gap: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
        $this->end_controls_section();

        /**
         * Queries
         */
        $this->start_controls_section(
            'post-query',
            [
                'label' => __('Queries', 'widgetkit-pro'),
                'class' => __('post-tab-query', 'widgetkit-pro'),
            ]
        );
            $this->add_control(
                'multiple_category_id',
                [
                    'label' => __( 'Select Category', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT2,
                    'default' => '',
                    'options' => $cat_names,
                    'multiple' => true,
                ]
            );
            $this->add_control(
                'number_of_post_to_show',
                [
                    'label'   => __( 'Post to Show', 'widgetkit-pro' ),
                    'type'    => Controls_Manager::NUMBER,
                    'default' => 4,
                    'min'     => -1,
                    'max'     => 100,
                    'step'    => 1,
                ]
            );
        $this->end_controls_section();
        
        /**
         * Primary Column
         */
        $this->start_controls_section(
            'post-tab-primary-column',
            [
                'label' => __('Primary Column', 'widgetkit-pro'),
                'class' => __('post-tab-query', 'widgetkit-pro'),
            ]
        );

            $this->add_control(
                'primary_thumbnail_size',
                [
                    'label'       => __( 'Thumbnail Size', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT,
                    'default' => 'large',
                    'options' => [
                        'medium'  => __( 'Medium', 'widgetkit-pro' ),
                        'medium_large'  => __( 'Medium Large', 'widgetkit-pro' ),
                        'large'  => __( 'Large', 'widgetkit-pro' ),
                        'full'  => __( 'Full', 'widgetkit-pro' ),
                    ],
                ]
            );
            $this->add_control(
                'primary_content_position',
                [
                    'label'       => __( 'Content Position', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT,
                    'default' => 'overlay',
                    'options' => [
                        'overlay'  => __( 'Overlay', 'widgetkit-pro' ),
                        'before-image'  => __( 'Title Before Image', 'widgetkit-pro' ),
                        'after-image'  => __( 'Title After Image', 'widgetkit-pro' ),
                    ],
                ]
            );
            $this->add_control(
                'primary_show_meta',
                [
                    'label' => __( 'Meta', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => 'yes',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'primary_show_excerpt',
                [
                    'label' => __( 'Excerpt', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'primary_excerpt_length',
                [
                    'label'   => __( 'Excerpt Word', 'widgetkit-pro' ),
                    'type'    => Controls_Manager::NUMBER,
                    'default' => 5,
                    'min'     => 0,
                    'max'     => 500,
                    'step'    => 1,
                    'condition' => [
                        'primary_show_excerpt' => 'yes',
                    ],
                ]
            );

        $this->end_controls_section();
        
        /**
         * Secondary Column
         */
        $this->start_controls_section(
            'post-tab-secondary-column',
            [
                'label' => __('Secondary Column', 'widgetkit-pro'),
                'class' => __('post-tab-query', 'widgetkit-pro'),
            ]
        );

            $this->add_control(
                'secondary_post_column',
                [
                    'label'       => __( 'Column', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT,
                    'default' => '1',
                    'options' => [
                        '1'  => __( '1', 'widgetkit-pro' ),
                        '2'  => __( '2', 'widgetkit-pro' ),
                        '3'  => __( '3', 'widgetkit-pro' ),
                        '4'  => __( '4', 'widgetkit-pro' ),
                    ],
                    'condition' => [
                        'post_tab_layout' => ['vertical'],
                    ],
                ]
            );
            $this->add_control(
                'secondary_image_position',
                [
                    'label'       => __( 'Image Position', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT,
                    'default' => 'horizontal',
                    'options' => [
                        'horizontal'  => __( 'Left', 'widgetkit-pro' ),
                        'vertical'  => __( 'Top', 'widgetkit-pro' ),
                    ],
                    'condition' => [
                        'post_tab_layout' => ['vertical'],
                    ],
                ]
            );
            $this->add_control(
                'secondary_thumbnail_size',
                [
                    'label'       => __( 'Thumbnail Size', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT,
                    'default' => 'large',
                    'options' => [
                        'medium'  => __( 'Medium', 'widgetkit-pro' ),
                        'medium_large'  => __( 'Medium Large', 'widgetkit-pro' ),
                        'large'  => __( 'Large', 'widgetkit-pro' ),
                        'full'  => __( 'Full', 'widgetkit-pro' ),
                    ],
                ]
            );
            $this->add_control(
                'secondary_show_meta',
                [
                    'label' => __( 'Meta', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => 'yes',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                    'separator' => 'before',
                ]
            );
            $this->add_control(
                'secondary_show_excerpt',
                [
                    'label' => __( 'Excerpt', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => 'yes',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'secondary_excerpt_length',
                [
                    'label'   => __( 'Excerpt Word', 'widgetkit-pro' ),
                    'type'    => Controls_Manager::NUMBER,
                    'default' => 10,
                    'min'     => 0,
                    'max'     => 500,
                    'step'    => 1,
                    'condition' => [
                        'secondary_show_excerpt' => 'yes',
                    ],
                ]
            );

        $this->end_controls_section();

        /**
         * Style tab
         * =============
         */

        /**
         * Header
         */
        $this->start_controls_section(
            'section_style',
            [
                'label' => __( 'Header', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'label' => __( 'Typography', 'widgetkit-pro' ),
                'name' => 'header_typography',
                'selector' => '{{WRAPPER}} #dynamic-category .dynamic-category-wrapper .dynamic-layout-header h4',
            ]
        );
        $this->add_control(
            'header_color',
            [
                'label' => __( 'Color', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .dynamic-layout-header h4' => 'color: {{VALUE}}',
                    
                ],
            ]
        );
        $this->end_controls_section();


        /**
         * Navigation
         */
        $this->start_controls_section(
            'navigation_style',
            [
                'label' => __( 'Navigation', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
            $this->add_control(
                'nav_tab_show',
                [
                    'label' => __( 'Show', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => 'yes',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            
            $this->start_controls_tabs( 'tabs_button_style' );
                /**
                 * Normal style
                 */
                $this->start_controls_tab(
                    'navigation-style-normal',
                    [
                        'label' => __('Normal', 'widgetkit-pro'),
                    ]
                );
                    $this->add_group_control(
                        Group_Control_Typography::get_type(),
                        [
                            'label' => __( 'Typography', 'widgetkit-pro' ),
                            'name' => 'navigation_typography',
                            'selector' => '{{WRAPPER}} #dynamic-category .multiple-cat a.cat-item',
                        ]
                    );
                    $this->add_control(
                        'navigation_color',
                        [
                            'label' => __( 'Color', 'widgetkit-pro' ),
                            'type' => Controls_Manager::COLOR,
                            'selectors' => [
                                '{{WRAPPER}} #dynamic-category .multiple-cat a.cat-item' => 'color: {{VALUE}}',
                            ],
                        ]
                    );
                    // $this->add_control(
                    //     'navigation_border_color',
                    //     [
                    //         'label' => __( 'Border Color', 'widgetkit-pro' ),
                    //         'type' => Controls_Manager::COLOR,
                    //         'selectors' => [
                    //             '{{WRAPPER}} #dynamic-category .multiple-cat a.cat-item' => 'border-color: {{VALUE}}',
                    //         ],
                    //     ]
                    // );
                $this->end_controls_tab();
                /**
                 * Active Style
                 */
                $this->start_controls_tab(
                    'navigation-style-active',
                    [
                        'label' => __('Active', 'widgetkit-pro'),
                    ]
                );
                    $this->add_control(
                        'navigation_hover_color',
                        [
                            'label' => __( 'Color', 'widgetkit-pro' ),
                            'type' => Controls_Manager::COLOR,
                            'selectors' => [
                                '{{WRAPPER}} #dynamic-category .multiple-cat a.cat-item:hover' => 'color: {{VALUE}}',
                                '{{WRAPPER}} #dynamic-category .multiple-cat a.cat-item.active' => 'color: {{VALUE}}',
                                '{{WRAPPER}} #dynamic-category .multiple-cat a.cat-item.active:after' => 'background: {{VALUE}}',
                            ],
                        ]
                    );
                $this->end_controls_tab();

            $this->end_controls_tabs();

        $this->end_controls_section();
        
        /**
         * Primary Column
         */
        $this->start_controls_section(
            'primary_column_style',
            [
                'label' => __( 'Primary Column', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
            $this->add_control(
                'primary-image-spacing-bottom',
                [
                    'label' => __( 'Image Spacing', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SLIDER,
                    'range' => [
                        'px' => [
                            'min' => -50,
                            'max' => 100,
                            'step' => 1,
                        ],
                    ],
                    'size_units' => [ 'px' ],
                    'selectors' => [
                        '{{WRAPPER}} .featured-post .post-thumb' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                    ],
                    'condition' => [
                        'primary_content_position' => ['before-image', 'after-image']
                    ]
                ]
            );
            $this->start_controls_tabs( 'primary_column_title_style' );
                /**
                 * Normal Tab
                 */
                $this->start_controls_tab(
                    'primary-title-style-normal',
                    [
                        'label' => __('Normal', 'widgetkit-pro'),
                    ]
                );
                $this->add_group_control(
                    Group_Control_Typography::get_type(),
                    [
                        'label' => __( 'Title Typography', 'widgetkit-pro' ),
                        'name' => 'primary_title_typography',
                        'selector' => '{{WRAPPER}} #dynamic-layout .featured-post h3',
                    ]
                );
                $this->add_control(
                    'primary_title_color',
                    [
                        'label' => __( 'Title Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} #dynamic-layout .featured-post h3' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'primary-title-spacing-bottom',
                    [
                        'label' => __( 'Title Spacing', 'widgetkit-pro' ),
                        'type' => Controls_Manager::SLIDER,
                        'range' => [
                            'px' => [
                                'min' => -50,
                                'max' => 100,
                                'step' => 1,
                            ],
                        ],
                        'size_units' => [ 'px' ],
                        'selectors' => [
                            '{{WRAPPER}} .featured-post h3' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->add_control(
                    'meta_hr',
                    [
                        'type' => \Elementor\Controls_Manager::DIVIDER,
                    ]
                );
                $this->add_group_control(
                    Group_Control_Typography::get_type(),
                    [
                        'label' => __( 'Meta Typography', 'widgetkit-pro' ),
                        'name' => 'primary_meta_typography',
                        'selector' => '{{WRAPPER}} #dynamic-layout .featured-post .wkp-post-meta',
                    ]
                );
                $this->add_control(
                    'primary_meta_color',
                    [
                        'label' => __( 'Meta Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} #dynamic-layout .featured-post .wkp-post-meta' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'primary-meta-spacing-bottom',
                    [
                        'label' => __( 'Meta Spacing', 'widgetkit-pro' ),
                        'type' => Controls_Manager::SLIDER,
                        'range' => [
                            'px' => [
                                'min' => -50,
                                'max' => 100,
                                'step' => 1,
                            ],
                        ],
                        'size_units' => [ 'px' ],
                        'selectors' => [
                            '{{WRAPPER}} .featured-post .wkp-post-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->add_control(
                    'excerpt_hr',
                    [
                        'type' => \Elementor\Controls_Manager::DIVIDER,
                    ]
                );
                $this->add_group_control(
                    Group_Control_Typography::get_type(),
                    [
                        'label' => __( 'Excerpt Typography', 'widgetkit-pro' ),
                        'name' => 'primary_excerpt_typography',
                        'selector' => '{{WRAPPER}} #dynamic-layout .featured-post .post-excerpt',
                        'separator'     => 'before',
                    ]
                );
                $this->add_control(
                    'primary_excerpt_color',
                    [
                        'label' => __( 'Excerpt Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} #dynamic-layout .featured-post .post-excerpt' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'primary-excerpt-spacing-bottom',
                    [
                        'label' => __( 'Excerpt Spacing', 'widgetkit-pro' ),
                        'type' => Controls_Manager::SLIDER,
                        'range' => [
                            'px' => [
                                'min' => -50,
                                'max' => 100,
                                'step' => 1,
                            ],
                        ],
                        'size_units' => [ 'px' ],
                        'selectors' => [
                            '{{WRAPPER}} .featured-post .post-excerpt' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->end_controls_tab();

                /**
                 * Hover tab
                 */
                $this->start_controls_tab(
                    'primary-title-style-hover',
                    [
                        'label' => __('Hover', 'widgetkit-pro'),
                    ]
                );
                $this->add_control(
                    'primary_title_hover_color',
                    [
                        'label' => __( 'Title Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} .dynamic-cat-post-list .featured-post:hover h3' => 'color: {{VALUE}} !important',
                        ],
                    ]
                );
                $this->end_controls_tab();

            $this->end_controls_tabs();

        $this->end_controls_section();

        /**
         * Secondary Column
         */
        $this->start_controls_section(
            'secondary_column_style',
            [
                'label' => __( 'Secondary Column', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
            $this->start_controls_tabs( 'secondary_column_title_style' );
                /**
                 * Normal Tab
                 */
                $this->start_controls_tab(
                    'secondary-title-style-normal',
                    [
                        'label' => __('Normal', 'widgetkit-pro'),
                    ]
                );
                $this->add_group_control(
                    Group_Control_Typography::get_type(),
                    [
                        'label' => __( 'Typography', 'widgetkit-pro' ),
                        'name' => 'secondary_title_typography',
                        'selector' => '{{WRAPPER}} #dynamic-layout .regular-post .post-title a h3',
                    ]
                );
                $this->add_control(
                    'secondary_title_color',
                    [
                        'label' => __( 'Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} #dynamic-layout .regular-post .post-title a h3' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'secondary-title-spacing-bottom',
                    [
                        'label' => __( 'Title Spacing', 'widgetkit-pro' ),
                        'type' => Controls_Manager::SLIDER,
                        'range' => [
                            'px' => [
                                'min' => -50,
                                'max' => 100,
                                'step' => 1,
                            ],
                        ],
                        'size_units' => [ 'px' ],
                        'selectors' => [
                            '{{WRAPPER}} .regular-post .post-title a h3' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->add_control(
                    'secondary_meta_hr',
                    [
                        'type' => \Elementor\Controls_Manager::DIVIDER,
                    ]
                );
    
                $this->add_group_control(
                    Group_Control_Typography::get_type(),
                    [
                        'label' => __( 'Meta Typography', 'widgetkit-pro' ),
                        'name' => 'secondary_meta_typography',
                        'selector' => '{{WRAPPER}} #dynamic-layout .regular-post .wkp-post-meta',
                    ]
                );

                $this->add_control(
                    'secondary_meta_color',
                    [
                        'label' => __( 'Meta Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} #dynamic-layout .regular-post .wkp-post-meta' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'secondary-meta-spacing-bottom',
                    [
                        'label' => __( 'Meta Spacing', 'widgetkit-pro' ),
                        'type' => Controls_Manager::SLIDER,
                        'range' => [
                            'px' => [
                                'min' => -50,
                                'max' => 100,
                                'step' => 1,
                            ],
                        ],
                        'size_units' => [ 'px' ],
                        'selectors' => [
                            '{{WRAPPER}} .regular-post .wkp-post-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->add_control(
                    'secondary_excerpt_hr',
                    [
                        'type' => \Elementor\Controls_Manager::DIVIDER,
                    ]
                );
                $this->add_group_control(
                    Group_Control_Typography::get_type(),
                    [
                        'label' => __( 'Excerpt Typography', 'widgetkit-pro' ),
                        'name' => 'secondary_excerpt_typography',
                        'selector' => '{{WRAPPER}} #dynamic-layout .regular-post .post-excerpt',
                        'separator'     => 'before',
                    ]
                );
                $this->add_control(
                    'secondary_excerpt_color',
                    [
                        'label' => __( 'Excerpt Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} #dynamic-layout .regular-post .post-excerpt' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'secondary-excerpt-spacing-bottom',
                    [
                        'label' => __( 'Excerpt Spacing', 'widgetkit-pro' ),
                        'type' => Controls_Manager::SLIDER,
                        'range' => [
                            'px' => [
                                'min' => -50,
                                'max' => 100,
                                'step' => 1,
                            ],
                        ],
                        'size_units' => [ 'px' ],
                        'selectors' => [
                            '{{WRAPPER}} .regular-post .post-excerpt' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->add_control(
                    'secondary_content_box_padding',
                    [
                    'label' => __( 'Content Box', 'widgetkit-pro' ),
                    'type' => Controls_Manager::HEADING,
                    'separator' => 'before',
                    ]
                );
                $this->add_responsive_control(
                    'content_box_padding',
                    [
                        'label' => esc_html__( 'Padding', 'widgetkit-pro' ),
                        'type'  => Controls_Manager::DIMENSIONS,
                        'size_units' => [ 'px' ],
                        'selectors'  => [
                            '{{WRAPPER}} .regular-post .post-data' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                        ],
                    ]
                );
                $this->end_controls_tab();

                /**
                 * Hover Tab
                 */
                $this->start_controls_tab(
                    'secondary-title-style-hover',
                    [
                        'label' => __('Hover', 'widgetkit-pro'),
                    ]
                );
                $this->add_control(
                    'secondary_title_hover_color',
                    [
                        'label' => __( 'Title Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} #dynamic-layout .regular-post .post-title a:hover h3' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->end_controls_tab();

            $this->end_controls_tabs();

        $this->end_controls_section();

        /**
         * Seperator and Overlay
         */
        $this->start_controls_section(
            'seperator_overlay_style',
            [
                'label' => __( 'Seperator & Overlay', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
            $this->add_control(
                'seperator_color',
                [
                    'label' => __( 'Seperator Color', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} .dynamic-category-wrapper' => 'border-bottom:solid 1px {{VALUE}} !important',
                    ],
                ]
            );
            $this->add_control(
                'featured_image_overlay',
                [
                    'label' => __( 'Primary Image Overlay', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} .dynamic-layout .featured-style-overlay .featured-post .post-thumb a:before' => 'background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), {{VALUE}})',
                    ],
                    'condition' => [
                        'primary_content_position' => 'overlay',
                    ],
                ]
            );
            $this->add_control(
                'overlay_color',
                [
                    'label' => __( 'Ajax Overlay Color', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} .dynamic-cat-post-list .ajax-content' => 'background-color: {{VALUE}}',
                    ],
                ]
            );
            $this->add_control(
                'indicator_color',
                [
                    'label' => __( 'Indicator Color', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} .dynamic-cat-post-list .ajax-content .lds-ellipsis div' => 'background: {{VALUE}}',
                    ],
                ]
            );

        $this->end_controls_section();

    }


    protected function render()
    {
        
        ?>

        <div id="dynamic-category-content-<?php echo $this->get_id(); ?>" class="dynamic-category-content-<?php echo $this->get_id(); ?>">
            <?php include( plugin_dir_path( __FILE__ ) . '../layout/post-tab.php'); ?>
            <!-- <h2>Hello Post Tab</h2> -->
        </div>

    <?php
    }

    protected function content_template()
    {
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit