MailChimp for WordPress - Version 1.3

Version Description

  • Added: Form widget
  • Added: Smooth scroll to form element after form submission (if jQuery loaded)
  • Improved: Added and removed some buttons from QTags editor toolbar
  • Improved: Some UI improvements
  • Improved: Optimized integration with third-party forms like Contact Form 7
Download this release

Release Info

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

Code changes from version 1.2.5 to 1.3

assets/js/admin.js CHANGED
@@ -10,6 +10,16 @@
10
  });
11
 
12
 
 
 
 
 
 
 
 
 
 
 
13
  /**
14
  * MailChimp for WordPress Field Wizard
15
  * Created by Danny van Kooten
10
  });
11
 
12
 
13
+ // Add buttons to QTags editor
14
+ (function() {
15
+ if(window.QTags == undefined) { return; }
16
+
17
+ QTags.addButton( 'mc4wp_paragraph', '<p>', '<p>', '</p>', 'p', 'Paragraph tag', 1 );
18
+ QTags.addButton( 'mc4wp_label', 'label', '<label>', '</label>', 'l', 'Label tag', 2 );
19
+ QTags.addButton( 'mc4wp_subscriber_count', '# of subscribers', '{subscriber_count}', '', 's', 'Shows number of subscribers of selected list(s)' );
20
+ })();
21
+
22
+
23
  /**
24
  * MailChimp for WordPress Field Wizard
25
  * Created by Danny van Kooten
includes/MC4WP_Lite.php CHANGED
@@ -40,23 +40,28 @@ class MC4WP_Lite {
40
  }
41
  return self::$admin;
42
  }
 
43
  public function __construct() {
44
  self::$instance = $this;
45
 
46
  $this->backwards_compatibility();
47
  $opts = $this->get_options();
48
 
49
- // setup the code
50
  self::checkbox();
 
 
51
  self::form();
52
 
 
 
 
53
  if ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) {
54
- // non-ajax only
55
  if ( is_admin() ) {
56
- // backend non-ajax only
57
  self::admin();
58
  } else {
59
- // frontend non-ajax only
60
  include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template-functions.php';
61
  }
62
  }
@@ -162,4 +167,10 @@ class MC4WP_Lite {
162
 
163
  }
164
 
 
 
 
 
 
 
165
  }
40
  }
41
  return self::$admin;
42
  }
43
+
44
  public function __construct() {
45
  self::$instance = $this;
46
 
47
  $this->backwards_compatibility();
48
  $opts = $this->get_options();
49
 
50
+ // checkbox
51
  self::checkbox();
52
+
53
+ // form
54
  self::form();
55
 
56
+ // widget
57
+ add_action( 'widgets_init', array($this, 'register_widget') );
58
+
59
  if ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) {
 
60
  if ( is_admin() ) {
61
+ // backend only
62
  self::admin();
63
  } else {
64
+ // frontend only
65
  include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template-functions.php';
66
  }
67
  }
167
 
168
  }
169
 
170
+ public function register_widget()
171
+ {
172
+ include_once MC4WP_LITE_PLUGIN_DIR . 'includes/MC4WP_Lite_Widget.php';
173
+ register_widget( 'MC4WP_Lite_Widget' );
174
+ }
175
+
176
  }
includes/MC4WP_Lite_API.php CHANGED
@@ -101,7 +101,7 @@ class MC4WP_Lite_API {
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
  );
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
  );
includes/MC4WP_Lite_Admin.php CHANGED
@@ -16,11 +16,18 @@ class MC4WP_Lite_Admin
16
  register_deactivation_hook( 'mailchimp-for-wp-pro/mailchimp-for-wp-pro.php', array($this, 'delete_transients') );
17
 
18
  add_filter("plugin_action_links_mailchimp-for-wp/mailchimp-for-wp.php", array($this, 'add_settings_link'));
19
-
20
  // did the user click on upgrade to pro link?
21
- if(isset($_GET['page']) && $_GET['page'] == 'mc4wp-lite-upgrade' && !headers_sent()) {
22
- header("Location: http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/");
23
- exit;
 
 
 
 
 
 
 
24
  }
25
  }
26
 
@@ -30,6 +37,15 @@ class MC4WP_Lite_Admin
30
  delete_transient('mc4wp_mailchimp_lists_fallback');
31
  }
32
 
 
 
 
 
 
 
 
 
 
33
  public function add_settings_link($links)
34
  {
35
  $settings_link = '<a href="admin.php?page=mc4wp-lite">Settings</a>';
16
  register_deactivation_hook( 'mailchimp-for-wp-pro/mailchimp-for-wp-pro.php', array($this, 'delete_transients') );
17
 
18
  add_filter("plugin_action_links_mailchimp-for-wp/mailchimp-for-wp.php", array($this, 'add_settings_link'));
19
+
20
  // did the user click on upgrade to pro link?
21
+ if(isset($_GET['page'])) {
22
+
23
+ if($_GET['page'] == 'mc4wp-lite-upgrade' && !headers_sent()) {
24
+ header("Location: http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/?utm_source=lite-plugin&utm_medium=link&utm_campaign=menu-upgrade-link");
25
+ exit;
26
+ }
27
+
28
+ if($_GET['page'] == 'mc4wp-lite-form-settings') {
29
+ add_filter('quicktags_settings', array($this, 'set_quicktags_buttons'), 10, 2 );
30
+ }
31
  }
32
  }
33
 
37
  delete_transient('mc4wp_mailchimp_lists_fallback');
38
  }
39
 
40
+ public function set_quicktags_buttons($settings, $editor_id)
41
+ {
42
+ if($editor_id != 'mc4wpformmarkup') { return $settings; }
43
+
44
+ // strong,em,link,block,del,ins,img,ul,ol,li,code,more,close
45
+ $settings['buttons'] = 'strong,em,link,block,img,ul,ol,li,close';
46
+ return $settings;
47
+ }
48
+
49
  public function add_settings_link($links)
50
  {
51
  $settings_link = '<a href="admin.php?page=mc4wp-lite">Settings</a>';
includes/MC4WP_Lite_Checkbox.php CHANGED
@@ -230,24 +230,29 @@ class MC4WP_Lite_Checkbox
230
  $email = null;
231
  $merge_vars = array();
232
 
233
- // Add all fields with name attribute "mc4wp-*" to merge vars
234
  foreach($_POST as $key => $value) {
235
 
236
  if($key == 'mc4wp-try-subscribe') {
237
  continue;
238
- } elseif(!$email && is_email($value)) {
239
- // find e-mail field
240
- $email = $value;
241
- } elseif(in_array($key, array('name', 'your-name', 'NAME', 'username', 'fullname'))) {
242
- // find name field
243
- $merge_vars['NAME'] = $value;
244
  } elseif(strtolower(substr($key, 0, 6)) == 'mc4wp-') {
245
  // find extra fields which should be sent to MailChimp
246
  $key = strtoupper(substr($key, 6));
247
 
248
- if(!isset($merge_vars[$key])) {
 
 
 
 
 
249
  $merge_vars[$key] = $value;
250
  }
 
 
 
 
 
 
 
251
  }
252
  }
253
 
@@ -323,9 +328,17 @@ class MC4WP_Lite_Checkbox
323
  $merge_vars['FNAME'] = $merge_vars['NAME'];
324
  }
325
  }
 
 
 
326
 
327
  foreach($lists as $list) {
328
- $result = $api->subscribe($list, $email, $merge_vars, 'html', $opts['double_optin']);
 
 
 
 
 
329
  }
330
 
331
  // check if result succeeded, show debug message to administrators
230
  $email = null;
231
  $merge_vars = array();
232
 
 
233
  foreach($_POST as $key => $value) {
234
 
235
  if($key == 'mc4wp-try-subscribe') {
236
  continue;
 
 
 
 
 
 
237
  } elseif(strtolower(substr($key, 0, 6)) == 'mc4wp-') {
238
  // find extra fields which should be sent to MailChimp
239
  $key = strtoupper(substr($key, 6));
240
 
241
+ if($key == 'EMAIL') {
242
+ $email = $value;
243
+ } elseif(!isset($merge_vars[$key])) {
244
+ // if value is array, convert to comma-delimited string
245
+ if(is_array($value)) { $value = implode(',', $value); }
246
+
247
  $merge_vars[$key] = $value;
248
  }
249
+
250
+ } elseif(!$email && is_email($value)) {
251
+ // find first email field
252
+ $email = $value;
253
+ } elseif(!isset($merge_vars['NAME']) && in_array(strtolower($key), array('name', 'your-name', 'username', 'fullname', 'full-name'))) {
254
+ // find name field
255
+ $merge_vars['NAME'] = $value;
256
  }
257
  }
258
 
328
  $merge_vars['FNAME'] = $merge_vars['NAME'];
329
  }
330
  }
331
+
332
+ $merge_vars = apply_filters('mc4wp_merge_vars', $merge_vars);
333
+ $email_type = apply_filters('mc4wp_email_type', 'html');
334
 
335
  foreach($lists as $list) {
336
+ $result = $api->subscribe($list, $email, $merge_vars, $email_type, $opts['double_optin']);
337
+
338
+ if($result === true) {
339
+ $from_url = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';
340
+ do_action( 'mc4wp_subscribe_checkbox', $email, $list, $merge_vars );
341
+ }
342
  }
343
 
344
  // check if result succeeded, show debug message to administrators
includes/MC4WP_Lite_Form.php CHANGED
@@ -22,6 +22,7 @@ class MC4WP_Lite_Form {
22
  if ( isset( $_POST['mc4wp_form_submit'] ) ) {
23
  $this->ensure_backwards_compatibility();
24
  add_action( 'init', array( $this, 'submit' ) );
 
25
  }
26
 
27
 
@@ -39,10 +40,10 @@ class MC4WP_Lite_Form {
39
  public function output_form( $atts, $content = null ) {
40
  $opts = $this->get_options();
41
 
42
- if(!function_exists('mc4wp_replace_variables')) {
43
  include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template-functions.php';
44
  }
45
-
46
  // add some useful css classes
47
  $css_classes = ' ';
48
  if ( $this->error ) $css_classes .= 'mc4wp-form-error ';
@@ -68,6 +69,7 @@ class MC4WP_Lite_Form {
68
  }
69
 
70
  if ( $this->form_instance_number == $this->submitted_form_instance ) {
 
71
  if ( $this->success ) {
72
  $content .= '<div class="mc4wp-alert mc4wp-success">' . __( $opts['text_success'] ) . '</div>';
73
  } elseif ( $this->error ) {
@@ -264,8 +266,16 @@ class MC4WP_Lite_Form {
264
  }
265
  }
266
 
 
 
 
267
  foreach ( $lists as $list ) {
268
- $result = $api->subscribe( $list, $email, $merge_vars, 'html', $opts['double_optin'] );
 
 
 
 
 
269
  }
270
 
271
  if ( $result === true ) {
@@ -280,4 +290,29 @@ class MC4WP_Lite_Form {
280
  return $result;
281
  }
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  }
22
  if ( isset( $_POST['mc4wp_form_submit'] ) ) {
23
  $this->ensure_backwards_compatibility();
24
  add_action( 'init', array( $this, 'submit' ) );
25
+ add_action( 'wp_footer', array( $this, 'print_scroll_js' ), 99);
26
  }
27
 
28
 
40
  public function output_form( $atts, $content = null ) {
41
  $opts = $this->get_options();
42
 
43
+ if ( !function_exists( 'mc4wp_replace_variables' ) ) {
44
  include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template-functions.php';
45
  }
46
+
47
  // add some useful css classes
48
  $css_classes = ' ';
49
  if ( $this->error ) $css_classes .= 'mc4wp-form-error ';
69
  }
70
 
71
  if ( $this->form_instance_number == $this->submitted_form_instance ) {
72
+
73
  if ( $this->success ) {
74
  $content .= '<div class="mc4wp-alert mc4wp-success">' . __( $opts['text_success'] ) . '</div>';
75
  } elseif ( $this->error ) {
266
  }
267
  }
268
 
269
+ $merge_vars = apply_filters('mc4wp_merge_vars', $merge_vars);
270
+ $email_type = apply_filters('mc4wp_email_type', 'html');
271
+
272
  foreach ( $lists as $list ) {
273
+ $result = $api->subscribe( $list, $email, $merge_vars, $email_type, $opts['double_optin'] );
274
+
275
+ if($result === true) {
276
+ $from_url = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';
277
+ do_action('mc4wp_subscribe_form', $email, $list, 0, $merge_vars, $from_url);
278
+ }
279
  }
280
 
281
  if ( $result === true ) {
290
  return $result;
291
  }
292
 
293
+ public function print_scroll_js() {
294
+ ?><script type="text/javascript"> (function(){if(undefined==window.jQuery){return}var e=window.jQuery,t=window.location.hash;if(t.substring(1,12)=="mc4wp-form-"){var n=e(t);if(!n.length){return false}var r=n.offset().top,i=(e(window).innerHeight()-n.outerHeight())/2;r=i>0?r-i:r;if(r>0){var s=500+r;e("html,body").animate({scrollTop:r},s)}return false}})()</script><?php
295
+ /*
296
+ (function() {
297
+ if ( undefined == window.jQuery ) { return; }
298
+ var $ = window.jQuery, hash = window.location.hash;
299
+ if (hash.substring(1, 12) == 'mc4wp-form-') {
300
+ var $target = $(hash);
301
+ if(!$target.length) { return false; }
302
+
303
+ var yOffset = $target.offset().top, substract = (($(window).innerHeight() - $target.outerHeight()) / 2);
304
+ yOffset = (substract > 0) ? yOffset - substract : yOffset;
305
+
306
+ if(yOffset > 0) {
307
+ var animationTime = (500 + yOffset);
308
+ $('html,body').animate({ scrollTop: yOffset }, animationTime);
309
+ }
310
+
311
+ return false;
312
+ }
313
+ })(); */ ?>
314
+
315
+ <?php
316
+ }
317
+
318
  }
includes/MC4WP_Lite_Widget.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Adds MC4WP_Widget widget.
5
+ */
6
+ class MC4WP_Lite_Widget extends WP_Widget {
7
+
8
+ /**
9
+ * Register widget with WordPress.
10
+ */
11
+ function __construct() {
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
+
19
+ /**
20
+ * Front-end display of widget.
21
+ *
22
+ * @see WP_Widget::widget()
23
+ *
24
+ * @param array $args Widget arguments.
25
+ * @param array $instance Saved values from database.
26
+ */
27
+ public function widget( $args, $instance ) {
28
+ $title = apply_filters( 'widget_title', $instance['title'] );
29
+
30
+ echo $args['before_widget'];
31
+ if ( ! empty( $title ) )
32
+ echo $args['before_title'] . $title . $args['after_title'];
33
+ echo mc4wp_get_form(0);
34
+ echo $args['after_widget'];
35
+ }
36
+
37
+ /**
38
+ * Back-end widget form.
39
+ *
40
+ * @see WP_Widget::form()
41
+ *
42
+ * @param array $instance Previously saved values from database.
43
+ */
44
+ public function form( $instance ) {
45
+ $title = isset($instance['title']) ? $instance['title'] : __('Newsletter', 'mailchimp-for-wp');
46
+ ?>
47
+ <p>
48
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
49
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
50
+ </p>
51
+ <p class="help">
52
+ You can edit your form in the <a href="<?php echo admin_url('admin.php?page=mc4wp-lite-form-settings'); ?>">MailChimp for WP Lite form settings.</a>
53
+ </p>
54
+ <?php
55
+ }
56
+
57
+ /**
58
+ * Sanitize widget form values as they are saved.
59
+ *
60
+ * @see WP_Widget::update()
61
+ *
62
+ * @param array $new_instance Values just sent to be saved.
63
+ * @param array $old_instance Previously saved values from database.
64
+ *
65
+ * @return array Updated safe values to be saved.
66
+ */
67
+ public function update( $new_instance, $old_instance ) {
68
+ $instance = array();
69
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
70
+ return $instance;
71
+ }
72
+
73
+ } // class MC4WP_Widget
includes/template-functions.php CHANGED
@@ -82,7 +82,7 @@ if(!function_exists('mc4wp_get_subscriber_count')) {
82
  // start calculating subscribers count for all list combined
83
  $count = 0;
84
  foreach($list_ids as $id) {
85
- $count += $list_counts[$id];
86
  }
87
 
88
  return apply_filters('mc4wp_subscriber_count', $count);
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);
includes/views/form-settings.php CHANGED
@@ -105,7 +105,7 @@
105
  <input type="radio" readonly /> <label>Yes</label> &nbsp;
106
  <input type="radio" checked readonly /> <label>No</label>
107
  </td>
108
- <td class="desc">Tick "yes" if you want to use AJAX to submit forms, meaning the page doesn't need to reload so everything happens inline. <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/">(demo)</a></td>
109
  </tr>
110
  <tr valign="top">
111
  <th scope="row">Load some default CSS?</th>
105
  <input type="radio" readonly /> <label>Yes</label> &nbsp;
106
  <input type="radio" checked readonly /> <label>No</label>
107
  </td>
108
+ <td class="desc">Tick "yes" if you want to use AJAX to submit forms, meaning the page doesn't need to reload so everything happens inline. <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/?utm_source=lite-plugin&utm_medium=link&utm_campaign=settings-demo-link">(demo)</a></td>
109
  </tr>
110
  <tr valign="top">
111
  <th scope="row">Load some default CSS?</th>
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/">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 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>
includes/views/parts/admin-need-support.php CHANGED
@@ -1,5 +1,17 @@
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/">upgrade to the premium version</a>.</p>
 
 
 
 
 
 
 
 
 
 
 
 
5
  </div>
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">
8
+ <h3>Show a token of your appreciation</h3>
9
+ <p>
10
+ </p>
11
+ <ul class="ul-square">
12
+ <li><a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/mailchimp-for-wp?rate=5#postform">Give a &#9733;&#9733;&#9733;&#9733;&#9733; review on WordPress.org</a></li>
13
+ <li><a target="_blank" href="http://twitter.com/?status=Showing%20my%20appreciation%20to%20%40DannyvanKooten%20for%20his%20WordPress%20plugin%3A%20MailChimp%20for%20WP%20%20-%20check%20it%20out!%20http%3A%2F%2Fwordpress.org%2Fplugins%2Fmailchimp-for-wp%2F">Tweet about MailChimp for WP</a></li>
14
+ <li>Review the plugin on your blog and link to <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/">the plugin page</a>.</li>
15
+ <li><a target="_blank" href="http://wordpress.org/plugins/mailchimp-for-wp/">Vote "works" on the WordPress.org plugin page</a></li>
16
+ </ul>
17
  </div>
includes/views/parts/admin-upgrade-to-pro.php CHANGED
@@ -1,17 +1,10 @@
1
  <div class="mc4wp-box" id="mc4wp-upgrade-box">
2
- <h3>Upgrade to MailChimp for WP Pro</h3>
3
 
4
- <p><em>Enjoying this free version of MailChimp for WordPress? You'll <strong>love</strong> Pro.</em></p>
5
 
6
- <p style="text-align: center;"><a target="_blank" class="button button-primary button-hero upgrade-button" href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/">Upgrade to MailChimp for WP Pro</a></p>
 
7
 
8
- <p><strong>Benefits: </strong>AJAX powered forms (<a target="_blank" href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/">demo</a>), form designer (<a href="http://dannyvankooten.com/wp-content/uploads/2013/06/form-css-designer.png">screenshot</a>), reports (line charts and log, <a href="http://dannyvankooten.com/wp-content/uploads/2013/06/mc4wp-statistics.jpg">screenshot</a>), unlocked field wizard, priority support and way more.</strong></p>
9
-
10
- <p>Some alternative ways to show your appreciation:</p>
11
- <ul class="ul-square">
12
- <li><a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/mailchimp-for-wp?rate=5#postform">Give a &#9733;&#9733;&#9733;&#9733;&#9733; review on WordPress.org</a></li>
13
- <li><a target="_blank" href="http://twitter.com/?status=Showing%20my%20appreciation%20to%20%40DannyvanKooten%20for%20his%20WordPress%20plugin%3A%20MailChimp%20for%20WP%20%20-%20check%20it%20out!%20http%3A%2F%2Fwordpress.org%2Fplugins%2Fmailchimp-for-wp%2F">Tweet about MailChimp for WP</a></li>
14
- <li>Review the plugin on your blog and link to <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/">the plugin page</a>.</li>
15
- <li><a target="_blank" href="http://wordpress.org/plugins/mailchimp-for-wp/">Vote "works" on the WordPress.org plugin page</a></li>
16
- </ul>
17
  </div>
1
  <div class="mc4wp-box" id="mc4wp-upgrade-box">
2
+ <h3>MailChimp for WordPress Pro</h3>
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>
mailchimp-for-wp.php CHANGED
@@ -3,7 +3,7 @@
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.2.5
7
  Author: Danny van Kooten
8
  Author URI: http://dannyvanKooten.com
9
  License: GPL v3
@@ -25,7 +25,7 @@ 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.2.5");
29
  define("MC4WP_LITE_PLUGIN_DIR", plugin_dir_path(__FILE__));
30
 
31
  // frontend AND backend
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
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
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -16,13 +16,13 @@ The best MailChimp plugin to get more email subscribers. Easily add sign-up form
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 then add them to your posts, pages and widget areas by using a simple shortcode `[mc4wp-form]`.
20
 
21
- Add "sign up to our newsletter" checkboxes to your comment form, registration form or other forms, 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/)*
26
 
27
  **Plugin Features**
28
 
@@ -41,12 +41,12 @@ Add "sign up to our newsletter" checkboxes to your comment form, registration fo
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/) | [Screenshots](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/screenshots/) | [Demo](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/) | [Upgrade now >>](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/)
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. Big plus!
48
 
49
- Use the `[mc4wp-form]` shortcode to show a sign-up form in your posts, pages or text widgets.
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.
@@ -55,7 +55,7 @@ You can add sign-up checkboxes to ANY form you like, including Contact Form 7 fo
55
 
56
  **More information**
57
 
58
- Check out more [WordPress plugins](http://dannyvankooten.com/wordpress-plugins/) by [Danny van Kooten](http://dannyvankooten.com) or [contact him on Twitter](http://twitter.com/dannyvankooten).
59
 
60
 
61
  == Installation ==
@@ -67,7 +67,7 @@ Check out more [WordPress plugins](http://dannyvankooten.com/wordpress-plugins/)
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](dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/) for an even better plugin.
71
 
72
  == Frequently Asked Questions ==
73
 
@@ -82,10 +82,19 @@ Yes, there is and it is awesome. Pro features include:
82
  1. Custom checkbox labels
83
  1. Priority support
84
 
85
- [More information](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/) | [Screenshots](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/screenshots/) | [Demo](http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/demo-sign-up-forms/)
 
 
 
 
 
 
 
 
 
86
 
87
  = The form shows a success message but subscribers are not added to my list(s)? =
88
- If the form shows a success message, it means the sign-up succeeded. Always. MailChimp could have a slight delay sending the confirmation email though, just be patient.
89
 
90
  = How can I style the sign-up form? =
91
  You can use CSS rules to style the sign-up form, use the following CSS selectors to target the various form elements.
@@ -159,14 +168,21 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
159
  1. **Premium only:** Design beautiful sign-up forms using the form CSS designer.
160
  2. Add a sign-up checkbox to various places on your website.
161
  3. An example sign-up checkbox.
162
- 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/) are available on my website.
163
  5. **Premium only:** Create multiple AJAX powered sign-up forms.
164
  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.
165
- 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/)
166
 
167
 
168
  == Changelog ==
169
 
 
 
 
 
 
 
 
170
  = 1.2.5 =
171
  * Fixed `undefined function mc4wp_replace_variables` fatal error when using Quick Cache plugin.
172
 
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
 
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
 
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.
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 ==
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
 
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.
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