'Newsletter widget to add a minimal subscription form'), array('width' => '350px')); } function widget($args, $instance) { $newsletter = Newsletter::instance(); $current_language = $newsletter->get_current_language(); extract($args); echo $before_widget; if (!is_array($instance)) { $instance = array(); } // Filters are used for WPML if (!empty($instance['title'])) { $title = apply_filters('widget_title', $instance['title'], $instance); echo $before_title . $title . $after_title; } $options_profile = NewsletterSubscription::instance()->get_options('profile', $current_language); if (empty($instance['button'])) { $instance['button'] = $options_profile['subscribe']; } $form = '
'; echo $form; echo $after_widget; } function update($new_instance, $old_instance) { return $new_instance; } function form($instance) { if (!is_array($instance)) { $instance = array(); } $newsletter = Newsletter::instance(); $current_language = $newsletter->get_current_language(); $profile_options = NewsletterSubscription::instance()->get_options('profile', $current_language); $instance = array_merge(array('title' => '', 'text' => '', 'button' => $profile_options['subscribe'], 'nl' => array()), $instance); if (!is_array($instance['nl'])) { $instance['nl'] = array(); } ?>
get_lists_public();
foreach ($lists as $list) {
?>