startControlsSection( 'section_title', [ 'label' => __('HTML Code'), ] ); $this->addControl( 'html', [ 'label' => '', 'type' => ControlsManager::CODE, 'default' => '', 'placeholder' => __('Enter your code'), 'show_label' => false, ] ); $this->endControlsSection(); } /** * Render HTML widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { echo $this->getSettingsForDisplay('html'); } /** * Render HTML widget output in the editor. * * Written as a Backbone JavaScript template and used to generate the live preview. * * @since 1.0.0 * @access protected */ protected function _contentTemplate() { ?> {{{ settings.html }}}