/home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets
Edit: /home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets/slider2-widget.php (37782B)
start_controls_section(
'pylon_slider2_options',
[
'label' => esc_html__( 'Pylon Slider', 'pyloncore' ),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'pylon_slider2__style',
[
'label' => esc_html__('Choose Slider2 Style'),
'type' =>\Elementor\Controls_Manager::SELECT,
'default' => 'one',
'options' =>[
'one' => esc_html__('Style One','pyloncore'),
'two' => esc_html__('Style Two','pyloncore'),
],
],
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'pylon_slider2_image',
[
'label' => esc_html__( 'Choose Image', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
]
);
$repeater->add_control(
'pylon_slider2_heading',
[
'label' => esc_html__( 'Heading', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => wp_kses_post( 'Providing You
a Financial
Power', 'pyloncore' ),
'placeholder' => esc_html__( 'Type your heading here', 'pyloncore' ),
]
);
$repeater->add_control(
'pylon_slider2_list_icon',
[
'label' => esc_html__( 'Icon', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::ICONS,
'default' => [
'value' => 'fa fa-check-circle',
],
]
);
$repeater->add_control(
'pylon_slider2_list_text_one',
[
'label' => esc_html__( 'List Text One', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( 'Quick Payment Process', 'pyloncore' ),
'placeholder' => esc_html__( 'Type your list text here', 'pyloncore' ),
]
);
$repeater->add_control(
'pylon_slider2_list_text_two',
[
'label' => esc_html__( 'List Text Two', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( 'No Prepayment Fees', 'pyloncore' ),
'placeholder' => esc_html__( 'Type your list text here', 'pyloncore' ),
]
);
$repeater->add_control(
'pylon_slider2_button_text',
[
'label' => esc_html__( 'Button One Text', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( 'Apply For Loan', 'pyloncore' ),
'placeholder' => esc_html__( 'Type your heading here', 'pyloncore' ),
]
);
$repeater->add_control(
'pylon_slider2_btn_enable',
[
'label' => esc_html__( 'Slider2 btn', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Show', 'pyloncore' ),
'label_off' => esc_html__( 'Hide', 'pyloncore' ),
'return_value' => 'yes',
'default' => 'yes',
]
);
$repeater->add_control(
'pylon_slider2_btn_links',
[
'label' => esc_html__( 'Select Link', 'pyloncore' ),
'type' => Controls_Manager::SELECT,
'default' => 'extranal',
'options' => [
'extranal' => esc_html__( 'Extranal', 'pyloncore' ),
'page' => esc_html__( 'Page', 'pyloncore' ),
],
'label_block' => true,
'condition' => [
'pylon_slider2_btn_enable' => 'yes',
],
]
);
$repeater->add_control(
'pylon_slider2_extral',
[
'label' => esc_html__( 'Extranal Link', 'pyloncore' ),
'type' => Controls_Manager::URL,
'placeholder' => esc_html__( 'Add Extranal Link', 'pyloncore' ),
'label_block' => true,
'condition' => [
'pylon_slider2_btn_links' => 'extranal',
'pylon_slider2_btn_enable' => 'yes',
],
]
);
$repeater->add_control(
'pylon_slider2_page_link',
[
'label' => esc_html__( 'Page Link', 'pyloncore' ),
'type' => Controls_Manager::SELECT,
'options' => pylon_page_list(),
'label_block' => true,
'condition' => [
'pylon_slider2_btn_links' => 'page',
'pylon_slider2_btn_enable' => 'yes',
],
]
);
$repeater->add_control(
'pylon_slider2_btn2_enable',
[
'label' => esc_html__( 'Show Btn', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Show', 'pyloncore' ),
'label_off' => esc_html__( 'Hide', 'pyloncore' ),
'return_value' => 'yes',
'default' => 'no',
]
);
$repeater->add_control(
'pylon_slider2_button_two_text',
[
'label' => esc_html__( 'Button Two Text', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( 'Contact Now', 'pyloncore' ),
'placeholder' => esc_html__( 'Type your Button Text here', 'pyloncore' ),
'condition' => [
'pylon_slider2_btn2_enable' => 'yes',
],
]
);
$repeater->add_control(
'pylon_slider2_btn_two_links',
[
'label' => esc_html__( 'Select Link', 'pyloncore' ),
'type' => Controls_Manager::SELECT,
'default' => 'extranal',
'options' => [
'extranal' => esc_html__( 'Extranal', 'pyloncore' ),
'page' => esc_html__( 'Page', 'pyloncore' ),
],
'label_block' => true,
'condition' => [
'pylon_slider2_btn2_enable' => 'yes',
],
]
);
$repeater->add_control(
'pylon_slider2_two_extral',
[
'label' => esc_html__( 'Extranal Link', 'pyloncore' ),
'type' => Controls_Manager::URL,
'placeholder' => esc_html__( 'Add Extranal Link', 'pyloncore' ),
'label_block' => true,
'condition' => [
'pylon_slider2_btn_two_links' => 'extranal',
'pylon_slider2_btn2_enable' => 'yes',
],
]
);
$repeater->add_control(
'pylon_slider2_page_two_link',
[
'label' => esc_html__( 'Page Link', 'pyloncore' ),
'type' => Controls_Manager::SELECT,
'options' => pylon_page_list(),
'label_block' => true,
'condition' => [
'pylon_slider2_btn_two_links' => 'page',
'pylon_slider2_btn2_enable' => 'yes',
],
]
);
$this->add_control(
'pylon_slider2',
[
'label' => esc_html__( 'Slider List', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
]
);
$this->add_control(
'pylon_slider2_shape1_image',
[
'label' => esc_html__( 'Choose Image', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'pylon_slider2__style' => 'one',
],
]
);
$this->add_control(
'pylon_slider2_shape2_image',
[
'label' => esc_html__( 'Choose Image', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'pylon_slider2__style' => 'one',
],
]
);
$this->add_control(
'pylon_slider2_shape3_image',
[
'label' => esc_html__( 'Choose Image', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'pylon_slider2__style' => 'one',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'pylon_slider2_content_style',
[
'label' => esc_html__( 'Title', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'pylon_slider2_title_typo',
'label' => esc_html__( 'Title Typography', 'pyloncore' ),
'selector' => '{{WRAPPER}} .main-slider-four__content .title h2,{{WRAPPER}} .main-slider-five__content .title h2',
]
);
$this->add_responsive_control(
'pylon_slider2_title_color',
[
'label' => esc_html__( 'Title Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .main-slider-four__content .title h2,{{WRAPPER}} .main-slider-five__content .title h2' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'pylon_slider2_title_border',
'label' => esc_html__('Title Border', 'pyloncore'),
'selector' => '{{WRAPPER}} .main-slider-four__content .title h2,{{WRAPPER}} .main-slider-five__content .title h2',
]
);
$this->add_responsive_control(
'pylon_slider2_title_margin',
[
'label' => esc_html__( 'Margin', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .main-slider-four__content .title h2,{{WRAPPER}} .main-slider-five__content .title h2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'separator' => 'before',
]
);
$this->add_responsive_control(
'pylon_slider2_title_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .main-slider-four__content .title h2,{{WRAPPER}} .main-slider-five__content .title h2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'separator' => 'before',
]
);
$this->end_controls_section();
$this->start_controls_section(
'pylon_slider2_buttons_style',
[
'label' => esc_html__( 'Button', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'pylon_slider2_button_typo',
'label' => esc_html__( 'Title Typography', 'pyloncore' ),
'selector' => '{{WRAPPER}} .thm-btn2',
]
);
$this->add_responsive_control(
'pylon_slider2_button_margin',
[
'label' => esc_html__( 'Margin', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .thm-btn2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'separator' => 'before',
]
);
$this->add_responsive_control(
'pylon_slider2_button_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'default' => [
'top' => '0',
'right' => '50',
'bottom' => '0',
'left' => '50',
'isLinked' => true,
],
'selectors' => [
'{{WRAPPER}} .thm-btn2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'separator' => 'before',
]
);
$this->start_controls_tabs(
'pylon_slider2_button_tabs'
);
$this->start_controls_tab(
'pylon_slider2_button_n_tab',
[
'label' => esc_html__( 'Normal', 'pyloncore' ),
]
);
$this->add_responsive_control(
'pylon_slider2_button_n_color',
[
'label' => esc_html__( 'Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .thm-btn2' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'pylon_slider2_button_n_bg',
'label' => esc_html__( 'Background', 'pyloncore' ),
'types' => ['classic', 'gradient'],
'selector' => '{{WRAPPER}} .thm-btn2',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'pylon_slider2_button_n_border',
'label' => esc_html__( 'Border', 'pyloncore' ),
'selector' => '{{WRAPPER}} .thm-btn2',
]
);
$this->add_responsive_control(
'pylon_slider2_button_n_border_radius',
[
'label' => esc_html__( 'Border Radius', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'size' => 0,
],
'selectors' => [
'{{WRAPPER}} .thm-btn2' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'pylon_slider2_button_n_box_shadow',
'label' => esc_html__( 'Box Shadow', 'pyloncore' ),
'selector' => '{{WRAPPER}} .thm-btn2',
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'pylon_slider2_button_h_tab',
[
'label' => esc_html__( 'Before', 'pyloncore' ),
]
);
$this->add_responsive_control(
'pylon_slider2_button_h_color',
[
'label' => esc_html__( 'Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .thm-btn2:before' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'pylon_slider2_button_h_bg',
'label' => esc_html__( 'Background', 'pyloncore' ),
'types' => ['classic', 'gradient'],
'selector' => '{{WRAPPER}} .thm-btn2:before',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'pylon_slider2_button_h_border',
'label' => esc_html__( 'Border', 'pyloncore' ),
'selector' => '{{WRAPPER}} .thm-btn2:before',
]
);
$this->add_responsive_control(
'pylon_slider2_button_h_border_radius',
[
'label' => esc_html__( 'Border Radius', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'size' => 0,
],
'selectors' => [
'{{WRAPPER}} .thm-btn2:before' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'pylon_slider2_button_h_box_shadow',
'label' => esc_html__( 'Box Shadow', 'pyloncore' ),
'selector' => '{{WRAPPER}} .thm-btn2:before',
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
$this->start_controls_section(
'pylon_slider2_buttons_two_style',
[
'label' => esc_html__( 'Button Two', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'pylon_slider2__style' => 'two',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'pylon_slider2_buttons_two_typo',
'label' => esc_html__( 'Title Typography', 'pyloncore' ),
'selector' => '{{WRAPPER}} .btn2',
]
);
$this->add_responsive_control(
'pylon_slider2_buttons_two_margin',
[
'label' => esc_html__( 'Margin', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .btn2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'separator' => 'before',
]
);
$this->add_responsive_control(
'pylon_slider2_buttons_two_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'default' => [
'top' => '0',
'right' => '50',
'bottom' => '0',
'left' => '50',
'isLinked' => true,
],
'selectors' => [
'{{WRAPPER}} .btn2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'separator' => 'before',
]
);
$this->start_controls_tabs(
'pylon_slider2_buttons_two_tabs'
);
$this->start_controls_tab(
'pylon_slider2_buttons_two_n_tab',
[
'label' => esc_html__( 'Normal', 'pyloncore' ),
]
);
$this->add_responsive_control(
'pylon_slider2_buttons_two_n_color',
[
'label' => esc_html__( 'Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .btn2' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'pylon_slider2_buttons_two_n_bg',
'label' => esc_html__( 'Background', 'pyloncore' ),
'types' => ['classic', 'gradient'],
'selector' => '{{WRAPPER}} .btn2',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'pylon_slider2_buttons_two_n_border',
'label' => esc_html__( 'Border', 'pyloncore' ),
'selector' => '{{WRAPPER}} .btn2',
]
);
$this->add_responsive_control(
'pylon_slider2_buttons_two_n_border_radius',
[
'label' => esc_html__( 'Border Radius', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'size' => 0,
],
'selectors' => [
'{{WRAPPER}} .btn2' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'pylon_slider2_buttons_two_n_box_shadow',
'label' => esc_html__( 'Box Shadow', 'pyloncore' ),
'selector' => '{{WRAPPER}} .btn2',
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'pylon_slider2_buttons_two_h_tab',
[
'label' => esc_html__( 'Before', 'pyloncore' ),
]
);
$this->add_responsive_control(
'pylon_slider2_buttons_two_h_color',
[
'label' => esc_html__( 'Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .thm-btn2:before' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'pylon_slider2_buttons_two_h_bg',
'label' => esc_html__( 'Background', 'pyloncore' ),
'types' => ['classic', 'gradient'],
'selector' => '{{WRAPPER}} .thm-btn2:before',
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'pylon_slider2_buttons_two_h_border',
'label' => esc_html__( 'Border', 'pyloncore' ),
'selector' => '{{WRAPPER}} .thm-btn2:before',
]
);
$this->add_responsive_control(
'pylon_slider2_buttons_two_h_border_radius',
[
'label' => esc_html__( 'Border Radius', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'size' => 0,
],
'selectors' => [
'{{WRAPPER}} .thm-btn2:before' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'pylon_slider2_buttons_two_h_box_shadow',
'label' => esc_html__( 'Box Shadow', 'pyloncore' ),
'selector' => '{{WRAPPER}} .thm-btn2:before',
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
$this->start_controls_section(
'pylon_slider2_list_style',
[
'label' => esc_html__( 'list Text', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'pylon_slider2__style' => 'two',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'pylon_slider2_list_text_typography',
'selector' => '{{WRAPPER}} .main-slider-five__content-list li p',
]
);
$this->add_control(
'pylon_slider2_list_text_color',
[
'label' => esc_html__( 'Text Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .main-slider-five__content-list li p' => 'color: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'pylon_slider2_list_text_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .main-slider-five__content-list li p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'pylon_slider2_list_icon_style',
[
'label' => esc_html__( 'list Icon', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'pylon_slider2__style' => 'two',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'pylon_slider2_list_icon_typography',
'selector' => '{{WRAPPER}} .main-slider-five__content-list li p span::before',
]
);
$this->add_control(
'pylon_slider2_list_icon_color',
[
'label' => esc_html__( 'Text Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .main-slider-five__content-list li p span::before' => 'color: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'pylon_slider2_list_icon_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .main-slider-five__content-list li p span::before' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
if ( ! empty( $settings['pylon_slider2_button_link']['url'] ) ) {
$this->add_link_attributes( 'pylon_slider2_button_link', $settings['pylon_slider2_button_link'] );
}
if($settings['pylon_slider2__style'] == 'one'){ ?>
widgets_manager->register_widget_type( new Pylon_Slider_Two_Widget );