File: //proc/thread-self/cwd/wp-content/plugins/ftech-plugin/elementor/widgets/footer.php
<?php
/**
* Elementor Single Widget
* @package ftech Tools
* @since 1.0.0
*/
namespace Elementor;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
class Ftech_Footer extends Widget_Base {
/**
* Get widget name.
*
* Retrieve Elementor widget name.
*
* @since 1.0.0
* @access public
*
* @return string Widget name.
*/
public function get_name() {
return 'go-footer-';
}
/**
* Get widget title.
*
* Retrieve Elementor widget title.
*
* @since 1.0.0
* @access public
*
* @return string Widget title.
*/
public function get_title() {
return esc_html__( 'Ftech Footer', 'ftech-plugin' );
}
/**
* Get widget icon.
*
* Retrieve Elementor widget icon.
*
* @since 1.0.0
* @access public
*
* @return string Widget icon.
*/
public function get_icon() {
return 'ftech-custom-icon';
}
/**
* Get widget categories.
*
* Retrieve the list of categories the Elementor widget belongs to.
*
* @since 1.0.0
* @access public
*
* @return array Widget categories.
*/
public function get_categories() {
return [ 'ftech_widgets' ];
}
protected function register_controls() {
$this->start_controls_section(
'int_widget_opt',
[
'label' => esc_html__( 'Footer Select', 'ftech-plugin' ),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'style',
[
'label' => esc_html__( 'Style', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '1',
'options' => [
'1' => esc_html__( 'Style 1', 'ftech-plugin' ),
]
]
);
$this->end_controls_section();
$this->start_controls_section(
'--footer-option',
[
'label' => esc_html__( 'Footer Option', 'ftech-plugin' ),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'footer_bg', [
'label' => esc_html__( 'Footer BG Logo', 'ftech-plugin' ),
'type' => Controls_Manager::MEDIA,
'label_block' => true,
]
);
$this->add_control(
'heading_log_sp',
[
'label' => esc_html__( 'Heading Logo Area', 'textdomain' ),
'type' => \Elementor\Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'heading_logo', [
'label' => esc_html__( 'Heading Logo', 'ftech-plugin' ),
'type' => Controls_Manager::MEDIA,
'label_block' => true,
]
);
$this->add_control(
'heading_links',
[
'label' => esc_html__( 'Heading Link Area', 'textdomain' ),
'type' => \Elementor\Controls_Manager::HEADING,
'separator' => 'before',
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'title', [
'label' => esc_html__( 'Title', 'ftech-plugin' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
]
);
$repeater->add_control(
'link', [
'label' => esc_html__( 'Link', 'ftech-plugin' ),
'type' => Controls_Manager::URL,
'default' => [
'url' => '',
'is_external' => true,
'nofollow' => true,
// 'custom_attributes' => '',
],
'label_block' => true,
]
);
$this->add_control(
'links',
[
'label' => esc_html__( 'Add Link Item', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'title_field' => '{{{ title }}}',
]
);
$this->add_control(
'__brand_options__',
[
'label' => esc_html__( 'Brand Option', 'textdomain' ),
'type' => \Elementor\Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'brand_title', [
'label' => esc_html__( 'Brand Title', 'ftech-plugin' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'brand', [
'label' => esc_html__( 'Brand Logo', 'ftech-plugin' ),
'type' => Controls_Manager::MEDIA,
'label_block' => true,
]
);
$repeater->add_control(
'brand_2', [
'label' => esc_html__( 'Brand Logo 2', 'ftech-plugin' ),
'type' => Controls_Manager::MEDIA,
'label_block' => true,
]
);
$this->add_control(
'brands',
[
'label' => esc_html__( 'Add Brand Item', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
]
);
$this->add_control(
'__quick_link_options__',
[
'label' => esc_html__( 'Quick Links Option', 'textdomain' ),
'type' => \Elementor\Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'qucik_title', [
'label' => esc_html__( 'Quick Title', 'ftech-plugin' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'title', [
'label' => esc_html__( 'Title', 'ftech-plugin' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
]
);
$repeater->add_control(
'link', [
'label' => esc_html__( 'Link', 'ftech-plugin' ),
'type' => Controls_Manager::URL,
'default' => [
'url' => '',
'is_external' => true,
'nofollow' => true,
// 'custom_attributes' => '',
],
'label_block' => true,
]
);
$this->add_control(
'quick_links',
[
'label' => esc_html__( 'Add Quick Link Item', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'title_field' => '{{{ title }}}',
]
);
$this->add_control(
'__contact_options__',
[
'label' => esc_html__( 'Contact Option', 'textdomain' ),
'type' => \Elementor\Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'ct_title', [
'label' => esc_html__( 'Contact Title', 'ftech-plugin' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'icon', [
'label' => esc_html__( 'Icon', 'ftech-plugin' ),
'type' => Controls_Manager::ICONS,
'label_block' => true,
]
);
$repeater->add_control(
'title', [
'label' => esc_html__( 'Title', 'ftech-plugin' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
]
);
$this->add_control(
'infos',
[
'label' => esc_html__( 'Add Info Item', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'title_field' => '{{{ title }}}',
]
);
$this->add_control(
'hour_title', [
'label' => esc_html__( 'Our Title', 'ftech-plugin' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
]
);
$this->add_control(
'hour_content', [
'label' => esc_html__( 'Our Content', 'ftech-plugin' ),
'type' => Controls_Manager::TEXTAREA,
'label_block' => true,
]
);
$this->add_control(
'copyright',
[
'label' => esc_html__( 'Copyright', 'textdomain' ),
'type' => \Elementor\Controls_Manager::WYSIWYG,
]
);
$this->end_controls_section();
$this->start_controls_section(
'--tab-title-style-',
[
'label' => esc_html__( 'Tab Title Style', 'ftech-plugin' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'tab_title_color',
[
'label' => esc_html__( 'Tab Title Color', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ftc-heading-1:is(.has-color-white)' => 'color: {{VALUE}}',
],
]
);
$this->add_control(
'tab_active_title_color',
[
'label' => esc_html__( 'Tab Active Title Color', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ftc-special-1-tabs-btn .nav-item .nav-link:is(.active)' => 'color: {{VALUE}}',
],
]
);
// typography
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'tab_title_typography',
'selector' => '{{WRAPPER}} .ftc-special-1-tabs-btn .nav-item .nav-link',
]
);
$this->end_controls_section();
$this->start_controls_section(
'---title-style-',
[
'label' => esc_html__( 'Title Style', 'ftech-plugin' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'title_color',
[
'label' => esc_html__( 'Title Color', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ftc-special-1-tabs-content .item-title' => 'color: {{VALUE}}',
],
]
);
// typography
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'selector' => '{{WRAPPER}} .ftc-special-1-tabs-content .item-title',
]
);
$this->end_controls_section();
$this->start_controls_section(
'slider_desc_style',
[
'label' => esc_html__( 'Desc Style', 'ftech-plugin' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'desc_margin',
[
'label' => esc_html__( 'Desc Margin', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
'selectors' => [
'{{WRAPPER}} .ftc-special-1-tabs-content .item-disc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'desc_color',
[
'label' => esc_html__( 'Desc Color', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ftc-special-1-tabs-content .item-disc' => 'color: {{VALUE}}',
],
]
);
// typography
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'm_desc_typography',
'selector' => '{{WRAPPER}} .ftc-special-1-tabs-content .item-disc',
]
);
$this->end_controls_section();
// feature style
$this->start_controls_section(
'slider_button_one',
[
'label' => esc_html__( 'Button Style', 'ftech-plugin' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'm_b_typography',
'selector' => '{{WRAPPER}} .ftc-btn-1',
]
);
$this->add_control(
'padding',
[
'label' => esc_html__( 'Padding', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
'selectors' => [
'{{WRAPPER}} .ftc-btn-1' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'b_round',
[
'label' => esc_html__( 'Border Radius', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
'selectors' => [
'{{WRAPPER}} .ftc-btn-1' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->start_controls_tabs(
'style_tabs'
);
$this->start_controls_tab(
'style_normal_tab',
[
'label' => esc_html__( 'Normal', 'ftech-plugin' ),
]
);
$this->add_control(
'btn_text',
[
'label' => esc_html__( 'Text Color', 'ftech-plugin' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ftc-btn-1' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'button_bg_color',
'types' => [ 'gradient' ],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .ftc-btn-1',
'fields_options' => [
'background' => [
'label' => esc_html__( 'Button BG Color ', 'ftech-plugin' ),
'description' => esc_html__( 'Choose background type and style.', 'ftech-plugin' ),
'separator' => 'before',
]
]
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'style_hover_tab',
[
'label' => esc_html__( 'Hover', 'ftech-plugin' ),
]
);
$this->add_group_control(
\Elementor\Group_Control_Background::get_type(),
[
'name' => 'button_bg_hover_color',
'types' => [ 'gradient' ],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .ftc-btn-1:before',
'fields_options' => [
'background' => [
'label' => esc_html__( 'Button Hover BG Color ', 'ftech-plugin' ),
'description' => esc_html__( 'Choose background type and style.', 'ftech-plugin' ),
'separator' => 'before',
]
]
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
require __DIR__ . '/view/footer/footer-' . $settings['style'] . '.php';
}
}
Plugin::instance()->widgets_manager->register( new Ftech_Footer() );