'agency_ecommerce_widget_newsletter', 'description' => esc_html__('Newsletter Widget', 'agency-ecommerce'), ); parent::__construct('agency-ecommerce-newsletter', esc_html__('AE: Newsletter', 'agency-ecommerce'), $opts); } /** * Echo the widget content. * * @since 1.0.0 * * @param array $args Display arguments including before_title, after_title, * before_widget, and after_widget. * @param array $instance The settings for the particular instance of the widget. */ function widget($args, $instance) { $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $sub_title = !empty($instance['sub_title']) ? esc_html($instance['sub_title']) : ''; $shortcode = !empty($instance['shortcode']) ? esc_html($instance['shortcode']) : ''; $background_color = !empty($instance['background_color']) ? sanitize_hex_color($instance['background_color']) : '#0b1f41'; $args['before_widget'] = str_replace('class="', 'style="background:' . $background_color . ' " class="', $args['before_widget']); echo $args['before_widget']; ?>
'', 'sub_title' => '', 'shortcode' => '', 'background_color' => '#0b1f41', )); ?>