HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/ftech-plugin/elementor/widgets/team.php
<?php

/**
 * Elementor Single Widget
 * @package ftech Tools
 * @since 1.0.0
 */

namespace Elementor;

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.

class Ftech_Team 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-team';
	}

	/**
	 * Get widget title.
	 *
	 * Retrieve Elementor widget title.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return esc_html__( 'Team', '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__( 'Team Style', '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' ),
					'2'  => esc_html__( 'Style 2', 'ftech-plugin' ),
					'3'  => esc_html__( 'Style 3', 'ftech-plugin' ),
				]
			]
		);
        $this->end_controls_section();

        $this->start_controls_section(
			'--team-option',
			[
				'label' => esc_html__( 'Team Option', 'ftech-plugin' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			]
		);
		$this->add_control(
			'team_img', [
				'label' => esc_html__( 'Team Image', 'gesto-plugin' ),
				'type' => Controls_Manager::MEDIA,
                'label_block' => true,
				'condition' => [
					'style' => ['2'],
				],
			]
		);
		$this->add_control(
			'team_shape', [
				'label' => esc_html__( 'Team Shape Image', 'gesto-plugin' ),
				'type' => Controls_Manager::MEDIA,
                'label_block' => true,
				'condition' => [
					'style' => ['3'],
				],
			]
		);
       
        $this->add_control(
			'title', [
				'label' => esc_html__( 'Type Name', 'ftech-plugin' ),
				'default' => esc_html__( 'Salima woller', 'ftech-plugin' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
				'condition' => [
					'style' => ['2'],
				],
			]
		);
        $this->add_control(
			'link', [
				'label' => esc_html__( 'Link to Single Page', 'ftech-plugin' ),
				'type' => Controls_Manager::URL,
                'label_block' => true,
				'condition' => [
					'style' => ['2'],
				],
			]
		);
		$repeater = new \Elementor\Repeater();
		$repeater->add_control(
			'icon', [
				'label' => esc_html__( 'Icons', 'ftech-plugin' ),
				'type' => Controls_Manager::ICONS,
                'label_block' => true,
			]
		);
		$repeater->add_control(
			'link', [
				'label' => esc_html__( 'Link', 'ftech-plugin' ),
				'type' => Controls_Manager::URL,
                'label_block' => true,
			]
		);
		$this->add_control(
			'socials',
			[
				'label' => esc_html__( 'Add Social Icon', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::REPEATER,
				'fields' => $repeater->get_controls(),
				'condition' => [
					'style' => ['2'],
				],
			]
		);
        $this->add_control(
			'team_bg_img', [
				'label' => esc_html__( 'BG Shape Image', 'gesto-plugin' ),
				'type' => Controls_Manager::MEDIA,
                'label_block' => true,
				'condition' => [
					'style' => ['1'],
				],
			]
		);
        $repeater = new \Elementor\Repeater();
		$repeater->add_control(
			'layout',
			[
				'label' => esc_html__( 'Layout', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::SELECT,
				'default' => '1',
				'options' => [
					'1'  => esc_html__( 'Style 1', 'ftech-plugin' ),
					'2'  => esc_html__( 'Style 2', 'ftech-plugin' ),
				]
			]
		);
        $repeater->add_control(
			'is_active',
			[
				'label' => esc_html__( 'Active', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::SWITCHER,
				'label_on' => esc_html__( 'YES', 'ftech-plugin' ),
				'label_off' => esc_html__( 'NO', 'ftech-plugin' ),
				'return_value' => 'yes',
				'default' => 'no',
				'condition' => [
					'layout' => ['1'],
				],
			]
		);
        $repeater->add_control(
			'team_img', [
				'label' => esc_html__( 'team Image', 'gesto-plugin' ),
				'type' => Controls_Manager::MEDIA,
                'label_block' => true,
			]
		);
       
        $repeater->add_control(
			'quote', [
				'label' => esc_html__( 'Quote', 'ftech-plugin' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
				'condition' => [
					'layout' => ['1'],
				],
			]
		);
        $repeater->add_control(
			'title', [
				'label' => esc_html__( 'Type Name', 'ftech-plugin' ),
				'default' => esc_html__( 'Salima woller', 'ftech-plugin' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
        $repeater->add_control(
			'designation', [
				'label' => esc_html__( 'Designation', 'ftech-plugin' ),
				'default' => esc_html__( 'manager IT support', 'ftech-plugin' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
        $repeater->add_control(
			'year', [
				'label' => esc_html__( 'Year', 'ftech-plugin' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
				'condition' => [
					'layout' => ['1'],
				],
			]
		);
        $repeater->add_control(
			'exp', [
				'label' => esc_html__( 'Exprience', 'ftech-plugin' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
				'condition' => [
					'layout' => ['1'],
				],
			]
		);
        $repeater->add_control(
			'link', [
				'label' => esc_html__( 'Link', 'ftech-plugin' ),
				'type' => Controls_Manager::URL,
                'label_block' => true,
			]
		);
        $repeater->add_control(
            'social_links',
            [
                'label' => __('Social Links', 'ftech-plugin'),
                'type' => Controls_Manager::REPEATER,
                'fields' => [
                    // social icon
                    [
                        'name' => 'social_icon',
                        'label' => __('Social Icon', 'ftech-plugin'),
                        'type' => Controls_Manager::ICONS,
                        'default' => [
                            'value' => 'fab fa-facebook-f',
                            'library' => 'fa-solid',
                        ],
                    ],
                    // social link
                    [
                        'name' => 'social_link',
                        'label' => __('Social Link', 'ftech-plugin'),
                        'type' => Controls_Manager::URL,
                        'placeholder' => __('https://your-link.com', 'ftech-plugin'),
                        'default' => [
                            'url' => '#',
                        ],
                    ],
                ],
            ],
        );
        $this->add_control(
			'teams',
			[
				'label' => esc_html__( 'Add teams Item', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::REPEATER,
				'fields' => $repeater->get_controls(),
                'title_field' => '{{{ title }}}',
				'condition' => [
					'style' => ['1', '3'],
				],
			]
		);
		$this->add_control(
			'team_info', [
				'label' => esc_html__( 'Team Info', 'ftech-plugin' ),
				'type' => Controls_Manager::WYSIWYG,
                'label_block' => true,
				'condition' => [
					'style' => ['1'],
				],
			]
		);
		$this->end_controls_section();
		
		// Sub title style
		$this->start_controls_section(
			'slider_sub_title_style',
			[
				'label' => esc_html__( 'Team Title Style', 'ftech-plugin' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			]
		);
		$this->add_responsive_control(
			'margin',
			[
				'label' => esc_html__( 'Title Margin', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .membar-name' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);
		$this->add_control(
			'title_color',
			[
				'label' => esc_html__( 'Title Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .membar-name' => 'color: {{VALUE}}',
				],
			]
		);
		$this->add_control(
			'title_hover_color',
			[
				'label' => esc_html__( 'Title Hover Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .membar-name:hover' => 'color: {{VALUE}}',
				],
			]
		);
		// typography
		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			[

				'name' => 'm_title_typography',
				'selector' => '{{WRAPPER}} .ftc-team-3-membar .membar-name',
			]
		);

		$this->end_controls_section();
		$this->start_controls_section(
			'slider_designation_style',
			[
				'label' => esc_html__( 'Team Designation Style', 'ftech-plugin' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			]
		);
		$this->add_responsive_control(
			'desigmargin',
			[
				'label' => esc_html__( 'Margin', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .membar-bio' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);
		$this->add_control(
			'dsc_color',
			[
				'label' => esc_html__( 'Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .membar-bio' => 'color: {{VALUE}}',
				],
			]
		);
		// typography
		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			[

				'name' => 'm_desc_typography',
				'selector' => '{{WRAPPER}} .ftc-team-3-membar .membar-bio',
			]
		);

		$this->end_controls_section();
		$this->start_controls_section(
			'slider_social_style',
			[
				'label' => esc_html__( 'Team Social Style', 'ftech-plugin' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			]
		);
		
		$this->add_control(
			'social_color',
			[
				'label' => esc_html__( 'Icon Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .ftc-social-link-1 .this-link' => 'color: {{VALUE}}',
				],
			]
		);
		$this->add_control(
			'social_border_color',
			[
				'label' => esc_html__( 'Border Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .ftc-social-link-1 .this-link' => 'border-color: {{VALUE}}',
				],
			]
		);
		$this->add_control(
			'social_hover_color',
			[
				'label' => esc_html__( 'Hover Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .ftc-social-link-1 .this-link:hover' => 'color: {{VALUE}}',
				],
			]
		);
		$this->add_control(
			'social_h_border_color',
			[
				'label' => esc_html__( 'Border Hover Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .ftc-social-link-1 .this-link:hover' => 'border-color: {{VALUE}}',
				],
			]
		);
		$this->add_control(
			'social_h_bg_color',
			[
				'label' => esc_html__( 'BG Hover Color', 'ftech-plugin' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ftc-team-3-membar .ftc-social-link-1 .this-link:hover' => 'background-color: {{VALUE}}',
				],
			]
		);

		$this->end_controls_section();

	}


	protected function render() {
		$settings = $this->get_settings_for_display();
        require __DIR__ . '/view/teams/team-' . $settings['style'] . '.php';
    }


}


Plugin::instance()->widgets_manager->register( new Ftech_Team() );