<?php
/**
* Class: Jet_Elements_Team_Member
* Name: Team Member
* Slug: jet-team-member
*/
namespace Elementor;
use Elementor\Controls_Manager;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Typography;
use Elementor\Repeater;
use Elementor\Scheme_Color;
use Elementor\Scheme_Typography;
use Elementor\Widget_Base;
use Elementor\Modules\DynamicTags\Module as TagsModule;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class Jet_Elements_Team_Member extends Jet_Elements_Base {
public function get_name() {
return 'jet-team-member';
}
public function get_title() {
return esc_html__( 'Team Member', 'jet-elements' );
}
public function get_icon() {
return 'jet-elements-icon-team-member';
}
public function get_jet_help_url() {
return 'https://crocoblock.com/knowledge-base/articles/jetelements-team-member-widget-how-to-add-a-team-member-widget-to-your-website/';
}
public function get_categories() {
return array( 'cherry' );
}
protected function _register_controls() {
$css_scheme = apply_filters(
'jet-elements/team-member/css-scheme',
array(
'instance' => '.jet-team-member',
'instance_inner' => '.jet-team-member__inner',
'image' => '.jet-team-member__image',
'cover' => '.jet-team-member__cover',
'figure' => '.jet-team-member__figure',
'content' => '.jet-team-member__content',
'name' => '.jet-team-member__name',
'position' => '.jet-team-member__position',
'desc' => '.jet-team-member__desc',
'socials' => '.jet-team-member__socials',
'socials_item' => '.jet-team-member__socials-item',
'socials_icon' => '.jet-team-member__socials-icon',
'socials_label' => '.jet-team-member__socials-label',
'button_container' => '.jet-team-member__button-container',
'button' => '.jet-team-member__button',
)
);
$this->start_controls_section(
'section_content',
array(
'label' => esc_html__( 'Content', 'jet-elements' ),
)
);
$this->add_control(
'member_image',
array(
'label' => esc_html__( 'Member Image', 'jet-elements' ),
'type' => Controls_Manager::MEDIA,
'default' => array(
'url' => Utils::get_placeholder_image_src(),
),
'dynamic' => array( 'active' => true ),
)
);
$this->add_control(
'member_first_name',
array(
'label' => esc_html__( 'First Name', 'jet-elements' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'John', 'jet-elements' ),
'dynamic' => array( 'active' => true ),
)
);
$this->add_control(
'member_last_name',
array(
'label' => esc_html__( 'Last Name', 'jet-elements' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'Borthwick', 'jet-elements' ),
'dynamic' => array( 'active' => true ),
)
);
$this->add_control(
'member_name_html_tag',
array(
'label' => esc_html__( 'Name HTML Tag', 'jet-elements' ),
'type' => Controls_Manager::SELECT,
'options' => jet_elements_tools()->get_available_title_html_tags(),
'default' => 'h3',
)
);
$this->add_control(
'member_position',
array(
'label' => esc_html_x( 'Position', 'Position at work', 'jet-elements' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html_x( 'Position', 'Position at work', 'jet-elements' ),
'dynamic' => array( 'active' => true ),
)
);
$this->add_control(
'member_description',
array(
'label' => esc_html__( 'Description', 'jet-elements' ),
'type' => Controls_Manager::TEXTAREA,
'default' => esc_html__( 'Team member personal information', 'jet-elements' ),
'dynamic' => array( 'active' => true ),
)
);
$repeater = new Repeater();
$this->_add_advanced_icon_control(
'social_icon',
array(
'label' => esc_html__( 'Icon', 'jet-elements' ),
'type' => Controls_Manager::ICON,
'label_block' => true,
'file' => '',
'default' => '',
),
$repeater
);
$repeater->add_control(
'social_label',
array(
'label' => esc_html__( 'Label', 'jet-elements' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'Label', 'jet-elements' ),
)
);
$repeater->add_control(
'label_visible',
array(
'label' => esc_html__( 'Label visible', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-elements' ),
'label_off' => esc_html__( 'No', 'jet-elements' ),
'return_value' => 'yes',
'default' => 'false',
)
);
$repeater->add_control(
'social_link',
array(
'label' => esc_html__( 'Link', 'jet-elements' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( '#', 'jet-elements' ),
'dynamic' => array(
'active' => true,
'categories' => array(
TagsModule::POST_META_CATEGORY,
TagsModule::URL_CATEGORY,
),
),
)
);
$repeater->add_control(
'social_link_target',
array(
'label' => esc_html__( 'Open link in new window', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'condition' => array(
'social_link!' => '',
),
)
);
$repeater->add_control(
'social_link_rel',
array(
'label' => esc_html__( 'Add nofollow', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'condition' => array(
'social_link!' => '',
),
)
);
$this->add_control(
'social_list',
array(
'type' => Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'default' => array(
array(
'social_icon' => 'fa fa-facebook',
'social_label' => esc_html__( 'Facebook', 'jet-elements' ),
'social_link' => '#',
'label_visible' => 'false',
),
array(
'social_icon' => 'fa fa-google-plus',
'social_label' => esc_html__( 'google+', 'jet-elements' ),
'social_link' => '#',
'label_visible' => 'false',
),
array(
'social_icon' => 'fa fa-twitter',
'social_label' => esc_html__( 'Twitter', 'jet-elements' ),
'social_link' => '#',
'label_visible' => 'false',
),
),
'title_field' => '{{{ social_label }}}',
)
);
$this->add_control(
'button_text',
array(
'label' => esc_html__( 'Button Text', 'jet-elements' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'More', 'jet-elements' ),
)
);
$this->add_control(
'button_url',
array(
'label' => esc_html__( 'Button Link', 'jet-elements' ),
'type' => Controls_Manager::URL,
'placeholder' => 'http://your-link.com',
'default' => array(
'url' => '',
),
'dynamic' => array( 'active' => true ),
)
);
$this->end_controls_section();
$this->start_controls_section(
'section_settings',
array(
'label' => esc_html__( 'Settings', 'jet-elements' ),
)
);
$this->add_control(
'show_on_hover',
array(
'label' => esc_html__( 'Overlay show on hover', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-elements' ),
'label_off' => esc_html__( 'No', 'jet-elements' ),
'return_value' => 'yes',
'default' => 'false',
)
);
$this->add_control(
'cover_like_hint',
array(
'label' => esc_html__( 'Overlay like a hint', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-elements' ),
'label_off' => esc_html__( 'No', 'jet-elements' ),
'return_value' => 'yes',
'default' => 'false',
)
);
$this->add_control(
'use_hint_corner',
array(
'label' => esc_html__( 'Use hint corner', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-elements' ),
'label_off' => esc_html__( 'No', 'jet-elements' ),
'return_value' => 'yes',
'default' => 'false',
'condition' => array(
'cover_like_hint' => 'yes',
),
)
);
$this->add_control(
'name_cover_location',
array(
'label' => esc_html__( 'Name display in cover', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-elements' ),
'label_off' => esc_html__( 'No', 'jet-elements' ),
'return_value' => 'yes',
'default' => 'false',
)
);
$this->add_control(
'position_cover_location',
array(
'label' => esc_html__( 'Position display in cover', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-elements' ),
'label_off' => esc_html__( 'No', 'jet-elements' ),
'return_value' => 'yes',
'default' => 'false',
)
);
$this->add_control(
'desc_cover_location',
array(
'label' => esc_html__( 'Description display in cover', 'jet-elements' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-elements' ),
'label_off' => esc_html__( 'No', 'jet-elements' ),
'return_value' => 'yes',
'default' => 'false',
)
);
$this->add_control(
'social_list_cover_location',
array(
Loading ...