start_controls_section( 'newsletter', [ 'label' => esc_html__( 'Thinkai Newsletter', 'thinkai' ), ] ); $this->add_control( 'layout_control', [ 'label' => esc_html__( 'Layout Style', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => array( '1' => esc_html__( 'Style One ', 'thinkai'), '2' => esc_html__( 'Style Two ', 'thinkai'), ), ] ); //features_list $this->add_control( 'features_list', [ 'label' => __( 'Feature List', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Enter Feature List', 'thinkai' ), ] ); //BG Image $this->add_control( 'feature_image', [ 'label' => __( 'Feature Image Url', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], ] ); //Image Caption $this->add_control( 'image_caption', [ 'label' => __( 'Image Caption', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( '1.5 Million Subscribers', 'thinkai' ), ] ); //SubTitle $this->add_control( 'subtitle', [ 'label' => __( 'Sub Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( '[ NEWSLETTER ]', 'thinkai' ), ] ); //Title $this->add_control( 'title', [ 'label' => __( 'Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Don’t miss updates', 'thinkai' ), ] ); //Text $this->add_control( 'text', [ 'label' => __( 'Description', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Latest news, AI models & fun memes from the community.', 'thinkai' ), ] ); //Mailchimp Form Url $this->add_control( 'mailchimp_form_url', [ 'label' => __( 'MailChimp Form Url', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'MailChimp Form Url', 'thinkai' ), ] ); $this->end_controls_section(); } /** * Render button 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(); $allowed_tags = wp_kses_allowed_html('post'); $layout = $settings[ 'layout_control' ]; ?>