start_controls_section( 'service_section', [ 'label' => esc_html__( 'service item', 'bappy' ), 'type' => Controls_Manager::SECTION, ] ); $this->add_control( 'icon', [ 'label' => __( 'icon', 'bappy' ), 'type' => \Elementor\Controls_Manager::ICON, 'label_block' => true, 'default' => 'fa fa-user', ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'bappy' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => 'Web Development', ] ); $this->add_control( 'text', [ 'label' => __( 'Text', 'bappy' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum standard dummy text.', ] ); $this->end_controls_section(); } protected function render( $instance = [] ) { // get our input from the widget settings. $settings = $this->get_settings_for_display(); //Inline Editing $this->add_inline_editing_attributes( 'icon', 'basic' ); $this->add_inline_editing_attributes( 'title', 'basic' ); $this->add_inline_editing_attributes( 'text', 'basic' ); ?>
get_render_attribute_string( 'title' ); ?>>

get_render_attribute_string( 'text' ); ?>>

<# view.addInlineEditingAttributes( 'icon', 'basic' ); view.addInlineEditingAttributes( 'title', 'basic' ); view.addInlineEditingAttributes( 'text', 'basic' ); #>
{{{ settings.title}}}

{{{ settings.text}}}

widgets_manager->register_widget_type( new Widget_Service );