start_controls_section( 'info_box_section', [ 'label' => __( 'Setting', 'bring-back' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'icon', [ 'label' => __( 'Choose small Image', 'bring-back' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'bring-back' ), 'label_block' => true, 'type' => \Elementor\Controls_Manager::TEXT ] ); $this->add_control( 'paragraph', [ 'label' => __( 'Paragraph', 'bring-back' ), 'type' => \Elementor\Controls_Manager::TEXTAREA ] ); $this->add_control( 'btn_url', [ 'label' => __( 'Link', 'bring-back' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'bring-back' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, ], ] ); $this->end_controls_section(); // STYLE Settings $this->start_controls_section( 'info_box_style_section', [ 'label' => __( 'Style', 'bring-back' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); //Button Style $this->add_control( 'icon_style', [ 'label' => __( 'Icon', 'bring-back' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'icon_color', [ 'label' => __( 'BG Color', 'bring-back' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => 'fff4ed', 'selectors' => [ '{{WRAPPER}} .box-icon' => 'background-color: {{VALUE}}', '{{WRAPPER}} .services-box:hover' => 'border-color: {{VALUE}}' ], ] ); //Title Style $this->add_control( 'title_style', [ 'label' => __( 'Title', '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}} h3', ] ); $this->add_control( 'title_color', [ 'label' => __( 'Text Color', 'bring-back' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '232323', 'selectors' => [ '{{WRAPPER}} h3' => 'color: {{VALUE}}', ], ] ); //Content Style $this->add_control( 'content_style', [ 'label' => __( 'Content', '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}}', ], ] ); $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(); $title = $settings['title']; $paragraph = $settings['paragraph']; $target = $settings['btn_url']['is_external'] ? ' target="_blank"' : ''; $nofollow = $settings['btn_url']['nofollow'] ? ' rel="nofollow"' : ''; ?>
>

widgets_manager->register_widget_type( new bring_back_Info_Box() );