start_controls_section( 'content_section', [ 'label' => esc_html__( 'Content', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'image', [ 'label' => esc_html__( 'Choose Image', 'nighty' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ] ); $this->add_control( 'url_text', [ 'label' => esc_html__( 'Text Button', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'View more', 'nighty' ), ] ); $this->add_control( 'website_link', [ 'label' => esc_html__( 'Link', 'nighty' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'nighty' ), 'options' => [ 'url', 'is_external', 'nofollow' ], 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, 'custom_attributes' => '', ], 'label_block' => true, ] ); $this->add_control( 'name', [ 'label' => esc_html__( 'Name', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'Alextina Ditarson', 'nighty' ), 'placeholder' => esc_html__( 'Type your name here', 'nighty' ), ] ); $this->add_control( 'job', [ 'label' => esc_html__( 'Job', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'Graphic Desinger', 'nighty' ), 'placeholder' => esc_html__( 'Type your job here', 'nighty' ), ] ); $repeater = new \Elementor\Repeater(); $repeater->add_control( 'list_icon', [ 'label' => esc_html__( 'Icon', 'nighty' ), 'type' => \Elementor\Controls_Manager::ICONS, 'label_block' => true, ], ); $repeater->add_control( 'list_link', [ 'label' => esc_html__( 'Link', 'nighty' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'nighty' ), 'options' => [ 'url', 'is_external', 'nofollow' ], 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, 'custom_attributes' => '', ], 'label_block' => true, ] ); $this->add_control( 'socials', [ 'label' => esc_html__( 'Socials', 'nighty' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'list_icon' => [ 'value' => 'fab fa-facebook-f', 'library' => 'fa-solid', ], ], [ 'list_icon' => [ 'value' => 'fab fa-twitter', 'library' => 'fa-solid', ], ], [ 'list_icon' => [ 'value' => 'fab fa-linkedin', 'library' => 'fa-solid', ], ], [ 'list_icon' => [ 'value' => 'fab fa-youtube', 'library' => 'fa-solid', ], ], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'settings_section', [ 'label' => esc_html__( 'Settings', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'item_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'item_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'background_color', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info' => 'background-color: {{VALUE}}', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'name_section', [ 'label' => esc_html__( 'Name', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'name_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info .left h5' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'name_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info .left h5' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'name_typography', 'selector' => '{{WRAPPER}} .ova-our-team-2 .info .left h5', ] ); $this->add_control( 'name_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info .left h5' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'job_section', [ 'label' => esc_html__( 'Job', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'job_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info .left p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'job_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info .left p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'job_typography', 'selector' => '{{WRAPPER}} .ova-our-team-2 .info .left p', ] ); $this->add_control( 'job_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .info .left p' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'url_text_section', [ 'label' => esc_html__( 'Url Text', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'url_text_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .view-more' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'url_text_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .view-more' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'url_text_typography', 'selector' => '{{WRAPPER}} .ova-our-team-2 .image .view-more', ] ); $this->add_control( 'url_text_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .view-more' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'url_text_background_color', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .view-more' => 'background-color: {{VALUE}}', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'socials_section', [ 'label' => esc_html__( 'Socials', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'socials_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .socials li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'socials_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .socials li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'socials_size', [ 'label' => esc_html__( 'Size', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .socials li a i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'socials_gap', [ 'label' => esc_html__( 'Gap', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .socials' => 'row-gap: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'icon_color', [ 'label' => esc_html__( 'Hover Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .socials li:hover a' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'icon_background_color', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-our-team-2 .image .socials' => 'background-color: {{VALUE}}', ], ] ); $this->end_controls_section(); } // Render Template Here protected function render() { $settings = $this->get_settings(); $url_text = $settings['url_text']; $name = $settings['name']; $job = $settings['job']; $socials = $settings['socials']; $img_url = $settings['image']['url']; $img_alt = ( isset( $settings['image']['alt']) && $settings['image']['alt'] != '' ) ? $settings['image']['alt'] : $name; $link = $settings['website_link']['url']; $target = ( isset( $settings['website_link']['is_external'] ) && $settings['website_link']['is_external'] == 'on' ) ? '_blank' : '_self'; $nofollow = ( isset( $settings['website_link']['nofollow'] ) && $settings['website_link']['nofollow'] ) ? ' rel="nofollow"' : ''; ?>
register( new Nighty_Elementor_Our_Team_2() );