/home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets
Edit: /home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets/banner-widget.php (20414B)
start_controls_section(
'pylon_banner_options',
[
'label' => esc_html__( 'Pylon Banner', 'pyloncore' ),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'pylon_banner_image',
[
'label' => esc_html__( 'Choose Image', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
]
);
$this->add_control(
'pylon_banner_icon',
[
'label' => esc_html__( 'Icon', 'text-pyloncore' ),
'type' => \Elementor\Controls_Manager::ICONS,
'default' => [
'value' => 'pylon-icon-tech-support',
],
]
);
$this->add_control(
'pylon_banner_title',
[
'label' => esc_html__( 'Title', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( '92 666 888 0000', 'pyloncore' ),
]
);
$this->add_control(
'pylon_banner_dec',
[
'label' => esc_html__( 'Description', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => esc_html__( 'Lorem ipsum is simply free text used by copytyping porro est qui dolo.', 'pyloncore' ),
'show_label' => true,
]
);
$this->add_control(
'pylon_banner_link',
[
'label' => esc_html__( 'Link', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::URL,
'placeholder' => esc_html__( 'https://your-link.com', 'pyloncore' ),
'show_external' => true,
'default' => [
'url' => 'tel:92-666-888-0000',
'is_external' => true,
'nofollow' => true,
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'pylon_banner_css_box',
[
'label' => esc_html__( 'Box', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'pylon_banner_css_box_alingment',
[
'label' => esc_html__( 'Alignment', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'pyloncore' ),
'icon' => 'fa fa-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'pyloncore' ),
'icon' => 'fa fa-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'pyloncore' ),
'icon' => 'fa fa-align-right',
],
],
'default' => 'center',
'toggle' => true,
'selectors' => [
'{{WRAPPER}} .service-sidebar__call' => 'text-align: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_box_bg',
[
'label' => esc_html__( 'Background Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .service-sidebar__call' => 'background-color: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_box_opacity',
[
'label' => esc_html__( 'Image Opacity', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => .0,
'max' => 1,
'step' => 0.1,
],
],
'default' => [
'size' => .9,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call-bg' => 'opacity: {{SIZE}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_box_margin',
[
'label' => esc_html__( 'Margin', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'default' => [
'top' => '30',
'right' => '0',
'bottom' => '50',
'left' => '0',
'isLinked' => true,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_box_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'default' => [
'top' => '50',
'right' => '50',
'bottom' => '50',
'left' => '50',
'isLinked' => true,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Border::get_type(),
[
'name' => 'pylon_banner_css_box_border',
'label' => esc_html__( 'Border', 'pyloncore' ),
'selector' => '{{WRAPPER}} .service-sidebar__call',
]
);
$this->add_responsive_control(
'pylon_banner_css_box_radius',
[
'label' => esc_html__( 'Border Radius', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'pylon_banner_css_box_shadow',
'label' => esc_html__( 'Box Shadow', 'pyloncore' ),
'selector' => '{{WRAPPER}} .service-sidebar__call',
]
);
$this->end_controls_section();
$this->start_controls_section(
'pylon_banner_css_icon',
[
'label' => esc_html__( 'Icon', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_color',
[
'label' => esc_html__( 'Icon Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .service-sidebar__call i' => 'color: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_colorbg',
[
'label' => esc_html__( 'Background Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .service-sidebar__call i' => 'background-color: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_size',
[
'label' => esc_html__( 'Icon Size', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 10,
'max' => 50,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 32,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call i' => 'font-size: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_width',
[
'label' => esc_html__( 'Icon Width', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 30,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 67,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call i' => 'width: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_height',
[
'label' => esc_html__( 'Icon Height', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 30,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 67,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call i' => 'height: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_line_height',
[
'label' => esc_html__( 'Line Height', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 200,
'step' => 1,
],
],
'default' => [
'unit' => 'px',
'size' => 63,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call i' => 'line-height: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_radius',
[
'label' => esc_html__( 'Border Radius', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['%'],
'range' => [
'%' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => '%',
'size' => 50,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call i' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_margin',
[
'label' => esc_html__( 'Margin', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'default' => [
'top' => '0',
'right' => '0',
'bottom' => '20',
'left' => '0',
'isLinked' => true,
],
'selectors' => [
'{{WRAPPER}} .banner-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_icon_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .banner-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'pylon_banner_css_title',
[
'label' => esc_html__( 'Title', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'pylon_banner_css_title_color',
[
'label' => esc_html__( 'Title Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .service-sidebar__call h3' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'pylon_banner_css_title_typo',
'label' => esc_html__( 'Typography', 'pyloncore' ),
'selector' => '{{WRAPPER}} .service-sidebar__call h3',
]
);
$this->add_responsive_control(
'pylon_banner_css_title_margin',
[
'label' => esc_html__( 'Margin', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'default' => [
'top' => '0',
'right' => '0',
'bottom' => '20',
'left' => '0',
'isLinked' => true,
],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_title_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call h3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'pylon_banner_css_dec',
[
'label' => esc_html__( 'Discription', 'pyloncore' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'pylon_banner_css_dec_color',
[
'label' => esc_html__( 'Color', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .service-sidebar__call p' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'pylon_banner_css_dec_typo',
'label' => esc_html__( 'Typography', 'pyloncore' ),
'selector' => '{{WRAPPER}} .service-sidebar__call p',
]
);
$this->add_responsive_control(
'pylon_banner_css_dec_margin',
[
'label' => esc_html__( 'Margin', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'pylon_banner_css_dec_padding',
[
'label' => esc_html__( 'Padding', 'pyloncore' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em'],
'selectors' => [
'{{WRAPPER}} .service-sidebar__call p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_section();
}
//Render
protected function render() {
$settings = $this->get_settings_for_display();
$pylon_banner_target = $settings['pylon_banner_link']['is_external'] ? ' target="_blank"' : '';
$pylon_banner_nofollow = $settings['pylon_banner_link']['nofollow'] ? ' rel="nofollow"' : '';
?>
widgets_manager->register_widget_type( new Pylon_Banner_Widget );