MailChimp for WordPress - Version 1.5.8

Version Description

Fixed bug where certain errors (like "already subscribed") were not showing up.

Download this release

Release Info

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

Code changes from version 1.5.7 to 1.5.8

assets/css/form-theme-blue.css CHANGED
@@ -1,12 +1,16 @@
1
- .mc4wp-form input[type="submit"], .mc4wp-form button {
 
2
  color: #ffffff !important;
3
  background-color: #428bca;
4
  border-color: #357ebd;
5
  }
6
 
7
- .mc4wp-form input[type="submit"]:hover, .mc4wp-form button:hover,
8
- .mc4wp-form input[type="submit"]:active, .mc4wp-form button:active,
9
- .mc4wp-form input[type="submit"]:focus, .mc4wp-form button:focus {
 
 
 
10
  color: #ffffff;
11
  background-color: #3276b1;
12
  border-color: #285e8e;
1
+ .mc4wp-form input[type="submit"],
2
+ .mc4wp-form button {
3
  color: #ffffff !important;
4
  background-color: #428bca;
5
  border-color: #357ebd;
6
  }
7
 
8
+ .mc4wp-form input[type="submit"]:hover,
9
+ .mc4wp-form button:hover,
10
+ .mc4wp-form input[type="submit"]:active,
11
+ .mc4wp-form button:active,
12
+ .mc4wp-form input[type="submit"]:focus,
13
+ .mc4wp-form button:focus {
14
  color: #ffffff;
15
  background-color: #3276b1;
16
  border-color: #285e8e;
includes/class-api.php CHANGED
@@ -105,11 +105,12 @@ class MC4WP_Lite_API {
105
  if( ! isset( $result->error ) ) {
106
  return true;
107
  } else {
 
108
  // check error
109
  if( $result->code == 214 ) {
110
  return 'already_subscribed';
111
  }
112
-
113
  // store error message
114
  $this->error_message = $result->error;
115
  return 'error';
105
  if( ! isset( $result->error ) ) {
106
  return true;
107
  } else {
108
+
109
  // check error
110
  if( $result->code == 214 ) {
111
  return 'already_subscribed';
112
  }
113
+
114
  // store error message
115
  $this->error_message = $result->error;
116
  return 'error';
includes/class-form.php CHANGED
@@ -179,13 +179,13 @@ class MC4WP_Lite_Form {
179
  $api = mc4wp_get_api();
180
  $e = $this->error;
181
 
182
- $error_type = ( $e == 'already_subscribed' ) ? 'notice' : 'error';
183
- $error_message = isset($opts['text_' . $e]) ? $opts['text_' . $e] : $opts['text_error'];
184
 
185
  // allow developers to customize error message
186
  $error_message = apply_filters('mc4wp_form_error_message', $error_message, $e );
187
 
188
- $content .= '<div class="mc4wp-alert mc4wp-'. $error_type .'">'. __($error_message, 'mailchimp-for-wp') . '</div>';
189
 
190
  // show the eror returned by MailChimp?
191
  if ( $api->has_error() && current_user_can( 'manage_options' ) ) {
@@ -476,6 +476,7 @@ class MC4WP_Lite_Form {
476
  // subscribe request failed, store error.
477
  $this->success = false;
478
  $this->error = $result;
 
479
  }
480
 
481
  // store user email in a cookie
179
  $api = mc4wp_get_api();
180
  $e = $this->error;
181
 
182
+ $error_type = ( $e === 'already_subscribed' ) ? 'notice' : 'error';
183
+ $error_message = isset( $opts['text_' . $e] ) ? $opts['text_' . $e] : $opts['text_error'];
184
 
185
  // allow developers to customize error message
186
  $error_message = apply_filters('mc4wp_form_error_message', $error_message, $e );
187
 
188
+ $content .= '<div class="mc4wp-alert mc4wp-'. $error_type .'">'. __( $error_message, 'mailchimp-for-wp' ) . '</div>';
189
 
190
  // show the eror returned by MailChimp?
191
  if ( $api->has_error() && current_user_can( 'manage_options' ) ) {
476
  // subscribe request failed, store error.
477
  $this->success = false;
478
  $this->error = $result;
479
+ return false;
480
  }
481
 
482
  // store user email in a cookie
includes/class-widget.php CHANGED
@@ -39,6 +39,11 @@ class MC4WP_Lite_Widget extends WP_Widget {
39
  echo $args['before_title'] . $title . $args['after_title'];
40
  }
41
 
 
 
 
 
 
42
  echo mc4wp_get_form(0);
43
 
44
  echo $args['after_widget'];
39
  echo $args['before_title'] . $title . $args['after_title'];
40
  }
41
 
42
+ // make sure template functions exist (for usage in avia layout builder)
43
+ if ( ! function_exists( 'mc4wp_get_form' ) ) {
44
+ include_once MC4WP_LITE_PLUGIN_DIR . 'includes/template-functions.php';
45
+ }
46
+
47
  echo mc4wp_get_form(0);
48
 
49
  echo $args['after_widget'];
mailchimp-for-wp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MailChimp for WordPress Lite
4
  Plugin URI: http://dannyvankooten.com/mailchimp-for-wordpress/
5
  Description: Lite version of MailChimp for WordPress. Adds various sign-up methods to your website.
6
- Version: 1.5.7
7
  Author: Danny van Kooten
8
  Author URI: http://dannyvanKooten.com
9
  License: GPL v3
@@ -45,7 +45,7 @@ function mc4wp_load_plugin() {
45
  }
46
 
47
  // bootstrap the lite plugin
48
- define( "MC4WP_LITE_VERSION", "1.5.7" );
49
  define( "MC4WP_LITE_PLUGIN_DIR", plugin_dir_path( __FILE__ ) );
50
  define( "MC4WP_LITE_PLUGIN_URL", plugins_url( '/' , __FILE__ ) );
51
 
3
  Plugin Name: MailChimp for WordPress Lite
4
  Plugin URI: http://dannyvankooten.com/mailchimp-for-wordpress/
5
  Description: Lite version of MailChimp for WordPress. Adds various sign-up methods to your website.
6
+ Version: 1.5.8
7
  Author: Danny van Kooten
8
  Author URI: http://dannyvanKooten.com
9
  License: GPL v3
45
  }
46
 
47
  // bootstrap the lite plugin
48
+ define( "MC4WP_LITE_VERSION", "1.5.8" );
49
  define( "MC4WP_LITE_PLUGIN_DIR", plugin_dir_path( __FILE__ ) );
50
  define( "MC4WP_LITE_PLUGIN_URL", plugins_url( '/' , __FILE__ ) );
51
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://dannyvankooten.com/donate/
4
  Tags: mailchimp,form,shortcode,widget,checkbox,comment,newsletter,buddypress,multisite,bbpress,woocommerce,easy digital downloads,contact form,contact form 7
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
- Stable tag: 1.5.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -41,7 +41,9 @@ Add sign-up checkboxes to *any* form on your website. The plugin offers built-in
41
 
42
  **More information**
43
 
44
- Take a look at some other [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: [@DannyvanKooten](http://twitter.com/dannyvankooten).
 
 
45
 
46
 
47
  == Installation ==
@@ -197,6 +199,13 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
197
 
198
  == Changelog ==
199
 
 
 
 
 
 
 
 
200
  = 1.5.7 - March 18, 2014 =
201
  **Fixes**
202
 
@@ -486,6 +495,9 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
486
 
487
  == Upgrade Notice ==
488
 
 
 
 
489
  = 1.5.7 =
490
  Minor improvements and small bug fixes.
491
 
4
  Tags: mailchimp,form,shortcode,widget,checkbox,comment,newsletter,buddypress,multisite,bbpress,woocommerce,easy digital downloads,contact form,contact form 7
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.5.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
41
 
42
  **More information**
43
 
44
+ - Other [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)
45
+ - Contact Danny on Twitter: [@DannyvanKooten](http://twitter.com/dannyvankooten)
46
+ - If you're a dev, follow or contribute to the [MailChimp for WordPress plugin on GitHub](https://github.com/dannyvankooten/mailchimp-for-wordpress)
47
 
48
 
49
  == Installation ==
199
 
200
  == Changelog ==
201
 
202
+ = 1.5.8 - March 26, 2014 =
203
+
204
+ **Fixes**
205
+
206
+ - 'call to undefined function' when using Avia Layout Builder
207
+ - "Already subscribed" message never showing
208
+
209
  = 1.5.7 - March 18, 2014 =
210
  **Fixes**
211
 
495
 
496
  == Upgrade Notice ==
497
 
498
+ = 1.5.8 =
499
+ Fixed bug where certain errors (like "already subscribed") were not showing up.
500
+
501
  = 1.5.7 =
502
  Minor improvements and small bug fixes.
503