'Newsletter widget to add subscription forms on sidebars'), array('width' => '350px')); } static function get_widget_form($instance) { $field_wrapper_tag = 'div'; if (!isset($instance['nl']) || !is_array($instance['nl'])) $instance['nl'] = array(); $instance = array_merge(array('lists_layout' => '', 'lists_empty_label' => '', 'lists_field_label' => ''), $instance); $options_profile = get_option('newsletter_profile'); $form = ''; $form .= '
\n"; return $form; } function widget($args, $instance) { $newsletter = Newsletter::instance(); extract($args); if (empty($instance)) $instance = array(); $instance = array_merge(array('text' => '', 'title' => ''), $instance); echo $before_widget; // Filters are used for WPML if (!empty($instance['title'])) { $title = apply_filters('widget_title', $instance['title'], $instance); echo $before_title . $title . $after_title; } $buffer = apply_filters('widget_text', $instance['text'], $instance); $options = get_option('newsletter'); $options_profile = get_option('newsletter_profile'); if (stripos($instance['text'], '', $buffer); } // That replace all the remaining tags $buffer = $newsletter->replace($buffer); echo $buffer; echo $after_widget; } function update($new_instance, $old_instance) { return $new_instance; } function form($instance) { if (!is_array($instance)) { $instance = array(); } $instance = array_merge(array('title' => '', 'text' => '', 'lists_layout' => '', 'lists_empty_label' => '', 'lists_field_label' => ''), $instance); $options_profile = get_option('newsletter_profile'); if (!isset($instance['nl']) || !is_array($instance['nl'])) $instance['nl'] = array(); ?>
get_lists_public();
foreach ($lists as $list) {
?>
Use the tag {subscription_form} to place the subscription form within your personal text.