start_controls_section( 'section_title', [ 'label' => __( 'Title Element', 'addonnest' ) ] ); $this->add_control( 'team_layout', [ 'label' => __( 'Layout', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => 'Layout 1', '2' => 'Layout 2', ], ] ); $this->add_control( 'team_title', [ 'label' => __( 'Name', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => __( 'Enter Name', 'addonnest' ), 'default' => __( 'Alex Carry', 'addonnest' ), ] ); $this->add_control( 'team_subtitle', [ 'label' => __( 'Designation', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => __( 'Enter Designation', 'addonnest' ), 'default' => __( 'Developer', 'addonnest' ), ] ); $this->add_control( 'team_desc', [ 'label' => __( 'Description', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'label_block' => true, 'placeholder' => __( 'Enter Description', 'addonnest' ), 'default' => __( 'Write your description content of this section.', 'addonnest' ), 'condition' => ['team_layout' => '2'], ] ); $this->add_control( 'team_image', [ 'label' => __( 'Team Image', 'addonnest' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'label_block' => true, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ] ); $this->end_controls_section(); /** * Settings * */ $this->start_controls_section( 'section_title_style', [ 'label' => __( 'Settings', 'addonnest' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'name_color', [ 'label' => __( 'Background Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .member-single-item:before' => 'background-color: {{VALUE}};', '{{WRAPPER}} .addonnest-members-wrap.style-2 .member-single-item .member-info' => 'background: {{VALUE}};', ], ] ); $this->add_responsive_control( 'contents_padding', [ 'label' => __( 'Content Padding', 'addonnest' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .member-single-item .member-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); # Banner Title $this->add_control( 'member_name_title', [ 'label' => esc_html__( 'Member Name', 'addonnest' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'member_name_color', [ 'label' => __( 'Name Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .member-info h3' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'name_typography', 'selector' => '{{WRAPPER}} .member-info h3', ] ); $this->add_responsive_control( 'name_title_space', [ 'label' => esc_html__( 'Spacing', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 5, ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .member-info h3' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); # Banner Title $this->add_control( 'designation_title', [ 'label' => esc_html__( 'Designation Title', 'addonnest' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'designation_color', [ 'label' => __( 'Designation Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .member-info span' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'designation_typography', 'selector' => '{{WRAPPER}} .member-info span', ] ); $this->add_responsive_control( 'designation_space', [ 'label' => esc_html__( 'Spacing', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 5, ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .member-info span' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); # Banner Title $this->add_control( 'description_title', [ 'label' => esc_html__( 'Description Title', 'addonnest' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', 'condition' => ['team_layout' => '2'], ] ); $this->add_control( 'description_color', [ 'label' => __( 'Description Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .style-2 .member-info p.description' => 'color: {{VALUE}};', ], 'condition' => ['team_layout' => '2'], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'description_typography', 'selector' => '{{WRAPPER}} .style-2 .member-info p.description', 'condition' => ['team_layout' => '2'], ] ); $this->end_controls_section(); # Designation Section end 3 } protected function render( ) { $settings = $this->get_settings(); $layout = $settings['team_layout']; $title = $settings['team_title']; $subtitle = $settings['team_subtitle']; $desc = $settings['team_desc']; $image = $settings['team_image']; # Default Value $data_img = $data_subtitle = $data_desc = ''; # Team Tmage if ( ! empty( $image['id'] ) ) { $data_img = '
'; $data_desc .= wp_kses_post($desc); $data_desc .= '
'; } ?>