%PDF- %PDF-
| Direktori : /home/opti/public_html/stlc/wp-content/plugins/insur-addon/includes/Widgets/ |
| Current File : /home/opti/public_html/stlc/wp-content/plugins/insur-addon/includes/Widgets/FooterContact.php |
<?php
namespace Layerdrops\Insur\Widgets;
class FooterContact extends \Elementor\Widget_Base
{
public function get_name()
{
return 'footer-contact';
}
public function get_title()
{
return __('Footer Contact', 'insur-addon');
}
public function get_icon()
{
return 'eicon-cogs';
}
public function get_categories()
{
return ['insur-category'];
}
protected function register_controls()
{
$this->start_controls_section(
'content_section',
[
'label' => __('Content', 'insur-addon'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'title',
[
'label' => __('Add Title', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => __('Contact', 'insur-addon'),
'label_block' => true
]
);
$contact_info = new \Elementor\Repeater();
$contact_info->add_control(
'content',
[
'label' => __('Content', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => wp_kses(__('<a href="mailto:needhelp@company.com">needhelp@company.com</a>', 'insur-addon'), 'insur_allowed_tags')
]
);
$contact_info->add_control(
'icon',
[
'label' => __('Icon', 'insur-addon'),
'type' => \Elementor\Controls_Manager::ICONS,
'default' => [
'value' => 'icon-email',
'library' => 'custom-icon',
],
]
);
$this->add_control(
'contact_info',
[
'label' => __('Top Bar Left Content', 'insur-addon'),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $contact_info->get_controls(),
'prevent_empty' => false,
]
);
$this->add_control(
'bottom_title',
[
'label' => __('Bottom Title', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => __('Open Hours', 'insur-addon'),
'label_block' => true
]
);
$this->add_control(
'bottom_content',
[
'label' => __('Bottom Content', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => __('Mon – Sat: 8:00 am to 6:00 pm Sunday: Closed', 'insur-addon'),
'label_block' => true
]
);
$this->end_controls_section();
//style
$this->start_controls_section(
'style_option',
[
'label' => esc_html__('Style Options', 'insur-addon'),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
]
);
//Widget title typography
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'widget_title_typography',
'label' => esc_html__('Widget Title Typography', 'insur-addon'),
'selector' => '{{WRAPPER}} .footer-widget__title',
]
);
$this->add_control(
'widget_title__color',
[
'label' => __('Widget Title Color', 'insur-addon'),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .footer-widget__title' => 'color: {{VALUE}}',
],
]
);
//Nav text typography
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'contact_info_typography',
'label' => esc_html__('Contact Info Typography', 'insur-addon'),
'selector' => '{{WRAPPER}} .footer-widget__contact-list li .text p a',
]
);
$this->add_control(
'contact_info__color',
[
'label' => __('Contact Info Color', 'insur-addon'),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .footer-widget__contact-list li .text p a,{{WRAPPER}} .footer-widget__contact-list li .text p' => 'color: {{VALUE}}',
],
]
);
//Widget bottom typography
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'bottom_title_typography',
'label' => esc_html__('Bottom Title Typography', 'insur-addon'),
'selector' => '{{WRAPPER}} .footer-widget__open-hour-title',
]
);
$this->add_control(
'bottom_title__color',
[
'label' => __('Bottom Title Color', 'insur-addon'),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .footer-widget__open-hour-title' => 'color: {{VALUE}}',
],
]
);
//Widget bottom content typography
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'bottom_content_typography',
'label' => esc_html__('Bottom Content Typography', 'insur-addon'),
'selector' => '{{WRAPPER}} .footer-widget__open-hour-text',
]
);
$this->add_control(
'bottom_content__color',
[
'label' => __('Bottom Content Color', 'insur-addon'),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .footer-widget__open-hour-text' => 'color: {{VALUE}}',
],
]
);
$this->end_controls_section();
}
protected function render()
{
$settings = $this->get_settings_for_display();
include insur_get_template('footer-contact.php');
}
}