start_controls_section( 'boka_title_section', [ 'label' => __( 'Setting', 'boka' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'text_alignment', [ 'label' => __( 'Text Alignment', 'boka' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'boka' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'boka' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'boka' ), 'icon' => 'fa fa-align-right', ], ], 'default' => 'center', 'toggle' => true, ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'boka' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __( 'Introducing BOKA Classic Demo', 'boka' ), ] ); $this->add_control( 'paragraph', [ 'label' => __( 'Paragraph', 'boka' ), 'type' => \Elementor\Controls_Manager::WYSIWYG, 'default' => __( 'Default description', 'boka' ) ] ); $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(); ?>

{{{ settings.title }}}

{{{ settings.paragraph }}}
widgets_manager->register_widget_type( new Boka_Title() );