start_controls_section( 'team_section', [ 'label' => __('Setting', 'bring-back'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $repeater = new \Elementor\Repeater(); // Title $repeater->add_control( 'divTitle', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $repeater->add_control( 'image', [ 'label' => __('Select Staff Image', 'bring-back'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ] ); // Image $repeater->add_control( 'title', [ 'label' => __('Name', 'bring-back'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Jono', 'bring-back'), 'label_block' => true, ] ); // Content $repeater->add_control( 'divContent', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $repeater->add_control( 'content', [ 'label' => __('Position', 'bring-back'), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'default' => __('Designer', 'bring-back') ] ); // Social Links $repeater->add_control( 'divSocial', [ 'label' => __( 'Social Links', 'bring-back' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); // Social Links 1 $repeater->add_control( 'icon1', [ 'label' => __( 'Icon', 'bring-back' ), 'type' => \Elementor\Controls_Manager::ICONS ] ); $repeater->add_control( 'icon_link1', [ 'label' => __( 'Link', 'bring-back' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'bring-back' ) ] ); $repeater->add_control( 'divlink1', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); // Social Links 2 $repeater->add_control( 'icon2', [ 'label' => __( 'Icon', 'bring-back' ), 'type' => \Elementor\Controls_Manager::ICONS ] ); $repeater->add_control( 'icon_link2', [ 'label' => __( 'Link', 'bring-back' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'bring-back' ) ] ); $repeater->add_control( 'divlink2', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); // Social Links 3 $repeater->add_control( 'icon3', [ 'label' => __( 'Icon', 'bring-back' ), 'type' => \Elementor\Controls_Manager::ICONS ] ); $repeater->add_control( 'icon_link3', [ 'label' => __( 'Link', 'bring-back' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'bring-back' ) ] ); // Repeater $this->add_control( 'list', [ 'label' => __('Add New Team', 'bring-back'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '{{{ title }}}', ] ); $this->end_controls_section(); // STYLE Settings $this->start_controls_section( 'team_style_section', [ 'label' => __('Style', 'bring-back'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); // Text Alignment $this->add_control( 'text_alignment', [ 'label' => __('Text Alignment', 'bring-back'), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __('Left', 'bring-back'), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __('Center', 'bring-back'), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __('Right', 'bring-back'), 'icon' => 'fa fa-align-right', ], ], 'default' => 'center', 'toggle' => true, ] ); // Padding $this->add_responsive_control( 'padding', [ 'label' => __( 'Padding', 'bring-back' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'desktop_default' => [ 'size' => 30, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 30, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 30, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .our-team-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); //Title Style $this->add_control( 'title_style', [ 'label' => __('Name', 'bring-back'), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => __('Typography', 'bring-back'), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} h4', ] ); $this->add_control( 'title_color', [ 'label' => __('Text Color', 'bring-back'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#232323', 'selectors' => [ '{{WRAPPER}} h4' => 'color: {{VALUE}}', ], ] ); //Content Style $this->add_control( 'content_style', [ 'label' => __('Position', 'bring-back'), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'label' => __('Typography', 'bring-back'), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} p', ] ); $this->add_control( 'content_color', [ 'label' => __('Text Color', 'bring-back'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#78787c', 'selectors' => [ '{{WRAPPER}} p' => 'color: {{VALUE}}', ], ] ); //Icon Style $this->add_control( 'icon_style', [ 'label' => __('Icons', 'bring-back'), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'icon_color', [ 'label' => __('Color', 'bring-back'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#78787c', 'selectors' => [ '{{WRAPPER}} i' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); } /** * Render oEmbed 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(); if ( $settings['list'] ) { ?>
widgets_manager->register_widget_type( new bring_back_Team() );