Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
public_html
/
wp-content
/
plugins
/
profundcore
/
addons
/
widgets
/
Editing: team.php
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * profundcore Team widget. * * profundcore widget that displays a Team with the ability to control every * aspect of the Team design. * * @since 1.0.0 */ class profund_Team_Box extends Widget_Base { /** * Get widget name. * * Retrieve Team widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'profund_Team'; } /** * Get widget title. * * Retrieve Team widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return __( 'Team', 'profundcore' ); } /** * Get widget icon. * * Retrieve Team widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-hypster'; } /** * Get widget categories. * * Retrieve the list of categories the Team widget belongs to. * * Used to determine where to display the widget in the editor. * * @since 2.0.0 * @access public * * @return array Widget categories. */ public function get_categories() { return [ 'profund-addons' ]; } public function get_script_depends() { return [ 'slick', 'el-widget-active', ]; } /** * Register Team 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->start_controls_section( 'section_team', [ 'label' => __( 'Team Membar', 'profundcore' ), ] ); $repeater = new Repeater(); $repeater->add_control( 'team_image', [ 'label' => __( 'Choose Image', 'profundcore' ), 'type' => Controls_Manager::MEDIA, 'dynamic' => [ 'active' => true, ], 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $repeater->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'team_image_size', // Usage: `{name}_size` and `{name}_custom_dimension`, in this case `team_image_size` and `team_image_custom_dimension`. 'default' => 'full', 'separator' => 'none', ] ); $repeater->add_control( 'team_posi', [ 'label' => __( 'Position', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'Designer', ] ); $repeater->add_control( 'team_name', [ 'label' => __( 'Name', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'John Doe', ] ); $repeater->add_control( 'fv_link', [ 'label' => __( 'Facebook URL', 'profundcore' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://facebook.com', 'profundcore' ), ] ); $repeater->add_control( 'tw_link', [ 'label' => __( 'Twitter URL', 'profundcore' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://twitter.com', 'profundcore' ), ] ); $repeater->add_control( 'bh_link', [ 'label' => __( 'Behance URL', 'profundcore' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://behance.com', 'profundcore' ), ] ); $repeater->add_control( 'lnk_link', [ 'label' => __( 'Linkedin URL', 'profundcore' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://linkedin.com', 'profundcore' ), ] ); $this->add_control( 'profund_team_list', [ 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'team_posi' => __('Founder','profundcore'), 'team_name' => __('Rosalind D. William','profundcore'), 'fv_link' => __('#','profundcore'), 'tw_link' => __('#','profundcore'), 'bh_link' => __('#','profundcore'), 'lnk_link' => __('#','profundcore'), ], [ 'team_posi' => __('Founder','profundcore'), 'team_name' => __('Rosalind D. William','profundcore'), 'fv_link' => __('#','profundcore'), 'tw_link' => __('#','profundcore'), 'bh_link' => __('#','profundcore'), 'lnk_link' => __('#','profundcore'), ], [ 'team_posi' => __('Founder','profundcore'), 'team_name' => __('Rosalind D. William','profundcore'), 'fv_link' => __('#','profundcore'), 'tw_link' => __('#','profundcore'), 'bh_link' => __('#','profundcore'), 'lnk_link' => __('#','profundcore'), ], [ 'team_posi' => __('Founder','profundcore'), 'team_name' => __('Rosalind D. William','profundcore'), 'fv_link' => __('#','profundcore'), 'tw_link' => __('#','profundcore'), 'bh_link' => __('#','profundcore'), 'lnk_link' => __('#','profundcore'), ], ], 'title_field' => '{{{ team_name }}}', ] ); $this->add_control( 'slider_on', [ 'label' => esc_html__( 'Slider', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', 'separator'=>'before', ] ); $this->end_controls_section(); // Carousel setting $this->start_controls_section( 'slider_option', [ 'label' => esc_html__( 'Carousel Option', 'profundcore' ), 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slitems', [ 'label' => esc_html__( 'Slider Items', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 20, 'step' => 1, 'default' => 3, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slarrows', [ 'label' => esc_html__( 'Slider Arrow', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slprevicon', [ 'label' => __( 'Previous icon', 'profundcore' ), 'type' => Controls_Manager::ICON, 'default' => 'fa fa-angle-left', 'condition' => [ 'slider_on' => 'yes', 'slarrows' => 'yes', ] ] ); $this->add_control( 'slnexticon', [ 'label' => __( 'Next icon', 'profundcore' ), 'type' => Controls_Manager::ICON, 'default' => 'fa fa-angle-right', 'condition' => [ 'slider_on' => 'yes', 'slarrows' => 'yes', ] ] ); $this->add_control( 'sldots', [ 'label' => esc_html__( 'Slider dots', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slpause_on_hover', [ 'type' => Controls_Manager::SWITCHER, 'label_off' => __('No', 'profundcore'), 'label_on' => __('Yes', 'profundcore'), 'return_value' => 'yes', 'default' => 'yes', 'label' => __('Pause on Hover?', 'profundcore'), 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slcentermode', [ 'label' => esc_html__( 'Center Mode', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slcenterpadding', [ 'label' => esc_html__( 'Center padding', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => 50, 'condition' => [ 'slider_on' => 'yes', 'slcentermode' => 'yes', ] ] ); $this->add_control( 'slautolay', [ 'label' => esc_html__( 'Slider auto play', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'separator' => 'before', 'default' => 'no', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slautoplay_speed', [ 'label' => __('Autoplay speed', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 3000, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slanimation_speed', [ 'label' => __('Autoplay animation speed', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 300, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slscroll_columns', [ 'label' => __('Slider item to scroll', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 10, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'heading_tablet', [ 'label' => __( 'Tablet', 'profundcore' ), 'type' => Controls_Manager::HEADING, 'separator' => 'after', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'sltablet_display_columns', [ 'label' => __('Slider Items', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 8, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'sltablet_scroll_columns', [ 'label' => __('Slider item to scroll', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 8, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'sltablet_width', [ 'label' => __('Tablet Resolution', 'profundcore'), 'description' => __('The resolution to tablet.', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 750, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'heading_mobile', [ 'label' => __( 'Mobile Phone', 'profundcore' ), 'type' => Controls_Manager::HEADING, 'separator' => 'after', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slmobile_display_columns', [ 'label' => __('Slider Items', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 4, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slmobile_scroll_columns', [ 'label' => __('Slider item to scroll', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 4, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slmobile_width', [ 'label' => __('Mobile Resolution', 'profundcore'), 'description' => __('The resolution to mobile.', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 480, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->end_controls_section(); // Slider Option end // team Style tab section $this->start_controls_section( 'profundcore_team_area_style_section', [ 'label' => __( 'Area Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'team_area_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .team-member-area' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'team_area_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .team-member-area' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'team_area_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .team-member-area' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); // team section style end // Service Style tab section $this->start_controls_section( 'team_column_style_section', [ 'label' => __( 'Column Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'slider_on!' => 'yes', ] ] ); $this->add_responsive_control( 'team_column_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-team-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'team_column_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-team-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'team_column_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ] ], 'default' => [ 'unit' => '%', 'size' => 50, ], 'selectors' => [ '{{WRAPPER}} .profund-team-content' => 'width: {{SIZE}}{{UNIT}};float: left;', ], ] ); $this->end_controls_section(); // team Style tab section $this->start_controls_section( 'profundcore_team_box_style_section', [ 'label' => __( 'Box Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'team_box_align', [ 'label' => __( 'Alignment', 'profundcore' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'profundcore' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'profundcore' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'profundcore' ), 'icon' => 'fa fa-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'profundcore' ), 'icon' => 'fa fa-align-justify', ], ], 'selectors' => [ '{{WRAPPER}} .team-member-area .profund-team-content .profund-team-box' => 'text-align: {{VALUE}};', ], 'default' => 'center', 'separator' =>'before', ] ); $this->add_responsive_control( 'team_box_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .team-member-area .profund-team-content .profund-team-box' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'team_box_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .team-member-area .profund-team-content .profund-team-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_section(); // team section style end // team Style tab section $this->start_controls_section( 'name_section', [ 'label' => __( 'Name Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'team_title_typography', 'selector' => '{{WRAPPER}} .profund-team-box .details .name', ] ); $this->add_control( 'name_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#151d41', 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .name' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'name_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '40', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .name' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'name_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_section(); // team Style tab section $this->start_controls_section( 'position_section', [ 'label' => __( 'Position Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'position_typography', 'selector' => '{{WRAPPER}} .profund-team-box .details .position', ] ); $this->add_control( 'position_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#72778d', 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .position' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'position_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '5', 'right' => '0', 'bottom' => '10', 'left' => '0', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .position' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'position_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .position' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_section(); // team Style tab section $this->start_controls_section( 'social_section', [ 'label' => __( 'Icon Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->start_controls_tabs('box_icon_style_tab'); $this->start_controls_tab( 'box_icon_normal', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_responsive_control( 'icon_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 40, ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_height', [ 'label' => __( 'Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 40, ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_line_height', [ 'label' => __( 'Line Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 40, ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'line-height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_size', [ 'label' => __( 'Font Icon Size', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'size' => 14, ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'icon_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55c882', 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'icon_background', [ 'label' => __( 'Background Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'icon_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '5', 'bottom' => '0', 'left' => '5', 'isLinked' => false ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'icon_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'icon_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-team-box .details .social a', ] ); $this->add_responsive_control( 'icon_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '100', 'right' => '100', 'bottom' => '100', 'left' => '100', 'isLinked' => true, 'unit' => '%', ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'icon_shadow', 'label' => __( 'Box Shadow', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-team-box .details .social a', ] ); $this->add_control( 'box_icon_transition', [ 'label' => __( 'Transition Duration', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0.3, ], 'range' => [ 'px' => [ 'max' => 3, 'step' => 0.1, ], ], 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a' => 'transition-duration: {{SIZE}}s', ], ] ); $this->end_controls_tab(); // Hover Style tab end $this->start_controls_tab( 'box_icon_hover', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'hover_icon_color', [ 'label' => __( 'Hover Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'hover_icon_background', [ 'label' => __( 'Background Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55c882', 'selectors' => [ '{{WRAPPER}} .profund-team-box .details .social a:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'hover_icon_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-team-box .details .social a:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'hover_icon_shadow', 'label' => __( 'Box Shadow', 'profundcore' ), 'selector' => '{{WRAPPER}} .profund-team-box .details .social a:hover', ] ); $this->end_controls_tab(); // Hover Style tab end $this->end_controls_tabs();// Box Style tabs end $this->end_controls_section(); $this->start_controls_section( 'slider_arrow_style', [ 'label' => __( 'Arrow', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' =>[ 'slider_on' => 'yes', 'slarrows' => 'yes', ], ] ); $this->start_controls_tabs( 'slider_arrow_style_tabs' ); // Normal tab Start $this->start_controls_tab( 'slider_arrow_style_normal_tab', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'slider_arrow_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55c882', 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'slider_arrow_gap', [ 'label' => __( 'Arrow Gap', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => -100, 'max' => 100, 'step' => 1, ] ], 'default' => [ 'unit' => 'px', 'size' => 30, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow.slick-prev' => 'left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow.slick-next' => 'right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_arrow_fontsize', [ 'label' => __( 'Font Size', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 16, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'slider_arrow_background', 'label' => __( 'Background', 'profundcore' ), 'default' => '#ffffff', 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'slider_arrow_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow', ] ); $this->add_responsive_control( 'slider_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->add_responsive_control( 'slider_arrow_height', [ 'label' => __( 'Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 70, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_arrow_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 70, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_arrow_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_tab(); // Normal tab end // Hover tab Start $this->start_controls_tab( 'slider_arrow_style_hover_tab', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'slider_arrow_hover_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'slider_arrow_hover_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'default' => '#ff3d46', 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'slider_arrow_hover_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover', ] ); $this->add_responsive_control( 'slider_arrow_hover_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->end_controls_tab(); // Hover tab end $this->end_controls_tabs(); $this->end_controls_section(); // Style Slider arrow style end // Style Pagination button tab section $this->start_controls_section( 'post_slider_pagination_style_section', [ 'label' => __( 'Pagination', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition'=>[ 'slider_on' => 'yes', 'sldots'=>'yes', ] ] ); $this->start_controls_tabs('pagination_style_tabs'); $this->add_responsive_control( 'pagination_alignment', [ 'label' => __( 'Alignment', 'profundcore' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'profundcore' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'profundcore' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'profundcore' ), 'icon' => 'fa fa-align-right', ], ], 'selectors' => [ '{{WRAPPER}} .slick-dots' => 'text-align: {{VALUE}};' ], 'default' => 'center', 'separator' =>'before', ] ); $this->start_controls_tab( 'pagination_style_normal_tab', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_responsive_control( 'slider_pagination_height', [ 'label' => __( 'Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_pagination_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'pagination_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button', ] ); $this->add_responsive_control( 'pagination_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'pagination_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button', ] ); $this->add_responsive_control( 'pagination_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->add_responsive_control( 'pagination_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'opacity: {{SIZE}}', ], ] ); $this->end_controls_tab(); // Normal Tab end $this->start_controls_tab( 'pagination_style_active_tab', [ 'label' => __( 'Active', 'profundcore' ), ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'pagination_hover_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button:hover, {{WRAPPER}} .profundcore-carousel-activation .slick-dots li.slick-active button', ] ); $this->add_responsive_control( 'slider_pagination_active_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li.slick-active button' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'pagination_active_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li.slick-active button' => 'opacity: {{SIZE}}', ], ] ); $this->end_controls_tab(); // Hover Tab end $this->end_controls_tabs(); $this->end_controls_section(); } /** * Render team widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $html = $social_html = ''; $settings = $this->get_settings_for_display(); $this->add_render_attribute( 'profund_team_slider_attr', 'class', [ 'team-member-area', 'clearfix' ] ); if( $settings['slider_on'] == 'yes' ){ $this->add_render_attribute( 'profund_team_slider_attr', 'class', 'profundcore-carousel-activation' ); $slider_settings = [ 'arrows' => ('yes' === $settings['slarrows']), 'arrow_prev_txt' => $settings['slprevicon'], 'arrow_next_txt' => $settings['slnexticon'], 'dots' => ('yes' === $settings['sldots']), 'autoplay' => ('yes' === $settings['slautolay']), 'autoplay_speed' => absint($settings['slautoplay_speed']), 'animation_speed' => absint($settings['slanimation_speed']), 'pause_on_hover' => ('yes' === $settings['slpause_on_hover']), 'center_mode' => ( 'yes' === $settings['slcentermode']), 'center_padding' => absint($settings['slcenterpadding']), ]; $slider_responsive_settings = [ 'display_columns' => $settings['slitems'], 'scroll_columns' => $settings['slscroll_columns'], 'tablet_width' => $settings['sltablet_width'], 'tablet_display_columns' => $settings['sltablet_display_columns'], 'tablet_scroll_columns' => $settings['sltablet_scroll_columns'], 'mobile_width' => $settings['slmobile_width'], 'mobile_display_columns' => $settings['slmobile_display_columns'], 'mobile_scroll_columns' => $settings['slmobile_scroll_columns'], ]; $slider_settings = array_merge( $slider_settings, $slider_responsive_settings ); $this->add_render_attribute( 'profund_team_slider_attr', 'data-settings', wp_json_encode( $slider_settings ) ); }else { $this->add_render_attribute( 'profund_team_slider_attr', 'class', 'gird-team-members' ); } $html .= '<div '.$this->get_render_attribute_string( 'profund_team_slider_attr' ).' >'; foreach( $settings['profund_team_list'] as $items ): $team_image = Group_Control_Image_Size::get_attachment_image_html( $items, 'team_image_size', 'team_image' ); if ( !empty($items['fv_link']['url']) ) { $social_html .= '<a href="'.esc_url($items['fv_link']['url']).'" '.( ($items['fv_link']['is_external']) ? 'target="_blank"' : '' ).' '.( (!empty( $items['fv_link']['nofollow'])) ? 'rel="nofollow"' : '' ).' ><i class="fab fa-facebook-f"></i></a>'; } if ( !empty($items['tw_link']['url']) ) { $social_html .= '<a href="'.esc_url($items['tw_link']['url']).'" '.( ($items['tw_link']['is_external']) ? 'target="_blank"' : '' ).' '.( (!empty( $items['tw_link']['nofollow'])) ? 'rel="nofollow"' : '' ).' ><i class="fab fa-twitter"></i></a>'; } if ( !empty($items['bh_link']['url']) ) { $social_html .= '<a href="'.esc_url($items['bh_link']['url']).'" '.( ($items['bh_link']['is_external']) ? 'target="_blank"' : '' ).' '.( (!empty( $items['bh_link']['nofollow'])) ? 'rel="nofollow"' : '' ).' ><i class="fab fa-behance"></i></a>'; } if ( !empty($items['lnk_link']['url']) ) { $social_html .= '<a href="'.esc_url($items['lnk_link']['url']).'" '.( ($items['lnk_link']['is_external']) ? 'target="_blank"' : '' ).' '.( (!empty( $items['lnk_link']['nofollow'])) ? 'rel="nofollow"' : '' ).' ><i class="fab fa-linkedin-in"></i></a>'; } $html .= '<div class="profund-team-content">'; $html .= '<div class="profund-team-box">'; if( !empty($team_image) ){ $html .= '<div class="image">'; $html .= $team_image; $html .= '</div>'; } $html .= '<div class="details">'; if( !empty($items['team_name']) ){ $html .= '<h3 class="name">'.esc_html($items['team_name']).'</h3>'; } if( !empty($items['team_posi']) ){ $html .= '<div class="position">'.esc_html($items['team_posi']).'</div>'; } if( !empty($social_html) ){ $html .= '<div class="social">'; $html .= $social_html; $html .= '</div>'; $social_html = ''; } $html .= '</div>'; $html .= '</div>'; $html .= '</div>'; endforeach; $html .= '</div>'; echo $html; } } Plugin::instance()->widgets_manager->register_widget_type( new profund_Team_Box );
Save
Cancel