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/Button.php

<?php

namespace Layerdrops\Zeinet\Widgets;


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

    public function get_title()
    {
        return __('Button', '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'),
                ]
            ]
        );


        $this->end_controls_section();

        $this->start_controls_section(
            'content_section',
            [
                'label' => __('Content', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition' => [
                    'layout_type' => ['layout_one', 'layout_two']
                ]
            ]
        );


        $this->add_control(
            'button_label',
            [
                'label' => __('Button Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Discover more', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'button_url',
            [
                'label' => __('Button Url', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::URL,
                'placeholder' => __('#', 'zeinet-addon'),
                'show_external' => false,
                'default' => [
                    'url' => '#',
                    'is_external' => false,
                    'nofollow' => true,
                ],
                'show_label' => false,
            ]
        );

        $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, 'Button', '{{WRAPPER}} .thm-btn.feature-three__btn, {{WRAPPER}} .thm-btn.service-details__btn', ['layout_one', 'layout_two']);
        zeinet_typo_and_color_options($this, 'Button Background', '{{WRAPPER}} .thm-btn.feature-three__btn, {{WRAPPER}} .thm-btn.service-details__btn', ['layout_one', 'layout_two'], 'background-color', false);

        $this->end_controls_section();
    }

    protected function render()
    {
        $settings = $this->get_settings_for_display();
        include zeinet_get_template('button-one.php');
    }
}