D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
etb1lp46s9ed
/
www
/
lalpathamroha.site
/
wp-content
/
plugins
/
tp-core
/
include
/
elementor
/
Filename :
team.php
back
Copy
<?php namespace TPCore\Widgets; use Elementor\Widget_Base; use Elementor\Controls_Manager; use \Elementor\Group_Control_Background; use \Elementor\Group_Control_Image_Size; use \Elementor\Repeater; use \Elementor\Utils; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** * Tp Core * * Elementor widget for hello world. * * @since 1.0.0 */ class TP_Team extends Widget_Base { use \TPCore\Widgets\TPCoreElementFunctions; /** * Retrieve the widget name. * * @since 1.0.0 * * @access public * * @return string Widget name. */ public function get_name() { return 'tp-team'; } /** * Retrieve the widget title. * * @since 1.0.0 * * @access public * * @return string Widget title. */ public function get_title() { return __( 'Team', 'tpcore' ); } /** * Retrieve the widget icon. * * @since 1.0.0 * * @access public * * @return string Widget icon. */ public function get_icon() { return 'tp-icon'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since 1.0.0 * * @access public * * @return array Widget categories. */ public function get_categories() { return [ 'tpcore' ]; } /** * Retrieve the list of scripts the widget depended on. * * Used to set scripts dependencies required to run the widget. * * @since 1.0.0 * * @access public * * @return array Widget scripts dependencies. */ public function get_script_depends() { return [ 'tpcore' ]; } /** * Register the widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * * @access protected */ protected function register_controls(){ $this->register_controls_section(); $this->style_tab_content(); } protected function register_controls_section() { // layout Panel $this->start_controls_section( 'tp_layout', [ 'label' => esc_html__('Design Layout', 'tpcore'), ] ); $this->add_control( 'tp_design_style', [ 'label' => esc_html__('Select Layout', 'tpcore'), 'type' => Controls_Manager::SELECT, 'options' => [ 'layout-1' => esc_html__('Layout 1', 'tpcore'), 'layout-2' => esc_html__('Layout 2', 'tpcore'), 'layout-3' => esc_html__('Layout 3', 'tpcore'), 'layout-4' => esc_html__('Layout 4', 'tpcore'), ], 'default' => 'layout-1', ] ); $this->end_controls_section(); // tp_section_title $this->start_controls_section( 'tp_section_title', [ 'label' => esc_html__('Title & Content', 'tpcore'), ] ); $this->add_control( 'tp_section_title_show', [ 'label' => esc_html__( 'Section Title & Content', 'tpcore' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'tpcore' ), 'label_off' => esc_html__( 'Hide', 'tpcore' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'tp_sub_title', [ 'label' => esc_html__('Sub Title', 'tpcore'), 'description' => tp_get_allowed_html_desc( 'basic' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('TP Sub Title', 'tpcore'), 'placeholder' => esc_html__('Type Sub Heading Text', 'tpcore'), 'label_block' => true, ] ); $this->add_control( 'tp_title', [ 'label' => esc_html__('Title', 'tpcore'), 'description' => tp_get_allowed_html_desc( 'intermediate' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('TP Title Here', 'tpcore'), 'placeholder' => esc_html__('Type Heading Text', 'tpcore'), 'label_block' => true, ] ); $this->add_control( 'tp_description', [ 'label' => esc_html__('Description', 'tpcore'), 'description' => tp_get_allowed_html_desc( 'intermediate' ), 'type' => Controls_Manager::TEXTAREA, 'default' => esc_html__('TP section description here', 'tpcore'), 'placeholder' => esc_html__('Type section description here', 'tpcore'), ] ); $this->add_control( 'tp_title_tag', [ 'label' => esc_html__('Title HTML Tag', 'tpcore'), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'h1' => [ 'title' => esc_html__('H1', 'tpcore'), 'icon' => 'eicon-editor-h1' ], 'h2' => [ 'title' => esc_html__('H2', 'tpcore'), 'icon' => 'eicon-editor-h2' ], 'h3' => [ 'title' => esc_html__('H3', 'tpcore'), 'icon' => 'eicon-editor-h3' ], 'h4' => [ 'title' => esc_html__('H4', 'tpcore'), 'icon' => 'eicon-editor-h4' ], 'h5' => [ 'title' => esc_html__('H5', 'tpcore'), 'icon' => 'eicon-editor-h5' ], 'h6' => [ 'title' => esc_html__('H6', 'tpcore'), 'icon' => 'eicon-editor-h6' ] ], 'default' => 'h2', 'toggle' => false, ] ); $this->add_responsive_control( 'tp_align', [ 'label' => esc_html__('Alignment', 'tpcore'), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__('Left', 'tpcore'), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__('Center', 'tpcore'), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__('Right', 'tpcore'), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'left', 'toggle' => false, 'selectors' => [ '{{WRAPPER}}' => 'text-align: {{VALUE}};' ] ] ); $this->end_controls_section(); // member list $this->start_controls_section( '_section_teams', [ 'label' => __( 'Members', 'tpcore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $repeater = new Repeater(); $repeater->add_control( 'tp_team_bg_color', [ 'label' => __( 'Shape BG Color', 'tocore' ), 'type' => Controls_Manager::COLOR, 'default' => '#A794C8', 'frontend_available' => true, 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}} .team__thumb-shape::after' => 'background-color: {{VALUE}};', ], 'style_transfer' => true, 'frontend_available' => true, ] ); $repeater->start_controls_tabs( '_tab_style_member_box_itemr' ); $repeater->start_controls_tab( '_tab_member_info', [ 'label' => __( 'Information', 'tpcore' ), ] ); $repeater->add_control( 'image', [ 'type' => Controls_Manager::MEDIA, 'label' => __( 'Image', 'tpcore' ), 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'title', [ 'type' => Controls_Manager::TEXT, 'label_block' => true, 'label' => __( 'Title', 'tpcore' ), 'default' => __( 'TP Member Title', 'tpcore' ), 'placeholder' => __( 'Type title here', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'designation', [ 'type' => Controls_Manager::TEXT, 'label_block' => true, 'show_label' => true, 'label' => __( 'Job Title', 'tpcore' ), 'default' => __( 'TP Officer', 'tpcore' ), 'placeholder' => __( 'Type designation here', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'description', [ 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'show_label' => true, 'label' => __( 'Job Description', 'tpcore' ), 'default' => __( 'Donec rutrum congue leo eget malesuada.', 'tpcore' ), 'placeholder' => __( 'Type description here', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'item_url', [ 'type' => Controls_Manager::TEXT, 'label_block' => true, 'show_label' => false, 'placeholder' => __( 'Type link here', 'tpcore' ), 'default' => __( '#', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->end_controls_tab(); $repeater->start_controls_tab( '_tab_member_links', [ 'label' => __( 'Links', 'tpcore' ), ] ); $repeater->add_control( 'show_social', [ 'label' => __( 'Show Options?', 'tpcore' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'tpcore' ), 'label_off' => __( 'No', 'tpcore' ), 'return_value' => 'yes', 'style_transfer' => true, ] ); $repeater->add_control( 'web_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Website Address', 'tpcore' ), 'placeholder' => __( 'Add your profile link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'email_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Email', 'tpcore' ), 'placeholder' => __( 'Add your email link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'phone_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Phone', 'tpcore' ), 'placeholder' => __( 'Add your phone link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'facebook_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Facebook', 'tpcore' ), 'default' => __( '#', 'tpcore' ), 'placeholder' => __( 'Add your facebook link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'twitter_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Twitter', 'tpcore' ), 'default' => __( '#', 'tpcore' ), 'placeholder' => __( 'Add your twitter link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'instagram_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Instagram', 'tpcore' ), 'default' => __( '#', 'tpcore' ), 'placeholder' => __( 'Add your instagram link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'linkedin_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'LinkedIn', 'tpcore' ), 'placeholder' => __( 'Add your linkedin link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'youtube_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Youtube', 'tpcore' ), 'placeholder' => __( 'Add your youtube link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'skype_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Skype', 'tpcore' ), 'placeholder' => __( 'Add your skype link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'googleplus_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Google Plus', 'tpcore' ), 'placeholder' => __( 'Add your Google Plus link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'flickr_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Flickr', 'tpcore' ), 'placeholder' => __( 'Add your flickr link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'vimeo_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Vimeo', 'tpcore' ), 'placeholder' => __( 'Add your vimeo link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'behance_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Behance', 'tpcore' ), 'placeholder' => __( 'Add your hehance link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'dribble_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Dribbble', 'tpcore' ), 'placeholder' => __( 'Add your dribbble link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'pinterest_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Pinterest', 'tpcore' ), 'placeholder' => __( 'Add your pinterest link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->add_control( 'gitub_title', [ 'type' => Controls_Manager::TEXT, 'label_block' => false, 'label' => __( 'Github', 'tpcore' ), 'placeholder' => __( 'Add your github link', 'tpcore' ), 'dynamic' => [ 'active' => true, ] ] ); $repeater->end_controls_tab(); $repeater->end_controls_tabs(); // REPEATER $this->add_control( 'teams', [ 'show_label' => false, 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '<# print(title || "Carousel Item"); #>', 'default' => [ [ 'image' => [ 'url' => Utils::get_placeholder_image_src(), ], ], [ 'image' => [ 'url' => Utils::get_placeholder_image_src(), ], ], [ 'image' => [ 'url' => Utils::get_placeholder_image_src(), ], ], [ 'image' => [ 'url' => Utils::get_placeholder_image_src(), ], ], [ 'image' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ] ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'thumbnail', 'default' => 'medium_large', 'separator' => 'before', 'exclude' => [ 'custom' ] ] ); $this->add_control( 'title_tag', [ 'label' => __( 'Title HTML Tag', 'tpcore' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'h1' => [ 'title' => __( 'H1', 'tpcore' ), 'icon' => 'eicon-editor-h1' ], 'h2' => [ 'title' => __( 'H2', 'tpcore' ), 'icon' => 'eicon-editor-h2' ], 'h3' => [ 'title' => __( 'H3', 'tpcore' ), 'icon' => 'eicon-editor-h3' ], 'h4' => [ 'title' => __( 'H4', 'tpcore' ), 'icon' => 'eicon-editor-h4' ], 'h5' => [ 'title' => __( 'H5', 'tpcore' ), 'icon' => 'eicon-editor-h5' ], 'h6' => [ 'title' => __( 'H6', 'tpcore' ), 'icon' => 'eicon-editor-h6' ] ], 'default' => 'h3', 'toggle' => false, ] ); $this->add_responsive_control( 'align', [ 'label' => __( 'Alignment', 'tpcore' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'tpcore' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'tpcore' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'tpcore' ), 'icon' => 'eicon-text-align-right', ], ], 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .single-carousel-item' => 'text-align: {{VALUE}};' ] ] ); $this->end_controls_section(); // tp_team_columns_section $this->start_controls_section( 'tp_columns_section', [ 'label' => esc_html__('Team - Columns', 'tpcore'), 'condition' => [ 'tp_design_style' => ['layout-3', 'layout-4'] ] ] ); $this->add_control( 'tp_col_for_desktop', [ 'label' => esc_html__( 'Columns for Desktop', 'tpcore' ), 'description' => esc_html__( 'Screen width equal to or greater than 992px', 'tpcore' ), 'type' => Controls_Manager::SELECT, 'options' => [ 12 => esc_html__( '1 Columns', 'tpcore' ), 6 => esc_html__( '2 Columns', 'tpcore' ), 4 => esc_html__( '3 Columns', 'tpcore' ), 3 => esc_html__( '4 Columns', 'tpcore' ), 2 => esc_html__( '6 Columns', 'tpcore' ), 1 => esc_html__( '12 Columns', 'tpcore' ), ], 'separator' => 'before', 'default' => '4', 'style_transfer' => true, ] ); $this->add_control( 'tp_col_for_laptop', [ 'label' => esc_html__( 'Columns for Laptop', 'tpcore' ), 'description' => esc_html__( 'Screen width equal to or greater than 768px', 'tpcore' ), 'type' => Controls_Manager::SELECT, 'options' => [ 12 => esc_html__( '1 Columns', 'tpcore' ), 6 => esc_html__( '2 Columns', 'tpcore' ), 4 => esc_html__( '3 Columns', 'tpcore' ), 3 => esc_html__( '4 Columns', 'tpcore' ), 2 => esc_html__( '6 Columns', 'tpcore' ), 1 => esc_html__( '12 Columns', 'tpcore' ), ], 'separator' => 'before', 'default' => '4', 'style_transfer' => true, ] ); $this->add_control( 'tp_col_for_tablet', [ 'label' => esc_html__( 'Columns for Tablet', 'tpcore' ), 'description' => esc_html__( 'Screen width equal to or greater than 576px', 'tpcore' ), 'type' => Controls_Manager::SELECT, 'options' => [ 12 => esc_html__( '1 Columns', 'tpcore' ), 6 => esc_html__( '2 Columns', 'tpcore' ), 4 => esc_html__( '3 Columns', 'tpcore' ), 3 => esc_html__( '4 Columns', 'tpcore' ), 2 => esc_html__( '6 Columns', 'tpcore' ), 1 => esc_html__( '12 Columns', 'tpcore' ), ], 'separator' => 'before', 'default' => '6', 'style_transfer' => true, ] ); $this->add_control( 'tp_col_for_mobile', [ 'label' => esc_html__( 'Columns for Mobile', 'tpcore' ), 'description' => esc_html__( 'Screen width less than 576px', 'tpcore' ), 'type' => Controls_Manager::SELECT, 'options' => [ 12 => esc_html__( '1 Columns', 'tpcore' ), 6 => esc_html__( '2 Columns', 'tpcore' ), 4 => esc_html__( '3 Columns', 'tpcore' ), 3 => esc_html__( '4 Columns', 'tpcore' ), 5 => esc_html__( '5 Columns (For Carousel Item)', 'tpcore' ), 2 => esc_html__( '6 Columns', 'tpcore' ), 1 => esc_html__( '12 Columns', 'tpcore' ), ], 'separator' => 'before', 'default' => '12', 'style_transfer' => true, ] ); $this->end_controls_section(); } // style_tab_content protected function style_tab_content(){ $this->tp_section_style_controls('team_section', 'Section Style', '.ele-section'); $this->tp_basic_style_controls('team_sub_title', 'Subtitle Style', '.ele-subtitle'); $this->tp_basic_style_controls('team_title', 'Title Style', '.ele-title'); $this->tp_basic_style_controls('team_content', 'Content Style', '.ele-content'); $this->tp_basic_style_controls('team_item_name', 'Team Item Name Style', '.ele-item-name'); $this->tp_basic_style_controls('team_item_desi', 'Team Item Designation Style', '.ele-item-desi'); $this->tp_basic_style_controls('team_item_content', 'Team Item Content Style', '.ele-item-content'); } /** * Render the widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?> <!-- style 2 --> <?php if ( $settings['tp_design_style'] === 'layout-2' ): $this->add_render_attribute( 'title', 'class', 'tp-section__title mb-70 ele-title' ); $this->add_render_attribute( 'title_team', 'class', 'team-item__title mb-15 ele-item-name' ); ?> <section class="team-area pb-55 ele-section"> <div class="container"> <div class="p-relative"> <?php if ( !empty($settings['tp_section_title_show']) ) : ?> <div class="row"> <div class="col-lg-12"> <div class="tp-section text-center"> <?php if ( !empty($settings['tp_sub_title']) ) : ?> <span class="tp-section__sub-title left-line right-line mb-25 ele-subtitle"><?php echo tp_kses( $settings['tp_sub_title'] ); ?></span> <?php endif; ?> <?php if ( !empty($settings['tp_title' ]) ) : printf( '<%1$s %2$s>%3$s</%1$s>', tag_escape( $settings['tp_title_tag'] ), $this->get_render_attribute_string( 'title' ), tp_kses( $settings['tp_title' ] ) ); endif; ?> <?php if ( !empty($settings['tp_description']) ) : ?> <p class="ele-content"><?php echo tp_kses( $settings['tp_description'] ); ?></p> <?php endif; ?> </div> </div> </div> <?php endif; ?> <div class="swiper-container tp-team-active wow fadeInUp" data-wow-delay=".3s"> <div class="swiper-wrapper"> <?php foreach ( $settings['teams'] as $item ) : $title = tp_kses( $item['title' ] ); $item_url = esc_url($item['item_url']); if ( !empty($item['image']['url']) ) { $tp_team_image_url = !empty($item['image']['id']) ? wp_get_attachment_image_url( $item['image']['id'], $settings['thumbnail_size']) : $item['image']['url']; $tp_team_image_alt = get_post_meta($item["image"]["id"], "_wp_attachment_image_alt", true); } ?> <div class="swiper-slide"> <div class="team-item mb-30"> <?php if( !empty($tp_team_image_url) ) : ?> <div class="team-item__thumb mb-40"> <img src="<?php echo esc_url($tp_team_image_url); ?>" alt="<?php echo esc_attr($tp_team_image_alt); ?>"> </div> <?php endif; ?> <div class="team-item__content"> <?php printf( '<%1$s %2$s><a href="%4$s">%3$s</a></%1$s>', tag_escape( $settings['title_tag'] ), $this->get_render_attribute_string( 'title_team' ), $title, $item_url ); ?> <?php if( !empty($item['designation']) ) : ?> <span class="ele-item-desi"><?php echo tp_kses( $item['designation'] ); ?></span> <?php endif; ?> <?php if( !empty($item['description']) ) : ?> <p class="ele-item-content"><?php echo tp_kses( $item['description'] ); ?></p> <?php endif; ?> <?php if( !empty($item['show_social'] ) ) : ?> <div class="team-item__social-info"> <?php if( !empty($item['web_title'] ) ) : ?> <a href="<?php echo esc_url( $item['web_title'] ); ?>"><i class="fa-regular fa-globe"></i></a> <?php endif; ?> <?php if( !empty($item['email_title'] ) ) : ?> <a href="mailto:<?php echo esc_url( $item['email_title'] ); ?>"><i class="fa-regular fa-envelope"></i></a> <?php endif; ?> <?php if( !empty($item['phone_title'] ) ) : ?> <a href="tell:<?php echo esc_url( $item['phone_title'] ); ?>"><i class="fa-regular fa-phone"></i></a> <?php endif; ?> <?php if( !empty($item['facebook_title'] ) ) : ?> <a href="<?php echo esc_url( $item['facebook_title'] ); ?>"><i class="fa-brands fa-facebook-f"></i></a> <?php endif; ?> <?php if( !empty($item['twitter_title'] ) ) : ?> <a href="<?php echo esc_url( $item['twitter_title'] ); ?>"><i class="fa-brands fa-twitter"></i></a> <?php endif; ?> <?php if( !empty($item['instagram_title'] ) ) : ?> <a href="<?php echo esc_url( $item['instagram_title'] ); ?>"><i class="fa-brands fa-instagram"></i></a> <?php endif; ?> <?php if( !empty($item['linkedin_title'] ) ) : ?> <a href="<?php echo esc_url( $item['linkedin_title'] ); ?>"><i class="fa-brands fa-linkedin-in"></i></a> <?php endif; ?> <?php if( !empty($item['youtube_title'] ) ) : ?> <a href="<?php echo esc_url( $item['youtube_title'] ); ?>"><i class="fa-brands fa-youtube"></i></a> <?php endif; ?> <?php if( !empty($item['googleplus_title'] ) ) : ?> <a href="<?php echo esc_url( $item['googleplus_title'] ); ?>"><i class="fa-brands fa-google-plus-g"></i></a> <?php endif; ?> <?php if( !empty($item['flickr_title'] ) ) : ?> <a href="<?php echo esc_url( $item['flickr_title'] ); ?>"><i class="fa-brands fa-flickr"></i></a> <?php endif; ?> <?php if( !empty($item['vimeo_title'] ) ) : ?> <a href="<?php echo esc_url( $item['vimeo_title'] ); ?>"><i class="fa-brands fa-vimeo-v"></i></a> <?php endif; ?> <?php if( !empty($item['behance_title'] ) ) : ?> <a href="<?php echo esc_url( $item['behance_title'] ); ?>"><i class="fa-brands fa-behance"></i></a> <?php endif; ?> <?php if( !empty($item['dribble_title'] ) ) : ?> <a href="<?php echo esc_url( $item['dribble_title'] ); ?>"><i class="fa-brands fa-dribbble"></i></a> <?php endif; ?> <?php if( !empty($item['pinterest_title'] ) ) : ?> <a href="<?php echo esc_url( $item['pinterest_title'] ); ?>"><i class="fa-brands fa-pinterest-p"></i></a> <?php endif; ?> <?php if( !empty($item['gitub_title'] ) ) : ?> <a href="<?php echo esc_url( $item['gitub_title'] ); ?>"><i class="fa-brands fa-github"></i></a> <?php endif; ?> </div> <?php endif; ?> </div> </div> </div> <?php endforeach; ?> </div> </div> <div class="team-arrow"> <div class="team-prv"><i class="fa-regular fa-arrow-left"></i></div> <div class="team-nxt"><i class="fa-regular fa-arrow-right"></i></div> </div> </div> </div> </section> <!-- style 3 --> <?php elseif ( $settings['tp_design_style'] === 'layout-3' ): $this->add_render_attribute( 'title_team', 'class', 'team-item__title mb-15 ele-item-name' ); ?> <div class="row"> <?php foreach ( $settings['teams'] as $item ) : $title = tp_kses( $item['title' ] ); $item_url = esc_url($item['item_url']); if ( !empty($item['image']['url']) ) { $tp_team_image_url = !empty($item['image']['id']) ? wp_get_attachment_image_url( $item['image']['id'], $settings['thumbnail_size']) : $item['image']['url']; $tp_team_image_alt = get_post_meta($item["image"]["id"], "_wp_attachment_image_alt", true); } ?> <div class="col-xl-<?php echo esc_attr($settings['tp_col_for_desktop']); ?> col-lg-<?php echo esc_attr($settings['tp_col_for_laptop']); ?> col-md-<?php echo esc_attr($settings['tp_col_for_tablet']); ?> col-<?php echo esc_attr($settings['tp_col_for_mobile']); ?>"> <div class="team-item mb-35 wow fadeInUp" data-wow-delay=".2s"> <?php if( !empty($tp_team_image_url) ) : ?> <div class="team-item__thumb mb-40"> <img src="<?php echo esc_url($tp_team_image_url); ?>" alt="<?php echo esc_attr($tp_team_image_alt); ?>"> </div> <?php endif; ?> <div class="team-item__content"> <?php printf( '<%1$s %2$s><a href="%4$s">%3$s</a></%1$s>', tag_escape( $settings['title_tag'] ), $this->get_render_attribute_string( 'title_team' ), $title, $item_url ); ?> <?php if( !empty($item['designation']) ) : ?> <span class="ele-item-desi"><?php echo tp_kses( $item['designation'] ); ?></span> <?php endif; ?> <?php if( !empty($item['description']) ) : ?> <p class="ele-item-content"><?php echo tp_kses( $item['description'] ); ?></p> <?php endif; ?> <?php if( !empty($item['show_social'] ) ) : ?> <div class="team-item__social-info"> <?php if( !empty($item['web_title'] ) ) : ?> <a href="<?php echo esc_url( $item['web_title'] ); ?>"><i class="fa-regular fa-globe"></i></a> <?php endif; ?> <?php if( !empty($item['email_title'] ) ) : ?> <a href="mailto:<?php echo esc_url( $item['email_title'] ); ?>"><i class="fa-regular fa-envelope"></i></a> <?php endif; ?> <?php if( !empty($item['phone_title'] ) ) : ?> <a href="tell:<?php echo esc_url( $item['phone_title'] ); ?>"><i class="fa-regular fa-phone"></i></a> <?php endif; ?> <?php if( !empty($item['facebook_title'] ) ) : ?> <a href="<?php echo esc_url( $item['facebook_title'] ); ?>"><i class="fa-brands fa-facebook-f"></i></a> <?php endif; ?> <?php if( !empty($item['twitter_title'] ) ) : ?> <a href="<?php echo esc_url( $item['twitter_title'] ); ?>"><i class="fa-brands fa-twitter"></i></a> <?php endif; ?> <?php if( !empty($item['instagram_title'] ) ) : ?> <a href="<?php echo esc_url( $item['instagram_title'] ); ?>"><i class="fa-brands fa-instagram"></i></a> <?php endif; ?> <?php if( !empty($item['linkedin_title'] ) ) : ?> <a href="<?php echo esc_url( $item['linkedin_title'] ); ?>"><i class="fa-brands fa-linkedin-in"></i></a> <?php endif; ?> <?php if( !empty($item['youtube_title'] ) ) : ?> <a href="<?php echo esc_url( $item['youtube_title'] ); ?>"><i class="fa-brands fa-youtube"></i></a> <?php endif; ?> <?php if( !empty($item['googleplus_title'] ) ) : ?> <a href="<?php echo esc_url( $item['googleplus_title'] ); ?>"><i class="fa-brands fa-google-plus-g"></i></a> <?php endif; ?> <?php if( !empty($item['flickr_title'] ) ) : ?> <a href="<?php echo esc_url( $item['flickr_title'] ); ?>"><i class="fa-brands fa-flickr"></i></a> <?php endif; ?> <?php if( !empty($item['vimeo_title'] ) ) : ?> <a href="<?php echo esc_url( $item['vimeo_title'] ); ?>"><i class="fa-brands fa-vimeo-v"></i></a> <?php endif; ?> <?php if( !empty($item['behance_title'] ) ) : ?> <a href="<?php echo esc_url( $item['behance_title'] ); ?>"><i class="fa-brands fa-behance"></i></a> <?php endif; ?> <?php if( !empty($item['dribble_title'] ) ) : ?> <a href="<?php echo esc_url( $item['dribble_title'] ); ?>"><i class="fa-brands fa-dribbble"></i></a> <?php endif; ?> <?php if( !empty($item['pinterest_title'] ) ) : ?> <a href="<?php echo esc_url( $item['pinterest_title'] ); ?>"><i class="fa-brands fa-pinterest-p"></i></a> <?php endif; ?> <?php if( !empty($item['gitub_title'] ) ) : ?> <a href="<?php echo esc_url( $item['gitub_title'] ); ?>"><i class="fa-brands fa-github"></i></a> <?php endif; ?> </div> <?php endif; ?> </div> </div> </div> <?php endforeach; ?> </div> <!-- style 4 --> <?php elseif ( $settings['tp_design_style'] === 'layout-4' ): $this->add_render_attribute( 'title_team', 'class', 'tp-team__title mb-15 ele-item-name' ); ?> <div class="row"> <?php foreach ( $settings['teams'] as $item ) : $title = tp_kses( $item['title' ] ); $item_url = esc_url($item['item_url']); if ( !empty($item['image']['url']) ) { $tp_team_image_url = !empty($item['image']['id']) ? wp_get_attachment_image_url( $item['image']['id'], $settings['thumbnail_size']) : $item['image']['url']; $tp_team_image_alt = get_post_meta($item["image"]["id"], "_wp_attachment_image_alt", true); } ?> <div class="col-xl-<?php echo esc_attr($settings['tp_col_for_desktop']); ?> col-lg-<?php echo esc_attr($settings['tp_col_for_laptop']); ?> col-md-<?php echo esc_attr($settings['tp_col_for_tablet']); ?> col-<?php echo esc_attr($settings['tp_col_for_mobile']); ?>"> <div class="tp-team mb-50 wow fadeInUp" data-wow-delay=".2s"> <?php if( !empty($tp_team_image_url) ) : ?> <div class="tp-team__thumb fix"> <img src="<?php echo esc_url($tp_team_image_url); ?>" alt="<?php echo esc_attr($tp_team_image_alt); ?>"> </div> <?php endif; ?> <div class="tp-team__content"> <?php printf( '<%1$s %2$s><a href="%4$s">%3$s</a></%1$s>', tag_escape( $settings['title_tag'] ), $this->get_render_attribute_string( 'title_team' ), $title, $item_url ); ?> <?php if( !empty($item['designation']) ) : ?> <span class="tp-team__position mb-30 ele-item-desi"><?php echo tp_kses( $item['designation'] ); ?></span> <?php endif; ?> <?php if( !empty($item['description']) ) : ?> <p class="ele-item-content"><?php echo tp_kses( $item['description'] ); ?></p> <?php endif; ?> <?php if( !empty($item['show_social'] ) ) : ?> <div class="tp-team__social"> <?php if( !empty($item['web_title'] ) ) : ?> <a href="<?php echo esc_url( $item['web_title'] ); ?>"><i class="fa-regular fa-globe"></i></a> <?php endif; ?> <?php if( !empty($item['email_title'] ) ) : ?> <a href="mailto:<?php echo esc_url( $item['email_title'] ); ?>"><i class="fa-regular fa-envelope"></i></a> <?php endif; ?> <?php if( !empty($item['phone_title'] ) ) : ?> <a href="tell:<?php echo esc_url( $item['phone_title'] ); ?>"><i class="fa-regular fa-phone"></i></a> <?php endif; ?> <?php if( !empty($item['facebook_title'] ) ) : ?> <a class="tp-fb" href="<?php echo esc_url( $item['facebook_title'] ); ?>"><i class="fa-brands fa-facebook-f"></i></a> <?php endif; ?> <?php if( !empty($item['twitter_title'] ) ) : ?> <a class="tp-twitter" href="<?php echo esc_url( $item['twitter_title'] ); ?>"><i class="fa-brands fa-twitter"></i></a> <?php endif; ?> <?php if( !empty($item['instagram_title'] ) ) : ?> <a href="<?php echo esc_url( $item['instagram_title'] ); ?>"><i class="fa-brands fa-instagram"></i></a> <?php endif; ?> <?php if( !empty($item['linkedin_title'] ) ) : ?> <a href="<?php echo esc_url( $item['linkedin_title'] ); ?>"><i class="fa-brands fa-linkedin-in"></i></a> <?php endif; ?> <?php if( !empty($item['youtube_title'] ) ) : ?> <a class="tp-youtube" href="<?php echo esc_url( $item['youtube_title'] ); ?>"><i class="fa-brands fa-youtube"></i></a> <?php endif; ?> <?php if( !empty($item['skype_title'] ) ) : ?> <a class="tp-skype" href="<?php echo esc_url( $item['skype_title'] ); ?>"><i class="fa-brands fa-skype"></i></a> <?php endif; ?> <?php if( !empty($item['googleplus_title'] ) ) : ?> <a href="<?php echo esc_url( $item['googleplus_title'] ); ?>"><i class="fa-brands fa-google-plus-g"></i></a> <?php endif; ?> <?php if( !empty($item['flickr_title'] ) ) : ?> <a href="<?php echo esc_url( $item['flickr_title'] ); ?>"><i class="fa-brands fa-flickr"></i></a> <?php endif; ?> <?php if( !empty($item['vimeo_title'] ) ) : ?> <a href="<?php echo esc_url( $item['vimeo_title'] ); ?>"><i class="fa-brands fa-vimeo-v"></i></a> <?php endif; ?> <?php if( !empty($item['behance_title'] ) ) : ?> <a href="<?php echo esc_url( $item['behance_title'] ); ?>"><i class="fa-brands fa-behance"></i></a> <?php endif; ?> <?php if( !empty($item['dribble_title'] ) ) : ?> <a href="<?php echo esc_url( $item['dribble_title'] ); ?>"><i class="fa-brands fa-dribbble"></i></a> <?php endif; ?> <?php if( !empty($item['pinterest_title'] ) ) : ?> <a href="<?php echo esc_url( $item['pinterest_title'] ); ?>"><i class="fa-brands fa-pinterest-p"></i></a> <?php endif; ?> <?php if( !empty($item['gitub_title'] ) ) : ?> <a href="<?php echo esc_url( $item['gitub_title'] ); ?>"><i class="fa-brands fa-github"></i></a> <?php endif; ?> </div> <?php endif; ?> </div> </div> </div> <?php endforeach; ?> </div> <!-- style default --> <?php else : $this->add_render_attribute( 'title', 'class', 'tp-section__title mb-75 ele-title' ); $this->add_render_attribute( 'title_team', 'class', 'tp-team__title mb-15 ele-item-name' ); ?> <section class="team-area ele-section"> <div class="container"> <div class="row align-items-center"> <div class="col-lg-8 col-md-8 col-12"> <?php if ( !empty($settings['tp_section_title_show']) ) : ?> <div class="tp-section"> <?php if ( !empty($settings['tp_sub_title']) ) : ?> <span class="tp-section__sub-title left-line mb-25 ele-subtitle"><?php echo tp_kses( $settings['tp_sub_title'] ); ?></span> <?php endif; ?> <?php if ( !empty($settings['tp_title' ]) ) : printf( '<%1$s %2$s>%3$s</%1$s>', tag_escape( $settings['tp_title_tag'] ), $this->get_render_attribute_string( 'title' ), tp_kses( $settings['tp_title' ] ) ); endif; ?> <?php if ( !empty($settings['tp_description']) ) : ?> <p class="ele-content"><?php echo tp_kses( $settings['tp_description'] ); ?></p> <?php endif; ?> </div> <?php endif; ?> </div> <div class="col-lg-4 col-md-4 col-12"> <div class="tp-team-arrow d-flex align-items-center"> <div class="team-p"><i class="fa-regular fa-arrow-left"></i></div> <div class="team-n"><i class="fa-regular fa-arrow-right"></i></div> </div> </div> </div> <div class="swiper-container team-active wow fadeInUp" data-wow-delay=".3s"> <div class="swiper-wrapper"> <?php foreach ( $settings['teams'] as $item ) : $title = tp_kses( $item['title' ] ); $item_url = esc_url($item['item_url']); if ( !empty($item['image']['url']) ) { $tp_team_image_url = !empty($item['image']['id']) ? wp_get_attachment_image_url( $item['image']['id'], $settings['thumbnail_size']) : $item['image']['url']; $tp_team_image_alt = get_post_meta($item["image"]["id"], "_wp_attachment_image_alt", true); } ?> <div class="swiper-slide"> <div class="tp-team mb-50"> <?php if( !empty($tp_team_image_url) ) : ?> <div class="tp-team__thumb fix"> <img src="<?php echo esc_url($tp_team_image_url); ?>" alt="<?php echo esc_attr($tp_team_image_alt); ?>"> </div> <?php endif; ?> <div class="tp-team__content"> <?php printf( '<%1$s %2$s><a href="%4$s">%3$s</a></%1$s>', tag_escape( $settings['title_tag'] ), $this->get_render_attribute_string( 'title_team' ), $title, $item_url ); ?> <?php if( !empty($item['designation']) ) : ?> <span class="tp-team__position mb-30 ele-item-desi"><?php echo tp_kses( $item['designation'] ); ?></span> <?php endif; ?> <?php if( !empty($item['description']) ) : ?> <p class="ele-item-content"><?php echo tp_kses( $item['description'] ); ?></p> <?php endif; ?> <?php if( !empty($item['show_social'] ) ) : ?> <div class="tp-team__social"> <?php if( !empty($item['web_title'] ) ) : ?> <a href="<?php echo esc_url( $item['web_title'] ); ?>"><i class="fa-regular fa-globe"></i></a> <?php endif; ?> <?php if( !empty($item['email_title'] ) ) : ?> <a href="mailto:<?php echo esc_url( $item['email_title'] ); ?>"><i class="fa-regular fa-envelope"></i></a> <?php endif; ?> <?php if( !empty($item['phone_title'] ) ) : ?> <a href="tell:<?php echo esc_url( $item['phone_title'] ); ?>"><i class="fa-regular fa-phone"></i></a> <?php endif; ?> <?php if( !empty($item['facebook_title'] ) ) : ?> <a class="tp-fb" href="<?php echo esc_url( $item['facebook_title'] ); ?>"><i class="fa-brands fa-facebook-f"></i></a> <?php endif; ?> <?php if( !empty($item['twitter_title'] ) ) : ?> <a class="tp-twitter" href="<?php echo esc_url( $item['twitter_title'] ); ?>"><i class="fa-brands fa-twitter"></i></a> <?php endif; ?> <?php if( !empty($item['instagram_title'] ) ) : ?> <a href="<?php echo esc_url( $item['instagram_title'] ); ?>"><i class="fa-brands fa-instagram"></i></a> <?php endif; ?> <?php if( !empty($item['linkedin_title'] ) ) : ?> <a href="<?php echo esc_url( $item['linkedin_title'] ); ?>"><i class="fa-brands fa-linkedin-in"></i></a> <?php endif; ?> <?php if( !empty($item['youtube_title'] ) ) : ?> <a class="tp-youtube" href="<?php echo esc_url( $item['youtube_title'] ); ?>"><i class="fa-brands fa-youtube"></i></a> <?php endif; ?> <?php if( !empty($item['skype_title'] ) ) : ?> <a class="tp-skype" href="<?php echo esc_url( $item['skype_title'] ); ?>"><i class="fa-brands fa-skype"></i></a> <?php endif; ?> <?php if( !empty($item['googleplus_title'] ) ) : ?> <a href="<?php echo esc_url( $item['googleplus_title'] ); ?>"><i class="fa-brands fa-google-plus-g"></i></a> <?php endif; ?> <?php if( !empty($item['flickr_title'] ) ) : ?> <a href="<?php echo esc_url( $item['flickr_title'] ); ?>"><i class="fa-brands fa-flickr"></i></a> <?php endif; ?> <?php if( !empty($item['vimeo_title'] ) ) : ?> <a href="<?php echo esc_url( $item['vimeo_title'] ); ?>"><i class="fa-brands fa-vimeo-v"></i></a> <?php endif; ?> <?php if( !empty($item['behance_title'] ) ) : ?> <a href="<?php echo esc_url( $item['behance_title'] ); ?>"><i class="fa-brands fa-behance"></i></a> <?php endif; ?> <?php if( !empty($item['dribble_title'] ) ) : ?> <a href="<?php echo esc_url( $item['dribble_title'] ); ?>"><i class="fa-brands fa-dribbble"></i></a> <?php endif; ?> <?php if( !empty($item['pinterest_title'] ) ) : ?> <a href="<?php echo esc_url( $item['pinterest_title'] ); ?>"><i class="fa-brands fa-pinterest-p"></i></a> <?php endif; ?> <?php if( !empty($item['gitub_title'] ) ) : ?> <a href="<?php echo esc_url( $item['gitub_title'] ); ?>"><i class="fa-brands fa-github"></i></a> <?php endif; ?> </div> <?php endif; ?> </div> </div> </div> <?php endforeach; ?> </div> </div> </div> </section> <?php endif; } } $widgets_manager->register( new TP_Team() );