Your IP : 216.73.216.0


Current Path : /home/goldnueh/netsetsolution.com/wp-content/plugins/zeinet-addon/includes/Widgets/
Upload File :
Current File : /home/goldnueh/netsetsolution.com/wp-content/plugins/zeinet-addon/includes/Widgets/Movie.php

<?php

namespace Layerdrops\Zeinet\Widgets;


class Movie extends \Elementor\Widget_Base
{
    public function get_name()
    {
        return 'zeinet-movie';
    }

    public function get_title()
    {
        return __('Movie', 'zeinet-addon');
    }

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

    public function get_categories()
    {
        return ['zeinet-category'];
    }

    protected function register_controls()
    {
        $this->start_controls_section(
            'layout_section',
            [
                'label' => __('Layout', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'layout_type',
            [
                'label' => __('Select Layout', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SELECT2,
                'default' => 'layout_one',
                'options' => [
                    'layout_one' => __('Layout One', 'zeinet-addon'),
                    'layout_two' => __('Layout Two', 'zeinet-addon'),
                    'layout_three' => __('Layout Three', 'zeinet-addon'),
                    'layout_four' => __('Layout Four', 'zeinet-addon'),
                    'layout_five' => __('Layout Five', 'zeinet-addon'),
                ]
            ]
        );


        $this->add_control(
            'sec_title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXTAREA,
                'placeholder' => __('Add Title', 'zeinet-addon'),
                'default' => __('Default Title', 'zeinet-addon'),
                'condition' => [
                    'layout_type' => ['layout_one', 'layout_two', 'layout_three', 'layout_four', 'layout_five']
                ]
            ]
        );

        $this->add_control(
            'sec_sub_title',
            [
                'label' => __('Sub Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXTAREA,
                'placeholder' => __('Add Sub Title', 'zeinet-addon'),
                'default' => __('Default Sub Title', 'zeinet-addon'),
                'condition' => [
                    'layout_type' => ['layout_one', 'layout_two', 'layout_three', 'layout_four', 'layout_five']
                ]
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'content_section',
            [
                'label' => __('Post Options', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );


        $this->add_control(
            'post_count',
            [
                'label' => __('Number Of Posts', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => ['count'],
                'range' => [
                    'count' => [
                        'min' => 0,
                        'max' => 15,
                        'step' => 1,
                    ],
                ],
                'default' => [
                    'unit' => 'count',
                    'size' => 6,
                ],
            ]
        );

        $this->add_control(
            'select_category',
            [
                'label' => __('Select Category', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SELECT2,
                'options' => zeinet_get_taxonoy('movie_cat'),
                'condition' => [
                    'layout_type' => ['layout_one', 'layout_two', 'layout_three']
                ]
            ]
        );

        $this->add_control(
            'select_category_filter',
            [
                'label' => __('Select Category', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SELECT2,
                'options' => zeinet_get_taxonoy('movie_cat'),
                'multiple' => true,
                'condition' => [
                    'layout_type' =>  'layout_four'
                ]
            ]
        );

        $this->add_control(
            'query_order',
            [
                'label' => __('Select Order', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SELECT2,
                'default' => 'DESC',
                'options' => [
                    'DESC' => __('DESC', 'zeinet-addon'),
                    'ASC' => __('ASC', 'zeinet-addon'),
                ]
            ]
        );

        $this->add_control(
            'select_post',
            [
                'label'       => esc_html__('Select Left Post', 'oxpins-addon'),
                'label_block' => true,
                'type'        => \Elementor\Controls_Manager::SELECT,
                'options'     => zeinet_post_query('movie'),
                'condition' => [
                    'layout_type' => 'layout_four'
                ]
            ]
        );


        $this->end_controls_section();

        $this->start_controls_section(
            'bg_section',
            [
                'label' => __('Background ', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition' => [
                    'layout_type' => ['layout_one', 'layout_three', 'layout_four', 'layout_five']
                ]
            ]
        );

        $this->add_control(
            'bg_image',
            [
                'label' => __('Background Image', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [],
            ]
        );

        $this->add_control(
            'bg_image_two',
            [
                'label' => __('Background Image', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [],
                'condition' => [
                    'layout_type' =>  'layout_three'
                ]
            ]
        );

        $this->add_control(
            'bg_color',
            [
                'label' => __('Background Color', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .all-time-hit' => 'background-color: {{VALUE}}',
                ],
                'condition' => [
                    'layout_type' => 'layout_one'
                ]
            ]
        );

        $this->end_controls_section();


        //General style
        $this->start_controls_section(
            'general_style',
            [
                'label' => esc_html__('Style Options', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

        zeinet_typo_and_color_options($this, 'Section Title', '{{WRAPPER}} .section-title__title', ['layout_one', 'layout_two', 'layout_three', 'layout_four', 'layout_five']);
        zeinet_typo_and_color_options($this, 'Section Sub Title', '{{WRAPPER}} .section-title__tagline', ['layout_one', 'layout_two', 'layout_three', 'layout_four', 'layout_five']);

        zeinet_typo_and_color_options($this, 'Title', '{{WRAPPER}} .all-time-hit__title a,{{WRAPPER}} .all-time-hit-two__title a,{{WRAPPER}} .all-time-hit-two__title a,{{WRAPPER}} .entertainment__hover-title a', ['layout_one', 'layout_two', 'layout_three', 'layout_four', 'layout_five']);

        zeinet_typo_and_color_options($this, 'Summary', '{{WRAPPER}} .feature-two__text-two', ['layout_three']);

        $this->end_controls_section();

        zeinet_get_elementor_carousel_options($this, ['layout_three']);
    }

    protected function render()
    {
        $settings = $this->get_settings_for_display();
        include zeinet_get_template('movie-one.php');
        include zeinet_get_template('movie-two.php');
        include zeinet_get_template('movie-three.php');
        include zeinet_get_template('movie-four.php');
        include zeinet_get_template('movie-five.php');
    }
}