Files
wingedit.pl/wp-content/plugins/restlycore/elementor-widgets/theme-button.php
2024-11-04 20:48:19 +01:00

831 lines
30 KiB
PHP

<?php namespace Elementor;
class restly_button_Widget extends Widget_Base {
public function get_name() {
return 'restly_button';
}
public function get_title() {
return esc_html__( 'Restly Button', 'restlycore' );
}
public function get_icon() {
return 'eicon-button';
}
public function get_categories() {
return ['restly'];
}
protected function register_controls() {
//Content tab start
$this->start_controls_section(
'restly_button_options',
[
'label' => esc_html__( 'Restly Button', 'restlycore' ),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'restly_button_vselect',
[
'label' => esc_html__( 'Select Style', 'restlycore' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '1',
'options' => [
'1' => esc_html__( 'Style One', 'restlycore' ),
'2' => esc_html__( 'Style Two', 'restlycore' ),
'3' => esc_html__( 'Style Three', 'restlycore' ),
],
]
);
$this->add_control(
'restly_buttons_select',
[
'label' => esc_html__( 'Select Link', 'restlycore' ),
'type' => Controls_Manager::SELECT,
'default' => 'extranal',
'options' => [
'extranal' => esc_html__( 'Extranal', 'restlycore' ),
'page' => esc_html__( 'Page', 'restlycore' ),
],
'label_block' => true,
]
);
$this->add_control(
'restly_buttons_extra',
[
'label' => esc_html__( 'Extranal Link', 'restlycore' ),
'type' => Controls_Manager::TEXT,
'dynamic' => [
'active' => true,
],
'condition' => [
'restly_buttons_select' => 'extranal',
],
'placeholder' => esc_html__( 'Add Extranal Link', 'restlycore' ),
'label_block' => true,
]
);
$this->add_control(
'restly_buttons_link',
[
'label' => esc_html__( 'Page Link', 'restlycore' ),
'type' => Controls_Manager::SELECT,
'options' => restly_page_list(),
'condition' => [
'restly_buttons_select' => 'page',
],
'label_block' => true,
]
);
$this->add_control(
'restly_buttons_text',
[
'label' => esc_html__( 'Buttn Text', 'restlycore' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'Meet With Us', 'restlycore' ),
'label_block' => true,
]
);
$this->add_control(
'restly_buttons_new_tab',
[
'label' => __( 'Open New Window?', 'restlycore' ),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __( 'Show', 'restlycore' ),
'label_off' => __( 'Hide', 'restlycore' ),
'return_value' => 'yes',
'default' => 'no',
]
);
$this->add_control(
'restly_buttons_nofollow',
[
'label' => __( 'Add nofollow ?', 'restlycore' ),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __( 'Show', 'restlycore' ),
'label_off' => __( 'Hide', 'restlycore' ),
'return_value' => 'yes',
'default' => 'no',
]
);
$this->end_controls_section();
// Style One CSS
$this->start_controls_section(
'restly_button_CSS_options',
[
'label' => esc_html__( 'Button CSS', 'restlycore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'restly_button_vselect' => '1',
],
]
);
$this->add_responsive_control(
'restly_button_CSS_aligment',
[
'label' => __( 'Alignment', 'restlycore' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => __( 'Left', 'restlycore' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => __( 'Center', 'restlycore' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => __( 'Right', 'restlycore' ),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'center',
'toggle' => true,
'selectors' => [
'{{WRAPPER}} .restly-button' => 'text-align: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'restly_button_CSS_margin',
[
'label' => esc_html__( 'Margin', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'restly_button_CSS_padding',
[
'label' => esc_html__( 'Padding', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->start_controls_tabs(
'restly_buttons_tabs'
);
$this->start_controls_tab(
'restly_buttons_tabs_normal',
[
'label' => __( 'Normal', 'restlycore' ),
'condition' => [
'restly_button_vselect' => '1',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'restly_buttons_Css_typos',
'label' => esc_html__( 'Typography', 'restlycore' ),
'selector' => '{{WRAPPER}} .restly-button a.theme-btns',
]
);
$this->add_responsive_control(
'restly_buttons_Css_ncolor',
[
'label' => esc_html__( 'Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns' => 'color: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'restly_buttons_Css_nbg',
[
'label' => esc_html__( 'Background Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns' => 'background-color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'restly_buttons_Css_nborder',
'label' => esc_html__( 'Border', 'restlycore' ),
'selector' => '{{WRAPPER}} .restly-button a.theme-btns',
]
);
$this->add_responsive_control(
'restly_buttons_Css_nradisu',
[
'label' => esc_html__( 'Border Radius', 'restlycore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 5,
],
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'restly_buttons_Css_nshadow',
'label' => esc_html__( 'Shadow', 'restlycore' ),
'selector' => '{{WRAPPER}} .restly-button a.theme-btns',
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'restly_buttons_tabs_hover',
[
'label' => __( 'Hover', 'restlycore' ),
'condition' => [
'restly_button_vselect' => '1',
],
]
);
$this->add_responsive_control(
'restly_buttons_Css_hcolor',
[
'label' => esc_html__( 'Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns:hover' => 'color: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'restly_buttons_Css_hbg',
[
'label' => esc_html__( 'Background Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns:hover' => 'background-color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'restly_buttons_Css_hborder',
'label' => esc_html__( 'Border', 'restlycore' ),
'selector' => '{{WRAPPER}} .restly-button a.theme-btns:hover',
]
);
$this->add_responsive_control(
'restly_buttons_Css_hradisu',
[
'label' => esc_html__( 'Border Radius', 'restlycore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 5,
],
'selectors' => [
'{{WRAPPER}} .restly-button a.theme-btns:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'restly_buttons_Css_hshadow',
'label' => esc_html__( 'Shadow', 'restlycore' ),
'selector' => '{{WRAPPER}} .restly-button a.theme-btns:hover',
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
// Style Two CSS
$this->start_controls_section(
'restly_button2_box_CSS_options',
[
'label' => esc_html__( 'Box CSS', 'restlycore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'restly_button_vselect' => '2',
],
]
);
$this->add_responsive_control(
'restly_button2_box_CSS_aligment',
[
'label' => __( 'Alignment', 'restlycore' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => __( 'Left', 'restlycore' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => __( 'Center', 'restlycore' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => __( 'Right', 'restlycore' ),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'center',
'toggle' => true,
'selectors' => [
'{{WRAPPER}} .restly-button' => 'text-align: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'restly_button2_box_CSS_margin',
[
'label' => esc_html__( 'Margin', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .restly-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'restly_button2_box_CSS_padding',
[
'label' => esc_html__( 'Padding', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .restly-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'restly_buttons2_CSS_options',
[
'label' => esc_html__( 'Button CSS', 'restlycore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'restly_button_vselect' => '2',
],
]
);
$this->add_responsive_control(
'restly_buttons2_CSS_margin',
[
'label' => esc_html__( 'Margin', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-one' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'restly_buttons2_CSS_padding',
[
'label' => esc_html__( 'Padding', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-one' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->start_controls_tabs(
'restly_buttons2_tabs'
);
$this->start_controls_tab(
'restly_buttons2_tabs_normal',
[
'label' => __( 'Normal', 'restlycore' ),
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'restly_buttons2_Css_typos',
'label' => esc_html__( 'Typography', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-one',
]
);
$this->add_responsive_control(
'restly_buttons2_Css_ncolor',
[
'label' => esc_html__( 'Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-one' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'restly_buttons2_Css_nbg',
'label' => esc_html__( 'Background', 'restlycore' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-one',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'restly_buttons2_Css_nborder',
'label' => esc_html__( 'Border', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-one',
]
);
$this->add_responsive_control(
'restly_buttons2_Css_nradisu',
[
'label' => esc_html__( 'Border Radius', 'restlycore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 5,
],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-one' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'restly_buttons2_Css_nshadow',
'label' => esc_html__( 'Shadow', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-one',
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'restly_buttons2_tabs_hover',
[
'label' => __( 'Hover', 'restlycore' ),
]
);
$this->add_responsive_control(
'restly_buttons2_Css_hcolor',
[
'label' => esc_html__( 'Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-one:hover' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'restly_buttons2_Css_hbg',
'label' => esc_html__( 'Background', 'restlycore' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-one:before',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'restly_buttons2_Css_hborder',
'label' => esc_html__( 'Border', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-one:hover',
]
);
$this->add_responsive_control(
'restly_buttons2_Css_hradisu',
[
'label' => esc_html__( 'Border Radius', 'restlycore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 5,
],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-one:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'restly_buttons2_Css_hshadow',
'label' => esc_html__( 'Shadow', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-one:hover',
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
/// Style Three
$this->start_controls_section(
'restly_button3_box_CSS_options',
[
'label' => esc_html__( 'Box CSS', 'restlycore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'restly_button_vselect' => '3',
],
]
);
$this->add_responsive_control(
'restly_button3_box_CSS_aligment',
[
'label' => __( 'Alignment', 'restlycore' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => __( 'Left', 'restlycore' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => __( 'Center', 'restlycore' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => __( 'Right', 'restlycore' ),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'center',
'toggle' => true,
'selectors' => [
'{{WRAPPER}} .restly-button' => 'text-align: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'restly_button3_box_CSS_margin',
[
'label' => esc_html__( 'Margin', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .restly-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'restly_button3_box_CSS_padding',
[
'label' => esc_html__( 'Padding', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .restly-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'restly_buttons3_CSS_options',
[
'label' => esc_html__( 'Button CSS', 'restlycore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'restly_button_vselect' => '3',
],
]
);
$this->add_responsive_control(
'restly_buttons3_CSS_margin',
[
'label' => esc_html__( 'Margin', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-two' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'restly_buttons3_CSS_padding',
[
'label' => esc_html__( 'Padding', 'restlycore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-two' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->start_controls_tabs(
'restly_buttons3_tabs'
);
$this->start_controls_tab(
'restly_buttons3_tabs_normal',
[
'label' => __( 'Normal', 'restlycore' ),
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'restly_buttons3_Css_typos',
'label' => esc_html__( 'Typography', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-two',
]
);
$this->add_responsive_control(
'restly_buttons3_Css_ncolor',
[
'label' => esc_html__( 'Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-two' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'restly_buttons3_Css_nbg',
'label' => esc_html__( 'Background', 'restlycore' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-two:before',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'restly_buttons3_Css_nborder',
'label' => esc_html__( 'Border', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-two',
]
);
$this->add_responsive_control(
'restly_buttons3_Css_nradisu',
[
'label' => esc_html__( 'Border Radius', 'restlycore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 5,
],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-two' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'restly_buttons3_Css_nshadow',
'label' => esc_html__( 'Shadow', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-two',
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'restly_buttons3_tabs_hover',
[
'label' => __( 'Hover', 'restlycore' ),
]
);
$this->add_responsive_control(
'restly_buttons3_Css_hcolor',
[
'label' => esc_html__( 'Color', 'restlycore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-two:hover' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'restly_buttons3_Css_hbg',
'label' => esc_html__( 'Background', 'restlycore' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-two',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'restly_buttons3_Css_hborder',
'label' => esc_html__( 'Border', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-two:hover',
]
);
$this->add_responsive_control(
'restly_buttons3_Css_hradisu',
[
'label' => esc_html__( 'Border Radius', 'restlycore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 5,
],
'selectors' => [
'{{WRAPPER}} .theme-btns.gradient-btn-two:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'restly_buttons3_Css_hshadow',
'label' => esc_html__( 'Shadow', 'restlycore' ),
'selector' => '{{WRAPPER}} .theme-btns.gradient-btn-two:hover',
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
}
//Render
protected function render() {
$settings = $this->get_settings_for_display();
if($settings['restly_buttons_select'] == 'page' ){
$link = get_page_link($settings['restly_buttons_link']);
}else{
$link = $settings['restly_buttons_extra'];
}
if( $settings['restly_button_vselect'] == '1' ){
$class = 'theme-btns';
}elseif($settings['restly_button_vselect'] == '2'){
$class = 'theme-btns gradient-btn-one';
}elseif($settings['restly_button_vselect'] == '3'){
$class = 'theme-btns gradient-btn-two';
}else{
$class = 'theme-btns';
}
ob_start();
?>
<div class="restly-button-wrapper">
<div class="restly-button">
<a href="<?php echo esc_url($link); ?>" class="<?php echo esc_attr($class); ?>" <?php if($settings['restly_buttons_new_tab'] == 'yes' ) : ?> target="_blank" <?php endif; ?> <?php if($settings['restly_buttons_nofollow'] == 'yes' ) : ?> rel="nofollow" <?php endif; ?>><?php echo esc_html($settings['restly_buttons_text']); ?></a>
</div>
</div>
<?php
echo ob_get_clean();
}
}
Plugin::instance()->widgets_manager->register( new restly_button_Widget );