MailChimp for WordPress - Version 1.3.1

Version Description

  • October 20, 2013 =
  • Fixed: bug when calling MailChimp API for PHP 5.2
  • Improved: better default form CSS
  • Improved: Combined checkbox and form stylesheets into 1 file and encouraged browser caching.
Download this release

Release Info

Developer DvanKooten
Plugin Icon 128x128 MailChimp for WordPress
Version 1.3.1
Comparing to
See all releases

Code changes from version 1.3 to 1.3.1

assets/css/checkbox.css CHANGED
@@ -1,5 +1,7 @@
 
 
1
  #mc4wp-checkbox{ clear:both; display:block; }
2
  #mc4wp-checkbox input{ margin:0 5px 0 0; display:inline-block !important; width:13px; height:13px; }
3
  #mc4wp-checkbox label{ display:inline-block !important; }
4
 
5
- #registerform #mc4wp-checkbox{ margin-bottom:10px; }
1
+
2
+ /* MailChimp for WP - Default Checkbox Styles */
3
  #mc4wp-checkbox{ clear:both; display:block; }
4
  #mc4wp-checkbox input{ margin:0 5px 0 0; display:inline-block !important; width:13px; height:13px; }
5
  #mc4wp-checkbox label{ display:inline-block !important; }
6
 
7
+ #registerform #mc4wp-checkbox{ margin-bottom:10px; }
assets/css/css.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Set headers to serve CSS and encourage browser caching
3
+ $expires = 60 * 60 * 34 * 3; // cache time: 3 days
4
+ header('Content-Type: text/css; charset: UTF-8');
5
+ header("Cache-Control: public, max-age=" . $expires);
6
+ header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT');
7
+
8
+ if(isset($_GET['checkbox'])) {
9
+ readfile('checkbox.css');
10
+ }
11
+
12
+ if(isset($_GET['form'])) {
13
+ readfile('form.css');
14
+ }
15
+
16
+ exit;
assets/css/form.css CHANGED
@@ -1,12 +1,14 @@
 
 
1
  .mc4wp-form{ margin:1em 0; }
2
  .mc4wp-form p{ text-align:left; }
3
  .mc4wp-form label{ display:block; font-weight:bold; margin-bottom:3px; text-align:left; }
4
- .mc4wp-form label span, .mc4wp-form li label{ font-weight: normal; }
5
 
6
  .mc4wp-form input[type="text"],
7
  .mc4wp-form input[type="email"],
8
  .mc4wp-form input[type="tel"],
9
- .mc4wp-form input[type="url"] { display:inline-block; width:100%; box-sizing:border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; }
10
 
11
  .mc4wp-form input[type="checkbox"] { margin:0 10px 0 0; padding:0; height:13px; width:13px;
12
  display:inline-block; -webkit-appearance: checkbox; border:0; }
@@ -15,7 +17,7 @@
15
  .mc4wp-form select, .mc4wp-form input[type="date"] { min-width:35%; }
16
  .mc4wp-form input[type="submit"], .mc4wp-form button{ display:inline-block; }
17
 
18
- .mc4wp-alert{ margin:1em 0; padding: 10px 15px; color: #c09853; background-color: #fcf8e3; border: 1px solid #fbeed5; border-radius: 4px; display:block; position:relative;}
19
  .mc4wp-success { color: #468847; background-color: #dff0d8; border-color: #d6e9c6; }
20
  .mc4wp-notice { color: #3a87ad; background-color: #d9edf7; border-color: #bce8f1; }
21
  .mc4wp-error { color: #b94a48; background-color: #f2dede; border-color: #eed3d7;; }
1
+
2
+ /* MailChimp for WP - Default Form Styles */
3
  .mc4wp-form{ margin:1em 0; }
4
  .mc4wp-form p{ text-align:left; }
5
  .mc4wp-form label{ display:block; font-weight:bold; margin-bottom:3px; text-align:left; }
6
+ .mc4wp-form label > span, .mc4wp-form li > label{ font-weight: normal; }
7
 
8
  .mc4wp-form input[type="text"],
9
  .mc4wp-form input[type="email"],
10
  .mc4wp-form input[type="tel"],
11
+ .mc4wp-form input[type="url"] { display:inline-block; width:100%; height:auto; box-sizing:border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; }
12
 
13
  .mc4wp-form input[type="checkbox"] { margin:0 10px 0 0; padding:0; height:13px; width:13px;
14
  display:inline-block; -webkit-appearance: checkbox; border:0; }
17
  .mc4wp-form select, .mc4wp-form input[type="date"] { min-width:35%; }
18
  .mc4wp-form input[type="submit"], .mc4wp-form button{ display:inline-block; }
19
 
20
+ .mc4wp-alert{ margin:1em 0; padding: 10px 15px; color: #c09853; background-color: #fcf8e3; border: 1px solid #fbeed5; border-radius: 2px; -moz-border-radius:2px; -webkit-border-radius:2px; display:block; position:relative;}
21
  .mc4wp-success { color: #468847; background-color: #dff0d8; border-color: #d6e9c6; }
22
  .mc4wp-notice { color: #3a87ad; background-color: #d9edf7; border-color: #bce8f1; }
23
  .mc4wp-error { color: #b94a48; background-color: #f2dede; border-color: #eed3d7;; }
assets/js/admin.js CHANGED
@@ -110,6 +110,7 @@
110
  // setup values for submit field
111
  field['type'] = 'submit';
112
  $valueLabel.text("Button text");
 
113
  $wizardFields.find('p.row').filter('.value, .wrap-p').show();
114
  updateCodePreview();
115
  } else {
@@ -122,7 +123,11 @@
122
 
123
  function resetFields() {
124
  $wizardFields.find('.row :input').each(function() {
125
- if($(this).is(":checkbox")) { this.checked = false; } else { this.value = ''; }
 
 
 
 
126
  });
127
 
128
  $wizardFields.find('p.row').hide();
110
  // setup values for submit field
111
  field['type'] = 'submit';
112
  $valueLabel.text("Button text");
113
+ $value.val("Sign up");
114
  $wizardFields.find('p.row').filter('.value, .wrap-p').show();
115
  updateCodePreview();
116
  } else {
123
 
124
  function resetFields() {
125
  $wizardFields.find('.row :input').each(function() {
126
+ if($(this).is(":checkbox")) {
127
+ this.checked = true;
128
+ } else {
129
+ this.value = '';
130
+ }
131
  });
132
 
133
  $wizardFields.find('p.row').hide();
includes/MC4WP_Lite.php CHANGED
@@ -63,6 +63,10 @@ class MC4WP_Lite {
63
  } else {
64
  // frontend only
65
  include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template-functions.php';
 
 
 
 
66
  }
67
  }
68
  }
@@ -173,4 +177,14 @@ class MC4WP_Lite {
173
  register_widget( 'MC4WP_Lite_Widget' );
174
  }
175
 
 
 
 
 
 
 
 
 
 
 
176
  }
63
  } else {
64
  // frontend only
65
  include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template-functions.php';
66
+
67
+ // load css
68
+ add_action( 'wp_enqueue_scripts', array($this, 'load_stylesheets'), 90);
69
+ add_action( 'login_enqueue_scripts', array($this, 'load_stylesheets') );
70
  }
71
  }
72
  }
177
  register_widget( 'MC4WP_Lite_Widget' );
178
  }
179
 
180
+ public function load_stylesheets()
181
+ {
182
+ $stylesheets = apply_filters('mc4wp_stylesheets', array());
183
+
184
+ if(!empty($stylesheets)) {
185
+ $stylesheet_url = add_query_arg($stylesheets, plugins_url('mailchimp-for-wp/assets/css/css.php'));
186
+ wp_enqueue_style( 'mailchimp-for-wp', $stylesheet_url, array(), MC4WP_LITE_VERSION);
187
+ }
188
+ }
189
+
190
  }
includes/MC4WP_Lite_API.php CHANGED
@@ -97,11 +97,12 @@ class MC4WP_Lite_API {
97
  if(empty($this->api_key)) { return false; }
98
 
99
  $data['apikey'] = $this->api_key;
 
100
 
101
- $response = wp_remote_post($this->api_url . $method . '.json', array(
102
- 'body' => json_encode($data),
103
  'timeout' => 10,
104
- 'headers' => array('Accept-Encoding' => '*'),
105
  'sslverify' => false
106
  )
107
  );
97
  if(empty($this->api_key)) { return false; }
98
 
99
  $data['apikey'] = $this->api_key;
100
+ $url = add_query_arg($data, $this->api_url . $method . '.json');
101
 
102
+ $response = wp_remote_post($url, array(
103
+ 'body' => $data,
104
  'timeout' => 10,
105
+ 'headers' => array('Accept-Encoding' => ''),
106
  'sslverify' => false
107
  )
108
  );
includes/MC4WP_Lite_Checkbox.php CHANGED
@@ -11,9 +11,8 @@ class MC4WP_Lite_Checkbox
11
  add_action('init', array($this, 'on_init'));
12
 
13
  // load checkbox css if necessary
14
- if($opts['css'] == 1) {
15
- add_action( 'wp_enqueue_scripts', array($this, 'load_stylesheet') );
16
- add_action( 'login_enqueue_scripts', array($this, 'load_stylesheet') );
17
  }
18
 
19
  /* Comment Form Actions */
@@ -99,9 +98,9 @@ class MC4WP_Lite_Checkbox
99
  $this->showed_checkbox = true;
100
  }
101
 
102
- public function load_stylesheet()
103
- {
104
- wp_enqueue_style( 'mc4wp-checkbox-reset', plugins_url('mailchimp-for-wp/assets/css/checkbox.css') );
105
  }
106
 
107
 
11
  add_action('init', array($this, 'on_init'));
12
 
13
  // load checkbox css if necessary
14
+ if ( $opts['css'] ) {
15
+ add_filter('mc4wp_stylesheets', array($this, 'add_stylesheet'));
 
16
  }
17
 
18
  /* Comment Form Actions */
98
  $this->showed_checkbox = true;
99
  }
100
 
101
+ public function add_stylesheet($stylesheets) {
102
+ $stylesheets['checkbox'] = 1;
103
+ return $stylesheets;
104
  }
105
 
106
 
includes/MC4WP_Lite_Form.php CHANGED
@@ -9,10 +9,11 @@ class MC4WP_Lite_Form {
9
  public function __construct() {
10
  $opts = $this->get_options();
11
 
12
- if ( $opts['css'] ) {
13
- add_action( 'wp_enqueue_scripts', array( $this, 'load_stylesheet' ) );
14
  }
15
 
 
16
  add_shortcode( 'mc4wp-form', array( $this, 'output_form' ) );
17
 
18
  // enable shortcodes in text widgets
@@ -33,8 +34,9 @@ class MC4WP_Lite_Form {
33
  return $options['form'];
34
  }
35
 
36
- public function load_stylesheet() {
37
- wp_enqueue_style( 'mc4wp-form-reset', plugins_url( 'mailchimp-for-wp/assets/css/form.css' ) );
 
38
  }
39
 
40
  public function output_form( $atts, $content = null ) {
9
  public function __construct() {
10
  $opts = $this->get_options();
11
 
12
+ if($opts['css'] == 1) {
13
+ add_filter('mc4wp_stylesheets', array($this, 'add_stylesheet'));
14
  }
15
 
16
+ add_shortcode( 'mc4wp_form', array( $this, 'output_form' ) );
17
  add_shortcode( 'mc4wp-form', array( $this, 'output_form' ) );
18
 
19
  // enable shortcodes in text widgets
34
  return $options['form'];
35
  }
36
 
37
+ public function add_stylesheet($stylesheets) {
38
+ $stylesheets['form'] = 1;
39
+ return $stylesheets;
40
  }
41
 
42
  public function output_form( $atts, $content = null ) {
includes/MC4WP_Lite_Widget.php CHANGED
@@ -12,7 +12,7 @@ class MC4WP_Lite_Widget extends WP_Widget {
12
  parent::__construct(
13
  'MC4WP_Lite_Widget', // Base ID
14
  __( 'MailChimp Sign-Up Form', 'mailchimp-for-wp' ), // Name
15
- array( 'description' => __( 'Displays your MailChimp for WP Lite sign-up form', 'mailchimp-for-wp' ), ) // Args
16
  );
17
  }
18
 
12
  parent::__construct(
13
  'MC4WP_Lite_Widget', // Base ID
14
  __( 'MailChimp Sign-Up Form', 'mailchimp-for-wp' ), // Name
15
+ array( 'description' => __( 'Displays your MailChimp sign-up form', 'mailchimp-for-wp' ), ) // Args
16
  );
17
  }
18
 
includes/template-functions.php CHANGED
@@ -1,98 +1,131 @@
1
- <?php
2
-
3
- if(!function_exists('mc4wp_show_checkbox')) {
4
- function mc4wp_show_checkbox()
5
- {
6
- MC4WP_Lite::checkbox()->output_checkbox();
7
- }
8
- }
9
-
10
- if(!function_exists('mc4wp_show_form')) {
11
- function mc4wp_show_form($id = 0)
12
- {
13
- echo mc4wp_get_form($id);
14
- }
15
- }
16
-
17
- if(!function_exists('mc4wp_get_form')) {
18
- function mc4wp_get_form($id = 0)
19
- {
20
- return MC4WP_Lite::form()->output_form(array('id' => $id));
21
- }
22
- }
23
-
24
- /* Variables */
25
- if(!function_exists('mc4wp_replace_variables')) {
26
- function mc4wp_replace_variables($text, $list_ids = array())
27
- {
28
- $needles = array('{ip}', '{current_url}', '{date}', '{time}');
29
- $replacements = array($_SERVER['REMOTE_ADDR'], mc4wp_get_current_url(), date("m/d/Y"), date("H:i:s"));
30
- $text = str_replace($needles, $replacements, $text);
31
-
32
- // subscriber count?
33
- if(strstr($text, '{subscriber_count}') != false) {
34
- $subscriber_count = mc4wp_get_subscriber_count($list_ids);
35
- $text = str_replace('{subscriber_count}', $subscriber_count, $text);
36
- }
37
-
38
- $needles = array('{user_email}', '{user_firstname}', '{user_lastname}', '{user_name}', '{user_id}');
39
- if(is_user_logged_in() && ($user = wp_get_current_user()) && ($user instanceof WP_User)) {
40
- // logged in user, replace vars by user vars
41
- $user = wp_get_current_user();
42
- $replacements = array($user->user_email, $user->user_firstname, $user->user_lastname, $user->display_name, $user->ID);
43
- $text = str_replace($needles, $replacements, $text);
44
- } else {
45
- // no logged in user, remove vars
46
- $text = str_replace($needles, '', $text);
47
- }
48
-
49
- return $text;
50
- }
51
- }
52
-
53
- /* helper functions */
54
- if(!function_exists('mc4wp_get_subscriber_count')) {
55
- function mc4wp_get_subscriber_count($list_ids)
56
- {
57
- $list_counts = get_transient('mc4wp_list_counts');
58
-
59
- if(!$list_counts) {
60
- // make api call
61
- $api = MC4WP_Lite::api();
62
- $lists = $api->get_lists();
63
- $list_counts = array();
64
-
65
- if($lists) {
66
-
67
- foreach($lists as $list) {
68
- $list_counts["{$list->id}"] = $list->stats->member_count;
69
- }
70
-
71
- $transient_lifetime = apply_filters('mc4wp_lists_count_cache_time', 1200); // 20 mins by default
72
-
73
- set_transient('mc4wp_list_counts', $list_counts, $transient_lifetime);
74
- set_transient('mc4wp_list_counts_fallback', $list_counts, 3600 * 24); // 1 day
75
- } else {
76
- // use fallback transient
77
- $list_counts = get_transient('mc4wp_list_counts_fallback');
78
- if(!$list_counts) { return 0; }
79
- }
80
- }
81
-
82
- // start calculating subscribers count for all list combined
83
- $count = 0;
84
- foreach($list_ids as $id) {
85
- $count += (isset($list_counts[$id])) ? $list_counts[$id] : 0;
86
- }
87
-
88
- return apply_filters('mc4wp_subscriber_count', $count);
89
- }
90
- }
91
-
92
- if(!function_exists('mc4wp_get_current_url')) {
93
- function mc4wp_get_current_url()
94
- {
95
- global $wp;
96
- return add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
97
- }
98
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Echoes a sign-up checkbox.
5
+ */
6
+ function mc4wp_checkbox() {
7
+ MC4WP_Lite::checkbox()->output_checkbox();
8
+ }
9
+
10
+ /**
11
+ * Echoes sign-up form with given $form_id.
12
+ * @param int $form_id.
13
+ */
14
+ function mc4wp_form( $id = 0 ) {
15
+ echo mc4wp_get_form( $id );
16
+ }
17
+
18
+ /**
19
+ * Returns HTML for sign-up form with the given $form_id.
20
+ *
21
+ * @param int $form_id.
22
+ * @return string HTML of given form_id.
23
+ */
24
+ function mc4wp_get_form( $id = 0 ) {
25
+ return MC4WP_Lite::form()->output_form( array( 'id' => $id ) );
26
+ }
27
+
28
+
29
+ /**
30
+ * Returns text with {variables} replaced.
31
+ *
32
+ * @param string $text
33
+ * @param array $list_ids Array of list id's
34
+ * @return string $text with {variables} replaced.
35
+ */
36
+ function mc4wp_replace_variables( $text, $list_ids = array() ) {
37
+ $needles = array( '{ip}', '{current_url}', '{date}', '{time}' );
38
+ $replacements = array( $_SERVER['REMOTE_ADDR'], mc4wp_get_current_url(), date( "m/d/Y" ), date( "H:i:s" ) );
39
+ $text = str_replace( $needles, $replacements, $text );
40
+
41
+ // subscriber count?
42
+ if ( strstr( $text, '{subscriber_count}' ) != false ) {
43
+ $subscriber_count = mc4wp_get_subscriber_count( $list_ids );
44
+ $text = str_replace( '{subscriber_count}', $subscriber_count, $text );
45
+ }
46
+
47
+ $needles = array( '{user_email}', '{user_firstname}', '{user_lastname}', '{user_name}', '{user_id}' );
48
+ if ( is_user_logged_in() && ( $user = wp_get_current_user() ) && ( $user instanceof WP_User ) ) {
49
+ // logged in user, replace vars by user vars
50
+ $user = wp_get_current_user();
51
+ $replacements = array( $user->user_email, $user->user_firstname, $user->user_lastname, $user->display_name, $user->ID );
52
+ $text = str_replace( $needles, $replacements, $text );
53
+ } else {
54
+ // no logged in user, remove vars
55
+ $text = str_replace( $needles, '', $text );
56
+ }
57
+
58
+ return $text;
59
+ }
60
+
61
+ /**
62
+ * Returns number of subscribers on given lists.
63
+ *
64
+ * @param array $list_ids of list id's.
65
+ * @return int Sum of subscribers for given lists.
66
+ */
67
+ function mc4wp_get_subscriber_count( $list_ids ) {
68
+ $list_counts = get_transient( 'mc4wp_list_counts' );
69
+
70
+ if ( !$list_counts ) {
71
+ // make api call
72
+ $api = MC4WP_Lite::api();
73
+ $lists = $api->get_lists();
74
+ $list_counts = array();
75
+
76
+ if ( $lists ) {
77
+
78
+ foreach ( $lists as $list ) {
79
+ $list_counts["{$list->id}"] = $list->stats->member_count;
80
+ }
81
+
82
+ $transient_lifetime = apply_filters( 'mc4wp_lists_count_cache_time', 1200 ); // 20 mins by default
83
+
84
+ set_transient( 'mc4wp_list_counts', $list_counts, $transient_lifetime );
85
+ set_transient( 'mc4wp_list_counts_fallback', $list_counts, 3600 * 24 ); // 1 day
86
+ } else {
87
+ // use fallback transient
88
+ $list_counts = get_transient( 'mc4wp_list_counts_fallback' );
89
+ if ( !$list_counts ) { return 0; }
90
+ }
91
+ }
92
+
93
+ // start calculating subscribers count for all list combined
94
+ $count = 0;
95
+ foreach ( $list_ids as $id ) {
96
+ $count += ( isset( $list_counts[$id] ) ) ? $list_counts[$id] : 0;
97
+ }
98
+
99
+ return apply_filters( 'mc4wp_subscriber_count', $count );
100
+ }
101
+
102
+ /**
103
+ * Retrieves the URL of the current WordPress page
104
+ *
105
+ * @return string current URL
106
+ */
107
+ function mc4wp_get_current_url() {
108
+ global $wp;
109
+ return add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
110
+ }
111
+
112
+
113
+ /**
114
+ * Echoes a sign-up form.
115
+ *
116
+ * @deprecated 1.3.1 Use mc4wp_form() instead.
117
+ * @see mc4wp_form()
118
+ */
119
+ function mc4wp_show_form( $id = 0 ) {
120
+ mc4wp_form( $id );
121
+ }
122
+
123
+ /**
124
+ * Echoes a sign-up checkbox.
125
+ *
126
+ * @deprecated 1.3.1 Use mc4wp_checkbox() instead
127
+ * @see mc4wp_checkbox()
128
+ */
129
+ function mc4wp_show_checkbox() {
130
+ mc4wp_checkbox();
131
+ }
includes/views/checkbox-settings.php CHANGED
@@ -52,7 +52,7 @@
52
  </tr>
53
  <tr valign="top">
54
  <th scope="row"><label for="mc4wp_checkbox_label">Checkbox label text</label></th>
55
- <td colspan="2"><input type="text" class="widefat" id="mc4wp_checkbox_label" name="mc4wp_lite_checkbox[label]" value="<?php echo esc_attr($opts['label']); ?>" /></td>
56
  </tr>
57
  <tr valign="top">
58
  <th scope="row">Pre-check the checkbox?</th>
@@ -76,13 +76,6 @@
76
  </div>
77
  <div id="mc4wp-sidebar">
78
  <?php include 'parts/admin-upgrade-to-pro.php'; ?>
79
-
80
- <div class="mc4wp-box">
81
- <h3>Styling the Sign-Up Checkbox</h3>
82
- <p>Custom or additional styling can be done by applying CSS rules to <b>#mc4wp-checkbox</b> or its child elements.</p>
83
- <p>You should add the CSS rules to your theme stylesheet using the <a href="<?php echo admin_url('theme-editor.php?file=style.css'); ?>">Theme Editor</a> or by editing <em><?php echo get_stylesheet_directory(); ?>/style.css</em> over FTP.</p>
84
- </div>
85
-
86
  <?php include 'parts/admin-need-support.php'; ?>
87
  </div>
88
 
52
  </tr>
53
  <tr valign="top">
54
  <th scope="row"><label for="mc4wp_checkbox_label">Checkbox label text</label></th>
55
+ <td colspan="2"><input type="text" class="widefat" id="mc4wp_checkbox_label" name="mc4wp_lite_checkbox[label]" value="<?php echo esc_attr($opts['label']); ?>" required /></td>
56
  </tr>
57
  <tr valign="top">
58
  <th scope="row">Pre-check the checkbox?</th>
76
  </div>
77
  <div id="mc4wp-sidebar">
78
  <?php include 'parts/admin-upgrade-to-pro.php'; ?>
 
 
 
 
 
 
 
79
  <?php include 'parts/admin-need-support.php'; ?>
80
  </div>
81
 
includes/views/form-settings.php CHANGED
@@ -6,7 +6,7 @@
6
 
7
  <?php settings_errors(); ?>
8
 
9
- <p>To use the MailChimp for WP sign-up form, configure the form below and then paste <input size="10" type="text" onfocus="this.select();" readonly="readonly" value="[mc4wp-form]" class="mc4wp-shortcode-example"> in a post, page or text widget.</p>
10
 
11
  <form action="options.php" method="post">
12
  <?php settings_fields( 'mc4wp_lite_form_settings' ); ?>
@@ -27,7 +27,7 @@
27
  <?php } ?>
28
  </ul>
29
  </td>
30
- <td class="desc" <?php if(empty($opts['lists'])) { ?>style="color:red;"<?php } ?>>Select at least one MailChimp list for this form</td>
31
  <?php
32
  } ?>
33
 
@@ -43,7 +43,7 @@
43
  } else {
44
  ?><textarea class="widefat" cols="160" rows="20" id="mc4wpformmarkup" name="mc4wp_lite_form[markup]"><?php echo esc_textarea($opts['markup']); ?></textarea><?php
45
  } ?>
46
- <p><small>Use <input type="text" onfocus="this.select();" readonly="readonly" value="[mc4wp-form]" size="10" class="mc4wp-shortcode-example"> to render this form inside a widget, post or page. <u>Do not just copy the form mark-up as that will not work.</u> </small></p>
47
  <p class="submit">
48
  <input type="submit" class="button-primary" value="<?php _e('Save All Changes') ?>" id="mc4wp-submit-form-settings" />
49
  </p>
@@ -120,25 +120,25 @@
120
  <tr valign="top">
121
  <th scope="row"><label for="mc4wp_form_redirect">Redirect to this URL after a successful sign-up</label></th>
122
  <td colspan="2">
123
- <input type="text" class="widefat" name="mc4wp_lite_form[redirect]" id="mc4wp_form_redirect" value="<?php echo $opts['redirect']; ?>" />
124
- <small>Leave empty or enter <strong>0</strong> (zero) for no redirection.</small>
125
  </td>
126
  </tr>
127
  <tr valign="top">
128
  <th scope="row"><label for="mc4wp_form_text_success">Success message</label></th>
129
- <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_success" name="mc4wp_lite_form[text_success]" value="<?php echo esc_attr($opts['text_success']); ?>" /></td>
130
  </tr>
131
  <tr valign="top">
132
  <th scope="row"><label for="mc4wp_form_text_error">General error message</label></th>
133
- <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_error" name="mc4wp_lite_form[text_error]" value="<?php echo esc_attr($opts['text_error']); ?>" /></td>
134
  </tr>
135
  <tr valign="top">
136
  <th scope="row"><label for="mc4wp_form_text_invalid_email">Invalid email address message</label></th>
137
- <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_invalid_email" name="mc4wp_lite_form[text_invalid_email]" value="<?php echo esc_attr($opts['text_invalid_email']); ?>" /></td>
138
  </tr>
139
  <tr valign="top">
140
  <th scope="row"><label for="mc4wp_form_text_already_subscribed">Email address is already on list message</label></th>
141
- <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_already_subscribed" name="mc4wp_lite_form[text_already_subscribed]" value="<?php echo esc_attr($opts['text_already_subscribed']); ?>" /></td>
142
  </tr>
143
  <tr>
144
  <th></th>
@@ -156,17 +156,16 @@
156
 
157
  <div class="mc4wp-box" id="mc4wp-info-tabs">
158
  <h3>Building your sign-up form</h3>
159
- <p>At a minimum, your form should include just an <strong>EMAIL</strong> field and a submit button. If your list requires more fields, add those too.
160
- Field names should be uppercased and match your MailChimp list fields merge tags. The field wizard tool does this automatically.</p>
161
 
162
  <p><strong>Styling</strong><br />
163
  Alter the visual appearance of the form by applying CSS rules to <b>.mc4wp-form</b> and its child elements.</p>
164
  <p>You should add the CSS rules to your theme stylesheet using the <a href="<?php echo admin_url('theme-editor.php?file=style.css'); ?>">Theme Editor</a> or by editing <em><?php echo get_stylesheet_directory(); ?>/style.css</em> over FTP.</p>
165
 
166
-
167
- <p>The <a href="http://wordpress.org/plugins/mailchimp-for-wp/faq/" target="_blank">MailChimp for WP FAQ</a> lists the various CSS selectors you can use to target the different elements.</p>
168
 
169
- <p><em>PS: The premium version has a neat CSS builder. <a href="http://dannyvankooten.com/wp-content/uploads/2013/06/form-css-designer.png">Here's a screenshot</a>. Absolutely zero CSS knowledge required to create beautiful forms!</em></p>
170
 
171
  <h3>Form variables</h3>
172
  <p>Use the following variables to add some dynamic content to your form.</p>
6
 
7
  <?php settings_errors(); ?>
8
 
9
+ <p>To use the MailChimp for WP sign-up form, configure the form below and then paste <input size="10" type="text" onfocus="this.select();" readonly="readonly" value="[mc4wp_form]" class="mc4wp-shortcode-example"> in a post, page or text widget.</p>
10
 
11
  <form action="options.php" method="post">
12
  <?php settings_fields( 'mc4wp_lite_form_settings' ); ?>
27
  <?php } ?>
28
  </ul>
29
  </td>
30
+ <td class="desc" <?php if(empty($opts['lists'])) { ?>style="color:red;"<?php } ?>>Select at least one MailChimp list for this form.</td>
31
  <?php
32
  } ?>
33
 
43
  } else {
44
  ?><textarea class="widefat" cols="160" rows="20" id="mc4wpformmarkup" name="mc4wp_lite_form[markup]"><?php echo esc_textarea($opts['markup']); ?></textarea><?php
45
  } ?>
46
+ <p><small>Use <input type="text" onfocus="this.select();" readonly="readonly" value="[mc4wp_form]" size="12" class="mc4wp-shortcode-example"> to render this form inside a widget, post or page. <u>Do not just copy the form mark-up as that will not work.</u> </small></p>
47
  <p class="submit">
48
  <input type="submit" class="button-primary" value="<?php _e('Save All Changes') ?>" id="mc4wp-submit-form-settings" />
49
  </p>
120
  <tr valign="top">
121
  <th scope="row"><label for="mc4wp_form_redirect">Redirect to this URL after a successful sign-up</label></th>
122
  <td colspan="2">
123
+ <input type="text" class="widefat" name="mc4wp_lite_form[redirect]" id="mc4wp_form_redirect" placeholder="Example: <?php echo esc_attr(site_url('/thank-you/')); ?>"value="<?php echo $opts['redirect']; ?>" />
124
+ <small>Leave empty or enter <strong>0</strong> (zero) for no redirection. Use complete URL's, including http://</small>
125
  </td>
126
  </tr>
127
  <tr valign="top">
128
  <th scope="row"><label for="mc4wp_form_text_success">Success message</label></th>
129
+ <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_success" name="mc4wp_lite_form[text_success]" value="<?php echo esc_attr($opts['text_success']); ?>" required /></td>
130
  </tr>
131
  <tr valign="top">
132
  <th scope="row"><label for="mc4wp_form_text_error">General error message</label></th>
133
+ <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_error" name="mc4wp_lite_form[text_error]" value="<?php echo esc_attr($opts['text_error']); ?>" required /></td>
134
  </tr>
135
  <tr valign="top">
136
  <th scope="row"><label for="mc4wp_form_text_invalid_email">Invalid email address message</label></th>
137
+ <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_invalid_email" name="mc4wp_lite_form[text_invalid_email]" value="<?php echo esc_attr($opts['text_invalid_email']); ?>" required /></td>
138
  </tr>
139
  <tr valign="top">
140
  <th scope="row"><label for="mc4wp_form_text_already_subscribed">Email address is already on list message</label></th>
141
+ <td colspan="2" ><input type="text" class="widefat" id="mc4wp_form_text_already_subscribed" name="mc4wp_lite_form[text_already_subscribed]" value="<?php echo esc_attr($opts['text_already_subscribed']); ?>" required /></td>
142
  </tr>
143
  <tr>
144
  <th></th>
156
 
157
  <div class="mc4wp-box" id="mc4wp-info-tabs">
158
  <h3>Building your sign-up form</h3>
159
+ <p>At a minimum, your form should include just an <strong>EMAIL</strong> field and a submit button.</p>
160
+ <p>Add more fields to your form if your list requires more fields. Field names should match your MailChimp list field tags. Use the "Add a new field" tool to have the correct HTML generated for you.</p>
161
 
162
  <p><strong>Styling</strong><br />
163
  Alter the visual appearance of the form by applying CSS rules to <b>.mc4wp-form</b> and its child elements.</p>
164
  <p>You should add the CSS rules to your theme stylesheet using the <a href="<?php echo admin_url('theme-editor.php?file=style.css'); ?>">Theme Editor</a> or by editing <em><?php echo get_stylesheet_directory(); ?>/style.css</em> over FTP.</p>
165
 
166
+ <p>The <a href="http://wordpress.org/plugins/mailchimp-for-wp/faq/" target="_blank">FAQ</a> lists the various CSS selectors you can use to target the different elements.</p>
 
167
 
168
+ <p><em>PS: With the premium version, you can design beautiful forms without touching any code. <a href="http://dannyvankooten.com/wp-content/uploads/2013/06/form-css-designer.png">Here's a screenshot</a>.</em></p>
169
 
170
  <h3>Form variables</h3>
171
  <p>Use the following variables to add some dynamic content to your form.</p>
includes/views/parts/admin-field-wizard.php CHANGED
@@ -37,7 +37,7 @@
37
 
38
  <p class="row required">
39
  <input type="checkbox" id="mc4wp-fw-required" value="1" />
40
- <label for="mc4wp-fw-required">Required field? <small>(HTML5)</small></label>
41
  </p>
42
 
43
  <p>
37
 
38
  <p class="row required">
39
  <input type="checkbox" id="mc4wp-fw-required" value="1" />
40
+ <label for="mc4wp-fw-required">Required field?</label>
41
  </p>
42
 
43
  <p>
includes/views/parts/admin-footer.php CHANGED
@@ -1,3 +1,3 @@
1
  <br style="clear:both;" />
2
  <p class="copyright-notice">This plugin is not developed by or affiliated with MailChimp in any way.</p>
3
- <p class="copyright-notice">Enjoying MailChimp for WP Lite? <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=lite-plugin&utm_medium=link&utm_campaign=footer-link">Upgrade to MailChimp for WordPress Pro now</a>. It's awesome, you'll love it!</p>
1
  <br style="clear:both;" />
2
  <p class="copyright-notice">This plugin is not developed by or affiliated with MailChimp in any way.</p>
3
+ <p class="copyright-notice">Enjoying this plugin? <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=lite-plugin&utm_medium=link&utm_campaign=footer-link">Upgrade to MailChimp for WordPress Pro now</a>, you will love it.</p>
includes/views/parts/admin-need-support.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="mc4wp-box">
2
  <h3>Looking for support?</h3>
3
- <p>Please use the <a href="http://wordpress.org/support/plugin/mailchimp-for-wp">support forums</a> on WordPress.org. Please do not email me directly as this is reserved for premium users only, I simply won't respond.</p>
4
- <p>If you need priority support, <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=lite-plugin&utm_medium=link&utm_campaign=support-link">upgrade to the premium version</a>.</p>
5
  </div>
6
 
7
  <div class="mc4wp-box">
1
  <div class="mc4wp-box">
2
  <h3>Looking for support?</h3>
3
+ <p>Please use the <a href="http://wordpress.org/support/plugin/mailchimp-for-wp">support forums</a> on WordPress.org. Please do not email me directly as this is reserved for premium users only.</p>
4
+ <p>If you need priority support, please <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=lite-plugin&utm_medium=link&utm_campaign=support-link">upgrade to the premium version</a>.</p>
5
  </div>
6
 
7
  <div class="mc4wp-box">
includes/views/parts/admin-upgrade-to-pro.php CHANGED
@@ -3,8 +3,7 @@
3
 
4
  <p><em>This plugin comes with a premium version, you will love it.</em></p>
5
 
6
- <p>Design and build beautiful (improved) forms containing all your MailChimp list fields without touching any code and learn when, how and where your visitors subscribed to your list(s). Just a few of the many
7
- benefits of upgrading to the premium version of MailChimp for WP.</p>
8
 
9
  <p><a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=lite-plugin&utm_medium=link&utm_campaign=upgrade-box">More information about MailChimp for WP Pro &raquo;</a></p>
10
  </div>
3
 
4
  <p><em>This plugin comes with a premium version, you will love it.</em></p>
5
 
6
+ <p>Better forms, easier styling and statistics. Just a few of the many benefits of upgrading.</p>
 
7
 
8
  <p><a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=lite-plugin&utm_medium=link&utm_campaign=upgrade-box">More information about MailChimp for WP Pro &raquo;</a></p>
9
  </div>
mailchimp-for-wp.php CHANGED
@@ -1,33 +1,40 @@
1
- <?php
2
- /*
3
- Plugin Name: MailChimp for WP Lite
4
- Plugin URI: http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/
5
- Description: Lite version of MailChimp for WordPress. Add various sign-up methods to your WordPress website. Show a sign-up form in your posts, pages or text widgets. Add a sign-up checkbox to various forms, like your comment form. <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/">Premium features include (multiple) AJAX powered forms, a form designer, an unlocked field wizard and much more.</a>
6
- Version: 1.3
7
- Author: Danny van Kooten
8
- Author URI: http://dannyvanKooten.com
9
- License: GPL v3
10
-
11
- MailChimp for WordPress
12
- Copyright (C) 2012-2013, Danny van Kooten, hi@dannyvankooten.com
13
-
14
- This program is free software: you can redistribute it and/or modify
15
- it under the terms of the GNU General Public License as published by
16
- the Free Software Foundation, either version 3 of the License, or
17
- (at your option) any later version.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program. If not, see <http://www.gnu.org/licenses/>.
26
- */
27
-
28
- define("MC4WP_LITE_VERSION", "1.3");
29
- define("MC4WP_LITE_PLUGIN_DIR", plugin_dir_path(__FILE__));
30
-
31
- // frontend AND backend
32
- include_once MC4WP_LITE_PLUGIN_DIR . 'includes/MC4WP_Lite.php';
33
- new MC4WP_Lite();
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: MailChimp for WordPress
4
+ Plugin URI: http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/
5
+ Description: Lite version of MailChimp for WordPress. Add various sign-up methods to your WordPress website. Show a sign-up form in your posts, pages or text widgets. Add a sign-up checkbox to various forms, like your comment form. <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/">Premium features include (multiple) AJAX powered forms, a form designer, an unlocked field wizard and much more.</a>
6
+ Version: 1.3.1
7
+ Author: Danny van Kooten
8
+ Author URI: http://dannyvanKooten.com
9
+ License: GPL v3
10
+
11
+ MailChimp for WordPress
12
+ Copyright (C) 2012-2013, Danny van Kooten, hi@dannyvankooten.com
13
+
14
+ This program is free software: you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation, either version 3 of the License, or
17
+ (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
26
+ */
27
+
28
+ define("MC4WP_LITE_VERSION", "1.3.1");
29
+ define("MC4WP_LITE_PLUGIN_DIR", plugin_dir_path(__FILE__));
30
+
31
+ if(!function_exists('is_plugin_active')) {
32
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
33
+ }
34
+
35
+ // Only load Lite plugin is Pro version is not active
36
+ if(!is_plugin_active('mailchimp-for-wp-pro/mailchimp-for-wp-pro.php')) {
37
+ include_once MC4WP_LITE_PLUGIN_DIR . 'includes/MC4WP_Lite.php';
38
+ new MC4WP_Lite();
39
+ }
40
+
readme.txt CHANGED
@@ -1,361 +1,378 @@
1
- === Plugin Name ===
2
- Contributors: DvanKooten
3
- Donate link: http://dannyvankooten.com/donate/
4
- Tags: mailchimp, newsletter, mailinglist, email, email list, form, widget form, sign-up form, subscribe form, comments, comment form, mailchimp widget, buddypress, multisite
5
- Requires at least: 3.1
6
- Tested up to: 3.6.1
7
- Stable tag: 1.3
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- The best MailChimp plugin to get more email subscribers. Easily add sign-up forms and sign-up checkboxes to your WordPress website.
12
-
13
- == Description ==
14
-
15
- = MailChimp for WordPress =
16
-
17
- Want to get more email subscribers for your MailChimp lists? This plugin will be a BIG help by adding sign-up forms and sign-up checkboxes to your WordPress website.
18
-
19
- Easily build sign-up forms and display them in your posts, pages and widget areas.
20
-
21
- Add "sign up to our newsletter" checkboxes to your comment form, contact forms or any form you like, making subscribing to your list(s) effortless for your visitors.
22
-
23
- > MailChimp for WP comes with a premium version.
24
- > Create (multiple) beautiful highly converting AJAX powered forms, absolutely no HTML or CSS knowledge required!
25
- > *[Upgrade to MailChimp for WordPress Pro now >>](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=first-link)*
26
-
27
- **Plugin Features**
28
-
29
- * Easily create a highly customizable sign-up form and show it in your posts, pages and widgets by using a simple shortcode `[mc4wp-form]`
30
- * Add a "sign-up to our newsletter" checkbox to ANY form you like, like your comment form.
31
- * Built-in integration with [BuddyPress](http://buddypress.org/) and WordPress MultiSite registration forms, [bbPress](http://bbpress.org/) new topic and new reply forms and [Contact Form 7](http://contactform7.com/) forms. You can add sign-up checkboxes to these forms with 1 simple click.
32
- * Uses the MailChimp API, superfast and reliable. Also, visitors never have to leave your website to subscribe.
33
- * Configuring is easy, all you need is your MailChimp API key.
34
-
35
- **Premium Features**
36
-
37
- * Form designer, design beautiful sign-up forms from your admin panel. No CSS knowledge required.
38
- * (Multiple) AJAX powered sign-up forms (no page reload after submitting).
39
- * Unlocked field wizard containing all your list fields and interest groupings. No HTML knowledge required.
40
- * Reports. Gain insights in when, where and how your visitors subscribe with the subscribers log and beautiful statistical charts.
41
- * Built-in integration with WooCommerce and Easy Digital Downloads.
42
- * Priority support.
43
-
44
- [More information](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-features-link) | [Screenshots](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/screenshots/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-features-link) | [Demo](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/) | [Upgrade now >>](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-features-link)
45
-
46
- = MailChimp Sign-Up Form =
47
- The plugin comes with an easy to way to build sign-up forms for your MailChimp lists. Add as many fields as you like and customize labels, placeholders, initial values etcetera in a simple way. Visitors never have to leave your website to subscribe to your MailChimp lists.
48
-
49
- Use the `[mc4wp-form]` shortcode to show a sign-up form in your posts and pages or use the widget to display a form in your widget areas.
50
-
51
- = "Sign-up to our newsletter?" Checkboxes =
52
- People who comment or register on your website are valuable visitors and most likely interested to be on your mailinglist as well. This plugin makes it easy for them to subscribe to your MailChimp lists, one mouse-click is all they need.
53
-
54
- You can add sign-up checkboxes to ANY form you like, including Contact Form 7 forms.
55
-
56
- **More information**
57
-
58
- Check out more [WordPress plugins](http://dannyvankooten.com/wordpress-plugins/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=more-info-link) by [Danny van Kooten](http://dannyvankooten.com?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=more-info-link) or [contact him on Twitter](http://twitter.com/dannyvankooten).
59
-
60
-
61
- == Installation ==
62
-
63
- 1. In your WordPress admin panel, go to Plugins > New Plugin, search for "MailChimp for WP" and click "Install now"
64
- 1. Alternatively, download the plugin and upload the contents of mailchimp-for-wp.zip to your plugins directory, which usually is `/wp-content/plugins/`.
65
- 1. Activate the plugin
66
- 1. Set your MailChimp API key in the plugin settings.
67
- 1. Select at least one list to subscribe visitors to.
68
- 1. (Optional) Select to which forms the sign-up checkbox should be added.
69
- 1. (Optional) Create a form and show it in your posts, pages or text widgets using the shortcode `[mc4wp-form]`.
70
- 1. (Optional) If you like the plugin, upgrade to [MailChimp for WordPress Pro](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=installation-instructions-link) for an even better plugin.
71
-
72
- == Frequently Asked Questions ==
73
-
74
- = Is there a premium version of this plugin? =
75
- Yes, there is and it is awesome. Pro features include:
76
-
77
- 1. (Multiple) AJAX Sign-up Forms (so the page doesn't reload after clicking the submit button)
78
- 1. Create beautiful forms from your admin panel with the Form Designer. No CSS knowledge required!
79
- 1. Reports, learn when, where and how your visitors subscribed.
80
- 1. The form field wizard makes it easy to add your MailChimp list fields to your sign-up forms.
81
- 1. Sign-up checkbox integration with WooCommerce and Easy Digital Downloads
82
- 1. Custom checkbox labels
83
- 1. Priority support
84
-
85
- [More information](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link) | [Screenshots](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/screenshots/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link) | [Demo](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link)
86
-
87
- = How to display a form in posts or pages? =
88
- Use the `[mc4wp-form]` shortcode.
89
-
90
- = How to display a form in widget areas like a sidebar? =
91
- Use the *MailChimp Sign-Up Form* Widget that comes with the plugin.
92
-
93
- = How to display a form in my template files? =
94
- Use the `mc4wp_show_form()` function.
95
-
96
- = The form shows a success message but subscribers are not added to my list(s)? =
97
- If the form shows a success message, it means MailChimp accepted the sign-up request and will take over from there. MailChimp could have a slight delay sending the confirmation email though, just be patient.
98
-
99
- = How can I style the sign-up form? =
100
- You can use CSS rules to style the sign-up form, use the following CSS selectors to target the various form elements.
101
-
102
- `
103
- .mc4wp-form { ... } /* the form element */
104
- .mc4wp-form p { ... } /* form paragraphs */
105
- .mc4wp-form label { ... } /* labels */
106
- .mc4wp-form input { ... } /* input fields */
107
- .mc4wp-form input[type="checkbox"] { ... } /* checkboxes */
108
- .mc4wp-form input[type="submit"] { ... } /* submit button */
109
- .mc4wp-alert { ... } /* success & error messages */
110
- .mc4wp-success { ... } /* success message */
111
- .mc4wp-error { ... } /* error messages */
112
- `
113
-
114
- Add your custom CSS rules to the end of your theme stylesheet, **/wp-content/themes/your-theme-name/style.css**. Do not add them to the plugin stylesheet as they will be automatically overwritten on the next plugin update.
115
-
116
- [PS: The form designer in Pro creates the CSS rules for you >>](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/)
117
-
118
- = Where can I find my MailChimp API key? =
119
- [Here](http://kb.mailchimp.com/article/where-can-i-find-my-api-key)
120
-
121
- = How to add a sign-up checkbox to my Contact Form 7 forms? =
122
- Use the following shortcode to render a sign-up checkbox in your CF7 forms.
123
-
124
- `[mc4wp_checkbox "My custom label text"]`
125
-
126
- If you need more data for your merge fields, prefix the field name with `mc4wp-`.
127
-
128
- *Example CF7 template for MailChimp WEBSITE field*
129
- `
130
- [text* mc4wp-WEBSITE]
131
- `
132
-
133
- = Can I add a checkbox to a third-party form? =
134
- Yes, you can. Go to MailChimp for WP > Checkbox Settings and tick the "show checkbox at other forms (manual)" checkbox. Then, include a checkbox with name attribute `mc4wp-try-subscribe` and value `1` in your form.
135
-
136
- *Example HTML for checkbox in third-party form*
137
- `
138
- <input type="checkbox" name="mc4wp-try-subscribe" value="1" /><label>Subscribe to our newsletter?</label>
139
- `
140
-
141
- If you need to send more data for your list merge fields, prefix the name attribute with **mc4wp-**. The plugin will look for fields prefixed with `mc4wp-` and send the field values to MailChimp.
142
-
143
- *Example HTML code for MailChimp WEBSITE merge tag*
144
- `<input type="text" name="mc4wp-WEBSITE" /><label>Your website:</label>`
145
-
146
- = How do I add subscribers to certain interest groups? =
147
- Use the field wizard. Or, if you know more about HTML, the following snippet should get you started. *Replace `###` with your grouping ID or grouping name.*
148
-
149
- `
150
- <input type="hidden" name="GROUPINGS[###]" value="Groupname 1,Groupname 2,Groupname 3" />
151
- `
152
- Or, if you want to use checkboxes...
153
-
154
- `
155
- <input type="checkbox" name="GROUPINGS[###][]" value="Group 1" /><label>Group 1</label>
156
- <input type="checkbox" name="GROUPINGS[###][]" value="Group 2" /><label>Group 2</label>
157
- `
158
-
159
- = Why does the checkbox not show up at my comment form? =
160
- Your theme probably does not support the necessary comment hook this plugin uses to add the checkbox to your comment form. You can manually place the checkbox by placing the following code snippet inside the form tags of your theme's comment form.
161
-
162
- `<?php if(function_exists('mc4wp_show_checkbox')) { mc4wp_show_checkbox(); }?>`
163
-
164
- Your theme folder can be found by browsing to `/wp-content/themes/your-theme-name/`.
165
-
166
- == Screenshots ==
167
-
168
- 1. **Premium only:** Design beautiful sign-up forms using the form CSS designer.
169
- 2. Add a sign-up checkbox to various places on your website.
170
- 3. An example sign-up checkbox.
171
- 4. An example sign-up form in my footer on dannyvankooten.com. More [MailChimp sign-up form examples](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=screenshots-link) are available on my website.
172
- 5. **Premium only:** Create multiple AJAX powered sign-up forms.
173
- 6. **Premium only:** Use the field wizard to easily add advanced fields to your form mark-up. You don't have to write any HTML, if you want.
174
- 7. **Premium only:** Gain valuable insights which method your visitors used to subscribe for any given time period using beautiful line charts. [Upgrade to the premium version now.](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=screenshots-link)
175
-
176
-
177
- == Changelog ==
178
-
179
- = 1.3 =
180
- * Added: Form widget
181
- * Added: Smooth scroll to form element after form submission (if jQuery loaded)
182
- * Improved: Added and removed some buttons from QTags editor toolbar
183
- * Improved: Some UI improvements
184
- * Improved: Optimized integration with third-party forms like Contact Form 7
185
-
186
- = 1.2.5 =
187
- * Fixed `undefined function mc4wp_replace_variables` fatal error when using Quick Cache plugin.
188
-
189
- = 1.2.4 =
190
- * Improved: code performance improvements
191
- * Improved: added `mc4wp_get_form()` for an easier shortcode callback. Useful to [add a sign-up form to the end of your posts](http://dannyvankooten.com/2577/add-mailchimp-sign-up-form-end-of-posts/).
192
- * Improved default CSS
193
- * Improved: checkbox debug message only shows to WP Administrators when JavaScript is disabled
194
- * Added: form nonce for better security
195
- * Fix: CSS issue where the form caused a huge sidebar gap in some themes.
196
-
197
- = 1.2.3 =
198
- * Fixed: bug where some MailChimp fields were not showing in the field wizard / add field tool.
199
-
200
- = 1.2.2 =
201
- * Fixed sending extra list fields when integrating with third-party forms like Contact Form 7
202
-
203
- = 1.2.1 =
204
- * Improved: total revamp of the form field wizard, many improvements.
205
- * Improved: some textual improvements in the setting pages
206
- * Added: debug message to sign-up checkbox for WP administrators
207
-
208
- = 1.2 =
209
- * Improved: updated to MailChimp 2.0 API
210
- * Improved: now using custom light-weight API class using the WordPress HTTP API.
211
- * Improved: huge performance improvements on admin settings pages
212
- * Improved: usability and responsiveness of form settings page
213
- * Improved: clean-up
214
-
215
- = 1.1.4 =
216
- * Fixed: usage of textarea elements in the form mark-up for WP3.3+.
217
-
218
- = 1.1.3 =
219
- * Added: first and lastname to registration hook, works with Register Redux Plus for example.
220
-
221
- = 1.1.2 =
222
- * Fixed: field wizard initial value not being set in some browsers
223
- * Fixed: CF7 checkbox subscribing everyone regardless of checkbox setting
224
- * Added: bbPress compatibility, you can now add a sign-up checkbox to the new topic and new reply forms
225
- * Improved: various code and debug improvements
226
- * Improved: field wizard now wraps radio inputs and checkboxes in a label
227
- * Improved: Usability when using sign-up checkbox with Contact Form 7
228
- * Removed: form usage option
229
-
230
- = 1.1.1 =
231
- * Fixed warning for BuddyPress sites
232
-
233
- = 1.1 =
234
- * Fixed: spam comments not being filtered
235
- * Fixed: Automatic splitting of NAME into FNAME and LNAME
236
- * Added: HTML 5 url, tel and date fields to field wizard
237
- * Added: Form variables for usage inside form mark-up.
238
- * Improved: default form CSS
239
- * Improved: Contact Form 7 integration
240
-
241
- = 1.0.3 =
242
- * Added HTML quicktags to form markup textarea.
243
- * Added option to set custom label when using Contact Form 7 shortcode `[mc4wp_checkbox "Your checkbox label"]`
244
- * Added HTML comments
245
- * Added upgrade link to plugins overview
246
- * Improved compatibility with third-party plugins when using checkbox, smarter e-mail field guessing
247
- * Improved: easier copying of the form shortcode from form settings pages
248
- * Added: uninstall function
249
-
250
- = 1.0.2 =
251
- * Improved code, less memory usage
252
- * Added `mc4wp_show_form()` function for usage inside template files
253
-
254
- = 1.0.1 =
255
- * Changed: format for groups is now somewhat easier. Refer to the FAQ and update your form mark-up please. (Backwards compatibility included)
256
- * Added: group preset to form field wizard for hidden fields, checkboxes and radio inputs.
257
- * Added: radio inputs to field wizard
258
- * Improved: the field wizard will now add labels after the checkbox and radio input elements.
259
- * Fixed: regular error messages not being shown in some cases.
260
-
261
- = 1.0 =
262
- * Added support for group checkboxes
263
- * Added support for paragraph elements in error and success messages, the messages are now wrapped in `<div>` instead. Update your custom CSS rules
264
- * Added some translation filters for qTranslate and WPML compatibility.
265
-
266
- = 0.8.3 =
267
- * Added: Guess first and last name when only using full name field.
268
- * Added: Links to [MailChimp for WordPress Pro](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/)
269
- * Fixed: Bug where options could not be saved after adding specific HTML tags to the form mark-up.
270
-
271
- = 0.8.2 =
272
- * Improved: Namespaced form CSS classes
273
- * Improved: Improved error messages
274
- * Improved: It is now easier to add fields to your form mark-up by using the wizard. You can choose presets etc.
275
- * Improved: All field names that are of importance for MailChimp should now be uppercased (backwards compatibility is included)
276
- * Improved: Fields named added through the wizard are now validated and sanitized
277
- * Improved: Added caching to the backend which makes it way faster
278
- * Improved: Various usability improvements
279
-
280
- = 0.8.1 =
281
- * Fixed: typo in form success message
282
- * Improved: various little improvements
283
- * Added: option to hide the form after a successful sign-up
284
-
285
- = 0.8 =
286
- * Changed links to show your appreciation for this plugin.
287
- * Changed function name, `mc4wp_checkbox()` is now `mc4wp_show_checkbox()` (!!!)
288
- * Improved: CSS reset now works for registration forms as well.
289
- * Improved: Code, removed unnecessary code, only load classes when not existing yet, etc.
290
- * Improved: hooked into user_register to allow third-party registration form plugins.
291
- * Added: Shortcode for usage inside Contact Form 7 form templates `[mc4wp_checkbox]`
292
- * Added: Catch-all, hook into ANY form using ANY input field with name attribute `mc4wp-try-subscribe` and value `1`.
293
- * Fixed: Subscribe from Multisite sign-up
294
- * Fixed: 404 page when no e-mail given.
295
-
296
-
297
- = 0.7 =
298
- * Improved: small backend JavaScript improvements / fixes
299
- * Improved: configuration tabs on options page now work with JavaScript disabled as well
300
- * Added: form and checkbox can now subscribe to different lists
301
- * Added: Error messages for WP Administrators (for debugging)
302
- * Added: `mc4wp_show_checkbox()` function to manually add the checkbox to a comment form.
303
-
304
- = 0.6.2 =
305
- * Fixed: Double quotes now enabled in text labels and success / error messages (which enables the use of JavaScript)
306
- * Fixed: Sign-up form failing silently without showing error.
307
-
308
- = 0.6.1 =
309
- * Fixed: error notices
310
- * Added: some default CSS for success and error notices
311
- * Added: notice when form mark-up does not contain email field
312
-
313
- = 0.6 =
314
- * Fixed: cannot redeclare class MCAPI
315
- * Fixed: scroll to form element
316
- * Added: notice when copying the form mark-up instead of using `[mc4wp-form]`
317
- * Added: CSS classes to form success and error message(s).
318
- * Removed: Static element ID on form success and error message(s) for W3C validity when more than one form on 1 page.
319
-
320
- = 0.5 =
321
- * Fixed W3C invalid value "true" for attribute "required"
322
- * Added scroll to form element after form submit.
323
- * Added option to redirect visitors after they subscribed using the sign-up form.
324
-
325
- = 0.4.1 =
326
- * Fixed correct and more specific error messages
327
- * Fixed form designer, hidden fields no longer wrapped in paragraph tags
328
- * Added text fields to form designer
329
- * Added error message when email address was already on the list
330
- * Added debug message when there is a problem with one of the (required) merge fields
331
-
332
- = 0.4 =
333
- * Improved dashboard, it now has different tabs for the different settings.
334
- * Improved guessing of first and last name.
335
- * Fixed debugging statements on settings page
336
- * Added settings link on plugins overview page
337
- * Added form functionality
338
- * Added form shortcode
339
- * Added necessary filters for shortcodes to work inside text widgets
340
- * Added spam honeypot to form to ignore bot sign-ups
341
- * Added error & success messages to form
342
- * Added Freddy icon to menu
343
-
344
- = 0.3 =
345
- * Fixed the missing argument bug when submitting a comment for some users.
346
- * Added support for regular, BuddyPress and MultiSite registration forms.
347
-
348
- = 0.2 =
349
- * Fixed small bug where name of comment author was not correctly assigned
350
- * Improved CSS reset for checkbox
351
-
352
- = 0.1 =
353
- * BETA release
354
-
355
- == Upgrade Notice ==
356
-
357
- = 1.2.5 =
358
- Fixed CSS issue where the form caused a hue gap in the sidebar for some themes.
359
-
360
- = 1.1.1 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  Bugfix for BuddyPress sites
1
+ === Plugin Name ===
2
+ Contributors: DvanKooten
3
+ Donate link: http://dannyvankooten.com/donate/
4
+ Tags: mailchimp, widget, form, checkbox, sign-up form, mandrill, buddypress, multisite, bbpress, contact form 7, newsletter, mailinglist
5
+ Requires at least: 3.1
6
+ Tested up to: 3.7
7
+ Stable tag: 1.3.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ The best MailChimp plugin to get more email subscribers. Easily add sign-up forms and sign-up checkboxes to your WordPress website.
12
+
13
+ == Description ==
14
+
15
+ = MailChimp for WordPress =
16
+
17
+ Looking to get more email subscribers for your MailChimp lists? This plugin will be a BIG help by adding sign-up forms and sign-up checkboxes to your WordPress website.
18
+
19
+ Easily build sign-up forms and display them in your posts, pages and widget areas.
20
+
21
+ Add "sign up to our newsletter" checkboxes to your comment form, contact forms or any form you like, making subscribing to your list(s) effortless for your visitors.
22
+
23
+ > MailChimp for WP comes with a premium version which gives you better forms, easier styling and detailed statistics.
24
+ > *[Upgrade now >>](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=first-link)*
25
+
26
+ **Plugin Features**
27
+
28
+ * Easily create a highly customizable sign-up form
29
+ * Show a sign-up form in your posts or pages using a simple shortcode `[mc4wp_form]`
30
+ * Show a sign-up form in your sidebar or footer using the dedicated form widget.
31
+ * Add a "sign-up to our newsletter" checkbox to your comment form or *any* other form you like.
32
+ * Built-in integration with BuddyPress, WordPress MultiSite, bbPress and Contact Form 7 forms.
33
+ * Configuring this plugin is easy, all you need is your MailChimp API key.
34
+
35
+ **Premium features**
36
+
37
+ The premium version comes with better and unlimited forms, easier form styling, an unlocked field wizard, detailed statistics and priority support.
38
+
39
+ [More information](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-features-link) | [Screenshots](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/screenshots/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-features-link) | [Demo](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-features-link) | [Upgrade now >>](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=after-features-link)
40
+
41
+ = Sign-Up Forms =
42
+ This plugin comes with an easy but flexible way to build sign-up forms for your MailChimp lists.
43
+
44
+ With the *add field* tool you can easily customize field labels, placeholders etcetera and have the HTML generated for you. If you want more control, you can just write the form mark-up yourself.
45
+
46
+ Use the `[mc4wp_form]` shortcode to display a sign-up form in your posts or pages or use the widget to show it in your widget areas, like your sidebar or footer.
47
+
48
+ = Sign-Up Checkboxes =
49
+ Subscribing to your MailChimp lists should be easy for your visitors. This plugin gives you the option to add sign-up checkboxes to various forms so all your visitors have to do to subscribe is tick the checkbox.
50
+
51
+ You can add sign-up checkboxes to your comment form, Contact Form 7 forms or *any* other form you like.
52
+
53
+ **More information**
54
+
55
+ Check out more [WordPress plugins](http://dannyvankooten.com/wordpress-plugins/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=more-info-link) by [Danny van Kooten](http://dannyvankooten.com?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=more-info-link) or [contact him on Twitter](http://twitter.com/dannyvankooten).
56
+
57
+
58
+ == Installation ==
59
+
60
+ = Installing the plugin =
61
+ 1. In your WordPress admin panel, go to *Plugins > New Plugin*, search for *MailChimp for WordPress* and click "Install now"
62
+ 1. Alternatively, download the plugin and upload the contents of `mailchimp-for-wp.zip` to your plugins directory, which usually is `/wp-content/plugins/`.
63
+ 1. Activate the plugin
64
+ 1. Set your MailChimp API key in the plugin settings.
65
+
66
+ = Configuring the sign-up checkboxes =
67
+ 1. Go to *MailChimp for WP > Checkboxes*
68
+ 1. Select at least one list to subscribe visitors to.
69
+ 1. Select at least 1 form to add the checkbox to, eg your comment form.
70
+
71
+ = Configuring the sign-up form(s) =
72
+ 1. Go to *MailChimp for WP > Forms*
73
+ 1. Select at least one list to subscribe visitors to.
74
+ 1. *(Optional)* Add some fields or dynamic content to your form.
75
+ 1. Show the form in pages or posts by using the `[mc4wp_form]` shortcode.
76
+ 1. Show the form in your widget areas by using the widget.
77
+
78
+ = Upgrade to Pro =
79
+ If you like the plugin, upgrade to [MailChimp for WordPress Pro](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=installation-instructions-link) for an even better plugin.
80
+
81
+ == Frequently Asked Questions ==
82
+
83
+ = Is there a premium version of this plugin? =
84
+ Yes, there is and you will love it. Some Pro features are:
85
+
86
+ 1. (Multiple) AJAX powered forms (no page reload after submitting)
87
+ 1. Design beautiful forms from your admin panel, no CSS knowledge required!
88
+ 1. Reports, learn when, where and how your visitors subscribed.
89
+ 1. Easily add *all* your MailChimp list fields to your forms using the add-field tool.
90
+ 1. Priority support
91
+
92
+ [More information](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link) | [Screenshots](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/screenshots/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link) | [Demo](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-link)
93
+
94
+ = How to display a form in posts or pages? =
95
+ Use the `[mc4wp_form]` shortcode.
96
+
97
+ = How to display a form in widget areas like a sidebar? =
98
+ Use the *MailChimp Sign-Up Form* Widget that comes with the plugin.
99
+
100
+ = How to display a form in my template files? =
101
+ Use the `mc4wp_form()` function.
102
+
103
+ = The form shows a success message but subscribers are not added to my list(s)? =
104
+ If the form shows a success message, it means MailChimp accepted the sign-up request and will take over from there. MailChimp could have a slight delay sending the confirmation email though, just be patient.
105
+
106
+ = How can I style the sign-up form? =
107
+ You can use CSS rules to style the sign-up form, use the following CSS selectors to target the various form elements.
108
+
109
+ `
110
+ .mc4wp-form { ... } /* the form element */
111
+ .mc4wp-form p { ... } /* form paragraphs */
112
+ .mc4wp-form label { ... } /* labels */
113
+ .mc4wp-form input { ... } /* input fields */
114
+ .mc4wp-form input[type="checkbox"] { ... } /* checkboxes */
115
+ .mc4wp-form input[type="submit"] { ... } /* submit button */
116
+ .mc4wp-alert { ... } /* success & error messages */
117
+ .mc4wp-success { ... } /* success message */
118
+ .mc4wp-error { ... } /* error messages */
119
+ `
120
+
121
+ Add your custom CSS rules to the end of your theme stylesheet, **/wp-content/themes/your-theme-name/style.css**. Do not add them to the plugin stylesheet as they will be automatically overwritten on the next plugin update.
122
+
123
+ [PS: With the Pro version, you can design beautiful forms without touching any code >>](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/)
124
+
125
+ = Where can I find my MailChimp API key? =
126
+ [Here](http://kb.mailchimp.com/article/where-can-i-find-my-api-key)
127
+
128
+ = How to add a sign-up checkbox to my Contact Form 7 forms? =
129
+ Use the following shortcode in your CF7 form mark-up to display a sign-up checkbox.
130
+
131
+ `[mc4wp_checkbox "My custom label text"]`
132
+
133
+ If you need more data for your merge fields, prefix the field name with `mc4wp-`.
134
+
135
+ *Example CF7 template for MailChimp WEBSITE field*
136
+ `
137
+ [text* mc4wp-WEBSITE]
138
+ `
139
+
140
+ = Can I add a checkbox to third-party forms? =
141
+ Yes. Go to *MailChimp for WP > Checkboxes* and tick the "show checkbox at other forms (manual)" checkbox. Then, include a checkbox with name attribute `mc4wp-try-subscribe` and value `1` in your form.
142
+
143
+ *Example HTML*
144
+ `
145
+ <label><input type="checkbox" name="mc4wp-try-subscribe" value="1" /> Subscribe to our newsletter?</label>
146
+ `
147
+
148
+ If you need to send more data to your MailChimp list, prefix the name attribute with `mc4wp-`.
149
+
150
+ *Example HTML code for MailChimp list field called WEBSITE*
151
+ `
152
+ <label>Your website:</label>
153
+ <input type="text" name="mc4wp-WEBSITE" />
154
+ `
155
+
156
+ = How do I add subscribers to certain interest groups? =
157
+ Use the field wizard. Or, if you know more about HTML, the following snippet should get you started. *Replace `###` with your grouping ID or grouping name.*
158
+
159
+ `
160
+ <label><input type="checkbox" name="GROUPINGS[###][]" value="Group 1" /> Group 1</label>
161
+ <label><input type="checkbox" name="GROUPINGS[###][]" value="Group 2" /> Group 2</label>
162
+ `
163
+ Or, if you want to use a hidden field...
164
+
165
+ `
166
+ <input type="hidden" name="GROUPINGS[###]" value="Groupname 1,Groupname 2,Groupname 3" />
167
+ `
168
+
169
+ = I don't see new subscribers but they are still added to my list =
170
+ When you have double opt-in disabled, new subscribers will be seen as *imports* by MailChimp. They will not show up in your daily digest emails or statistics. My recommendation is to leave double opt-in enabled.
171
+
172
+ = Why does the checkbox not show up at my comment form? =
173
+ Your theme probably does not support the necessary comment hook this plugin uses to add the checkbox to your comment form. You can manually place the checkbox by placing the following code snippet inside the form tags of your theme's comment form.
174
+
175
+ `<?php if(function_exists('mc4wp_checkbox')) { mc4wp_checkbox(); }?>`
176
+
177
+ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-name/`.
178
+
179
+ == Screenshots ==
180
+
181
+ 1. **Premium only:** Design beautiful sign-up forms using the form CSS designer.
182
+ 2. Add a sign-up checkbox to various places on your website.
183
+ 3. An example sign-up checkbox.
184
+ 4. An example sign-up form in my footer on dannyvankooten.com. More [MailChimp sign-up form examples](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=screenshots-link) are available on my website.
185
+ 5. **Premium only:** Create multiple AJAX powered sign-up forms.
186
+ 6. **Premium only:** Use the field wizard to easily add advanced fields to your form mark-up. You don't have to write any HTML, if you want.
187
+ 7. **Premium only:** Gain valuable insights which method your visitors used to subscribe for any given time period using beautiful line charts. [Upgrade to the premium version now.](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=screenshots-link)
188
+
189
+
190
+ == Changelog ==
191
+
192
+ = 1.3.1 - October 20, 2013 =
193
+ * Fixed: bug when calling MailChimp API for PHP 5.2
194
+ * Improved: better default form CSS
195
+ * Improved: Combined checkbox and form stylesheets into 1 file and encouraged browser caching.
196
+
197
+ = 1.3 - October 13, 2013 =
198
+ * Added: Form widget
199
+ * Added: Smooth scroll to form element after form submission (if jQuery loaded)
200
+ * Improved: Added and removed some buttons from QTags editor toolbar
201
+ * Improved: Some UI improvements
202
+ * Improved: Optimized integration with third-party forms like Contact Form 7
203
+
204
+ = 1.2.5 - October 8, 2013 =
205
+ * Fixed `undefined function mc4wp_replace_variables` fatal error when using Quick Cache plugin.
206
+
207
+ = 1.2.4 - October 6, 2013 =
208
+ * Improved: code performance improvements
209
+ * Improved: added `mc4wp_get_form()` for an easier shortcode callback. Useful to [add a sign-up form to the end of your posts](http://dannyvankooten.com/2577/add-mailchimp-sign-up-form-end-of-posts/).
210
+ * Improved default CSS
211
+ * Improved: checkbox debug message only shows to WP Administrators when JavaScript is disabled
212
+ * Added: form nonce for better security
213
+ * Fix: CSS issue where the form caused a huge sidebar gap in some themes.
214
+
215
+ = 1.2.3 - October 3, 2013 =
216
+ * Fixed: bug where some MailChimp fields were not showing in the field wizard / add field tool.
217
+
218
+ = 1.2.2 - September 30, 2013 =
219
+ * Fixed sending extra list fields when integrating with third-party forms like Contact Form 7
220
+
221
+ = 1.2.1 - September 29, 2013 =
222
+ * Improved: total revamp of the form field wizard, many improvements.
223
+ * Improved: some textual improvements in the setting pages
224
+ * Added: debug message to sign-up checkbox for WP administrators
225
+
226
+ = 1.2 - September 23, 2013 =
227
+ * Improved: updated to MailChimp 2.0 API
228
+ * Improved: now using custom light-weight API class using the WordPress HTTP API.
229
+ * Improved: huge performance improvements on admin settings pages
230
+ * Improved: usability and responsiveness of form settings page
231
+ * Improved: clean-up
232
+
233
+ = 1.1.4 =
234
+ * Fixed: usage of textarea elements in the form mark-up for WP3.3+.
235
+
236
+ = 1.1.3 =
237
+ * Added: first and lastname to registration hook, works with Register Redux Plus for example.
238
+
239
+ = 1.1.2 =
240
+ * Fixed: field wizard initial value not being set in some browsers
241
+ * Fixed: CF7 checkbox subscribing everyone regardless of checkbox setting
242
+ * Added: bbPress compatibility, you can now add a sign-up checkbox to the new topic and new reply forms
243
+ * Improved: various code and debug improvements
244
+ * Improved: field wizard now wraps radio inputs and checkboxes in a label
245
+ * Improved: Usability when using sign-up checkbox with Contact Form 7
246
+ * Removed: form usage option
247
+
248
+ = 1.1.1 =
249
+ * Fixed warning for BuddyPress sites
250
+
251
+ = 1.1 =
252
+ * Fixed: spam comments not being filtered
253
+ * Fixed: Automatic splitting of NAME into FNAME and LNAME
254
+ * Added: HTML 5 url, tel and date fields to field wizard
255
+ * Added: Form variables for usage inside form mark-up.
256
+ * Improved: default form CSS
257
+ * Improved: Contact Form 7 integration
258
+
259
+ = 1.0.3 =
260
+ * Added HTML quicktags to form markup textarea.
261
+ * Added option to set custom label when using Contact Form 7 shortcode `[mc4wp_checkbox "Your checkbox label"]`
262
+ * Added HTML comments
263
+ * Added upgrade link to plugins overview
264
+ * Improved compatibility with third-party plugins when using checkbox, smarter e-mail field guessing
265
+ * Improved: easier copying of the form shortcode from form settings pages
266
+ * Added: uninstall function
267
+
268
+ = 1.0.2 =
269
+ * Improved code, less memory usage
270
+ * Added `mc4wp_form()` function for usage inside template files
271
+
272
+ = 1.0.1 =
273
+ * Changed: format for groups is now somewhat easier. Refer to the FAQ and update your form mark-up please. (Backwards compatibility included)
274
+ * Added: group preset to form field wizard for hidden fields, checkboxes and radio inputs.
275
+ * Added: radio inputs to field wizard
276
+ * Improved: the field wizard will now add labels after the checkbox and radio input elements.
277
+ * Fixed: regular error messages not being shown in some cases.
278
+
279
+ = 1.0 =
280
+ * Added support for group checkboxes
281
+ * Added support for paragraph elements in error and success messages, the messages are now wrapped in `<div>` instead. Update your custom CSS rules
282
+ * Added some translation filters for qTranslate and WPML compatibility.
283
+
284
+ = 0.8.3 =
285
+ * Added: Guess first and last name when only using full name field.
286
+ * Added: Links to [MailChimp for WordPress Pro](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/)
287
+ * Fixed: Bug where options could not be saved after adding specific HTML tags to the form mark-up.
288
+
289
+ = 0.8.2 =
290
+ * Improved: Namespaced form CSS classes
291
+ * Improved: Improved error messages
292
+ * Improved: It is now easier to add fields to your form mark-up by using the wizard. You can choose presets etc.
293
+ * Improved: All field names that are of importance for MailChimp should now be uppercased (backwards compatibility is included)
294
+ * Improved: Fields named added through the wizard are now validated and sanitized
295
+ * Improved: Added caching to the backend which makes it way faster
296
+ * Improved: Various usability improvements
297
+
298
+ = 0.8.1 =
299
+ * Fixed: typo in form success message
300
+ * Improved: various little improvements
301
+ * Added: option to hide the form after a successful sign-up
302
+
303
+ = 0.8 =
304
+ * Changed links to show your appreciation for this plugin.
305
+ * Improved: CSS reset now works for registration forms as well.
306
+ * Improved: Code, removed unnecessary code, only load classes when not existing yet, etc.
307
+ * Improved: hooked into user_register to allow third-party registration form plugins.
308
+ * Added: Shortcode for usage inside Contact Form 7 form templates `[mc4wp_checkbox]`
309
+ * Added: Catch-all, hook into ANY form using ANY input field with name attribute `mc4wp-try-subscribe` and value `1`.
310
+ * Fixed: Subscribe from Multisite sign-up
311
+ * Fixed: 404 page when no e-mail given.
312
+
313
+
314
+ = 0.7 =
315
+ * Improved: small backend JavaScript improvements / fixes
316
+ * Improved: configuration tabs on options page now work with JavaScript disabled as well
317
+ * Added: form and checkbox can now subscribe to different lists
318
+ * Added: Error messages for WP Administrators (for debugging)
319
+ * Added: `mc4wp_checkbox()` function to manually add the checkbox to a comment form.
320
+
321
+ = 0.6.2 =
322
+ * Fixed: Double quotes now enabled in text labels and success / error messages (which enables the use of JavaScript)
323
+ * Fixed: Sign-up form failing silently without showing error.
324
+
325
+ = 0.6.1 =
326
+ * Fixed: error notices
327
+ * Added: some default CSS for success and error notices
328
+ * Added: notice when form mark-up does not contain email field
329
+
330
+ = 0.6 =
331
+ * Fixed: cannot redeclare class MCAPI
332
+ * Fixed: scroll to form element
333
+ * Added: notice when copying the form mark-up instead of using `[mc4wp_form]`
334
+ * Added: CSS classes to form success and error message(s).
335
+ * Removed: Static element ID on form success and error message(s) for W3C validity when more than one form on 1 page.
336
+
337
+ = 0.5 =
338
+ * Fixed W3C invalid value "true" for attribute "required"
339
+ * Added scroll to form element after form submit.
340
+ * Added option to redirect visitors after they subscribed using the sign-up form.
341
+
342
+ = 0.4.1 =
343
+ * Fixed correct and more specific error messages
344
+ * Fixed form designer, hidden fields no longer wrapped in paragraph tags
345
+ * Added text fields to form designer
346
+ * Added error message when email address was already on the list
347
+ * Added debug message when there is a problem with one of the (required) merge fields
348
+
349
+ = 0.4 =
350
+ * Improved dashboard, it now has different tabs for the different settings.
351
+ * Improved guessing of first and last name.
352
+ * Fixed debugging statements on settings page
353
+ * Added settings link on plugins overview page
354
+ * Added form functionality
355
+ * Added form shortcode
356
+ * Added necessary filters for shortcodes to work inside text widgets
357
+ * Added spam honeypot to form to ignore bot sign-ups
358
+ * Added error & success messages to form
359
+ * Added Freddy icon to menu
360
+
361
+ = 0.3 =
362
+ * Fixed the missing argument bug when submitting a comment for some users.
363
+ * Added support for regular, BuddyPress and MultiSite registration forms.
364
+
365
+ = 0.2 =
366
+ * Fixed small bug where name of comment author was not correctly assigned
367
+ * Improved CSS reset for checkbox
368
+
369
+ = 0.1 =
370
+ * BETA release
371
+
372
+ == Upgrade Notice ==
373
+
374
+ = 1.2.5 =
375
+ Fixed CSS issue where the form caused a hue gap in the sidebar for some themes.
376
+
377
+ = 1.1.1 =
378
  Bugfix for BuddyPress sites