Version Description
- Fixed: certain MailChimp fields not showing up in "Add field" dropdown.
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.3
- assets/js/admin.js +8 -8
- includes/MC4WP_Lite_Checkbox.php +4 -2
- mailchimp-for-wp.php +2 -2
- readme.txt +9 -1
assets/js/admin.js
CHANGED
@@ -48,27 +48,27 @@
|
|
48 |
|
49 |
// loop through merge fields from this list
|
50 |
for(var i = 0, fieldCount = fields.length; i < fieldCount; i++) {
|
51 |
-
var
|
52 |
|
53 |
// add field to select if no similar option exists yet
|
54 |
-
if($mailchimpMergeFields.find("option[value='"+
|
55 |
|
56 |
-
var text = (
|
57 |
-
if(
|
58 |
|
59 |
var include = false;
|
60 |
var triggers = [ 'name', 'email', 'website' ];
|
61 |
-
for(var
|
62 |
-
if(
|
63 |
include = true;
|
64 |
break;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
if(include) {
|
69 |
-
var $option = $("<option />").text(text).val(
|
70 |
} else {
|
71 |
-
var $option = $("<option />").text(text + " (Pro only)").val(
|
72 |
}
|
73 |
|
74 |
$mailchimpMergeFields.append($option);
|
48 |
|
49 |
// loop through merge fields from this list
|
50 |
for(var i = 0, fieldCount = fields.length; i < fieldCount; i++) {
|
51 |
+
var f = fields[i];
|
52 |
|
53 |
// add field to select if no similar option exists yet
|
54 |
+
if($mailchimpMergeFields.find("option[value='"+ f.tag +"']").length == 0) {
|
55 |
|
56 |
+
var text = (f.name.length > 40) ? f.name.substring(0, 40) + '..' : f.name;
|
57 |
+
if(f.req) { text += '*'; }
|
58 |
|
59 |
var include = false;
|
60 |
var triggers = [ 'name', 'email', 'website' ];
|
61 |
+
for(var j = 0; j < triggers.length; j++) {
|
62 |
+
if(f.tag.toLowerCase().indexOf(triggers[i]) !== -1) {
|
63 |
include = true;
|
64 |
break;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
if(include) {
|
69 |
+
var $option = $("<option />").text(text).val(f.tag).data('field', f);
|
70 |
} else {
|
71 |
+
var $option = $("<option />").text(text + " (Pro only)").val(f.tag).attr('disabled', 'disabled');
|
72 |
}
|
73 |
|
74 |
$mailchimpMergeFields.append($option);
|
includes/MC4WP_Lite_Checkbox.php
CHANGED
@@ -215,6 +215,8 @@ class MC4WP_Lite_Checkbox
|
|
215 |
if(!isset($_POST['mc4wp-do-subscribe']) || !$_POST['mc4wp-do-subscribe']) { return false; }
|
216 |
|
217 |
$_POST['mc4wp-try-subscribe'] = 1;
|
|
|
|
|
218 |
return $this->subscribe_from_whatever();
|
219 |
}
|
220 |
/* End Contact Form 7 functions */
|
@@ -239,9 +241,9 @@ class MC4WP_Lite_Checkbox
|
|
239 |
} elseif(in_array($key, array('name', 'your-name', 'NAME', 'username', 'fullname'))) {
|
240 |
// find name field
|
241 |
$merge_vars['NAME'] = $value;
|
242 |
-
} elseif(substr($key, 0,
|
243 |
// find extra fields which should be sent to MailChimp
|
244 |
-
$key = strtoupper(substr($key,
|
245 |
|
246 |
if(!isset($merge_vars[$key])) {
|
247 |
$merge_vars[$key] = $value;
|
215 |
if(!isset($_POST['mc4wp-do-subscribe']) || !$_POST['mc4wp-do-subscribe']) { return false; }
|
216 |
|
217 |
$_POST['mc4wp-try-subscribe'] = 1;
|
218 |
+
unset($_POST['mc4wp-do-subscribe']);
|
219 |
+
|
220 |
return $this->subscribe_from_whatever();
|
221 |
}
|
222 |
/* End Contact Form 7 functions */
|
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;
|
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: MailChimp integration for WordPress, Lite. Add newsletter subscribe checkboxes to various forms. Create sign-up forms and show them in your posts, pages or widgets. <strong>Pro features:</strong> AJAX forms, easy merge var fields, subscriber logging and way more. <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/">Upgrade to Pro now »</a>
|
6 |
-
Version: 1.2.
|
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.
|
29 |
|
30 |
// frontend AND backend
|
31 |
require 'includes/MC4WP_Lite.php';
|
3 |
Plugin Name: MailChimp for WP Lite
|
4 |
Plugin URI: http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/
|
5 |
Description: MailChimp integration for WordPress, Lite. Add newsletter subscribe checkboxes to various forms. Create sign-up forms and show them in your posts, pages or widgets. <strong>Pro features:</strong> AJAX forms, easy merge var fields, subscriber logging and way more. <a href="http://dannyvankooten.com/wordpress-plugins/mailchimp-for-wordpress/">Upgrade to Pro now »</a>
|
6 |
+
Version: 1.2.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.2.3");
|
29 |
|
30 |
// frontend AND backend
|
31 |
require 'includes/MC4WP_Lite.php';
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -167,6 +167,11 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
|
|
167 |
|
168 |
|
169 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
= 1.2.1 =
|
172 |
* Improved: total revamp of the form field wizard, many improvements.
|
@@ -322,5 +327,8 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
|
|
322 |
|
323 |
== Upgrade Notice ==
|
324 |
|
|
|
|
|
|
|
325 |
= 1.1.1 =
|
326 |
Bugfix for BuddyPress sites
|
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.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
167 |
|
168 |
|
169 |
== Changelog ==
|
170 |
+
= 1.2.3 =
|
171 |
+
* Fixed: certain MailChimp fields not showing up in "Add field" dropdown.
|
172 |
+
|
173 |
+
= 1.2.2 =
|
174 |
+
* Fixed sending extra list fields when integrating with third-party forms like Contact Form 7
|
175 |
|
176 |
= 1.2.1 =
|
177 |
* Improved: total revamp of the form field wizard, many improvements.
|
327 |
|
328 |
== Upgrade Notice ==
|
329 |
|
330 |
+
= 1.2.3 =
|
331 |
+
Bugfix. Fixes the absence of certain fields from the "Add field" dropdown when building your sign-up form.
|
332 |
+
|
333 |
= 1.1.1 =
|
334 |
Bugfix for BuddyPress sites
|