Version Description
- October 2nd, 2018 =
- Fixing an issue with logging an error from a dashboard widget.
- Adding a warning to when changing an API key.
- Re-adding WordPress' HTTP referer field to forms.
- Adding a filter for default interest groups.
Download this release
Release Info
Developer | yikesitskevin |
Plugin | Easy Forms for MailChimp |
Version | 6.4.7 |
Comparing to | |
See all releases |
Code changes from version 6.4.6 to 6.4.7
- admin/partials/dashboard-widgets/class.list-activity-widget.php +15 -11
- admin/partials/menu/options-sections/general-settings.php +2 -0
- changelog.txt +6 -0
- public/classes/process/class.process_form_submission_handler.php +18 -17
- public/partials/shortcodes/process_form_shortcode.php +11 -7
- readme.txt +6 -6
- yikes-inc-easy-mailchimp-extender.php +2 -2
admin/partials/dashboard-widgets/class.list-activity-widget.php
CHANGED
@@ -70,7 +70,11 @@ class YIKES_Inc_Easy_MailChimp_Dashboard_Widgets {
|
|
70 |
|
71 |
if ( is_wp_error( $list_data ) ) {
|
72 |
$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
|
73 |
-
$error_logging->maybe_write_to_log( $list_data
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
?>
|
@@ -78,17 +82,17 @@ class YIKES_Inc_Easy_MailChimp_Dashboard_Widgets {
|
|
78 |
<?php if ( ! empty( $list_data ) ) {
|
79 |
?>
|
80 |
<section class="inside-widget yikes-dashboard-widget-section">
|
81 |
-
|
82 |
-
|
83 |
-
<?php
|
84 |
-
foreach ( $list_data as $list ) {
|
85 |
-
?>
|
86 |
-
<option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
|
87 |
<?php
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
</section>
|
93 |
<!-- display stats here! -->
|
94 |
<section id="yikes-easy-mc-dashboard-widget-stats">
|
70 |
|
71 |
if ( is_wp_error( $list_data ) ) {
|
72 |
$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
|
73 |
+
$error_logging->maybe_write_to_log( $list_data->get_error_code(), __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Dashboard Activity Widget" );
|
74 |
+
?>
|
75 |
+
<p class="yikes-dashboard-widget-section"><?php _e( "There was an error fetching your list data.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
|
76 |
+
<?php
|
77 |
+
return;
|
78 |
}
|
79 |
|
80 |
?>
|
82 |
<?php if ( ! empty( $list_data ) ) {
|
83 |
?>
|
84 |
<section class="inside-widget yikes-dashboard-widget-section">
|
85 |
+
<strong class="select-list-title"><?php _e( 'Select a list', 'yikes-inc-easy-mailchimp-extender' ) ?>:</strong>
|
86 |
+
<select id="yikes-easy-mc-dashboard-change-list" class="widefat">
|
|
|
|
|
|
|
|
|
87 |
<?php
|
88 |
+
foreach ( $list_data as $list ) {
|
89 |
+
?>
|
90 |
+
<option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
|
91 |
+
<?php
|
92 |
+
}
|
93 |
+
?>
|
94 |
+
</select>
|
95 |
+
<p class="description"><?php _e( 'Select a list from the dropdown above. View statistics related to this list below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
|
96 |
</section>
|
97 |
<!-- display stats here! -->
|
98 |
<section id="yikes-easy-mc-dashboard-widget-stats">
|
admin/partials/menu/options-sections/general-settings.php
CHANGED
@@ -36,6 +36,8 @@ $yikes_mc_api_constant = ( defined( 'YIKES_MC_API_KEY' ) ) ? true : false;
|
|
36 |
<?php if ( ! $yikes_mc_api_constant ) { ?>
|
37 |
<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
|
38 |
<?php } ?>
|
|
|
|
|
39 |
</label>
|
40 |
|
41 |
<!-- Use Nonce Validation Field -->
|
36 |
<?php if ( ! $yikes_mc_api_constant ) { ?>
|
37 |
<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
|
38 |
<?php } ?>
|
39 |
+
|
40 |
+
<p class="description">Warning: changing your API key will break your current forms.</p>
|
41 |
</label>
|
42 |
|
43 |
<!-- Use Nonce Validation Field -->
|
changelog.txt
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 6.4.6 - September 10th, 2018 =
|
4 |
* Added the ability to re-subscribe to a list via an integration checkbox. Previously, users who were unsubscribed or pending confirmation were unable to re-subscribe. This only works when using the [default] double opt-in method.
|
5 |
* Added a check for reCAPTCHA/[GDPR Compliance for MailChimp](https://wordpress.org/plugins/eu-opt-in-compliance-for-mailchimp/) when calculating inline styles. If you have the reCAPTCHA or [GDPR Compliance for MailChimp](https://wordpress.org/plugins/eu-opt-in-compliance-for-mailchimp/) plugin active, then the submit button will become full width, drop below these items, and the fields will take up 100% of the width. A similar conversion occurs when the screen size is below 768px regardless of the reCAPTCHA or [GDPR Compliance for MailChimp](https://wordpress.org/plugins/eu-opt-in-compliance-for-mailchimp/) plugin being active.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 6.4.7 - October 2nd, 2018 =
|
4 |
+
* Fixing an issue with logging an error from a dashboard widget.
|
5 |
+
* Adding a warning to when changing an API key.
|
6 |
+
* Re-adding WordPress' HTTP referer field to forms.
|
7 |
+
* Adding a filter for default interest groups.
|
8 |
+
|
9 |
= 6.4.6 - September 10th, 2018 =
|
10 |
* Added the ability to re-subscribe to a list via an integration checkbox. Previously, users who were unsubscribed or pending confirmation were unable to re-subscribe. This only works when using the [default] double opt-in method.
|
11 |
* Added a check for reCAPTCHA/[GDPR Compliance for MailChimp](https://wordpress.org/plugins/eu-opt-in-compliance-for-mailchimp/) when calculating inline styles. If you have the reCAPTCHA or [GDPR Compliance for MailChimp](https://wordpress.org/plugins/eu-opt-in-compliance-for-mailchimp/) plugin active, then the submit button will become full width, drop below these items, and the fields will take up 100% of the width. A similar conversion occurs when the screen size is below 768px regardless of the reCAPTCHA or [GDPR Compliance for MailChimp](https://wordpress.org/plugins/eu-opt-in-compliance-for-mailchimp/) plugin being active.
|
public/classes/process/class.process_form_submission_handler.php
CHANGED
@@ -239,29 +239,30 @@ class Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_Handler {
|
|
239 |
// Define our hardcoded fields
|
240 |
$this->skipped_form_fields = array(
|
241 |
'yikes_easy_mc_new_subscriber' => 1,
|
|
|
242 |
);
|
243 |
|
244 |
// Define our error messages
|
245 |
-
$this->handle_empty_form_id_message
|
246 |
-
$this->handle_empty_form_message
|
247 |
-
$this->handle_empty_fields_generic_message
|
248 |
-
$this->handle_empty_list_handler_message
|
249 |
-
$this->handle_empty_email_message
|
250 |
-
$this->handle_non_empty_honeypot_message
|
251 |
$this->handle_disallowed_existing_user_update_message = __( 'The email you entered is already a subscriber to this list.', 'yikes-inc-easy-mailchimp-extender' );
|
252 |
-
$this->default_error_response_message
|
253 |
-
$this->handle_updating_existing_user_message
|
254 |
-
$this->handle_updating_existing_user_link_message
|
255 |
-
$this->handle_empty_required_field_message
|
256 |
-
$this->handle_empty_required_interest_group_message
|
257 |
-
$this->handle_nonce_message
|
258 |
-
$this->handle_non_filled_recaptcha_message_message
|
259 |
-
$this->generic_recaptcha_error_message
|
260 |
|
261 |
// Define our success messages
|
262 |
-
$this->default_response_single_optin_success_message
|
263 |
-
$this->default_response_double_optin_success_message
|
264 |
-
$this->existing_subscriber_profile_update_message
|
265 |
}
|
266 |
|
267 |
/**** Setters for our Form Variables ****/
|
239 |
// Define our hardcoded fields
|
240 |
$this->skipped_form_fields = array(
|
241 |
'yikes_easy_mc_new_subscriber' => 1,
|
242 |
+
'_wp_http_referer' => 1,
|
243 |
);
|
244 |
|
245 |
// Define our error messages
|
246 |
+
$this->handle_empty_form_id_message = __( 'Error: We were unable to find the form ID.', 'yikes-inc-easy-mailchimp-extender' );
|
247 |
+
$this->handle_empty_form_message = __( 'Error: We were unable to find the form data.', 'yikes-inc-easy-mailchimp-extender' );
|
248 |
+
$this->handle_empty_fields_generic_message = __( 'Error: We were unable to find the form fields.', 'yikes-inc-easy-mailchimp-extender' );
|
249 |
+
$this->handle_empty_list_handler_message = __( 'Error: We were unable to find the list handler.', 'yikes-inc-easy-mailchimp-extender' );
|
250 |
+
$this->handle_empty_email_message = __( 'Error: The email is invalid.', 'yikes-inc-easy-mailchimp-extender' );
|
251 |
+
$this->handle_non_empty_honeypot_message = __( 'Error: It looks like the honeypot was filled out and the form was not properly submitted.', 'yikes-inc-easy-mailchimp-extender' );
|
252 |
$this->handle_disallowed_existing_user_update_message = __( 'The email you entered is already a subscriber to this list.', 'yikes-inc-easy-mailchimp-extender' );
|
253 |
+
$this->default_error_response_message = __( 'Whoops! It looks like something went wrong. Please try again.', 'yikes-inc-easy-mailchimp-extender' );
|
254 |
+
$this->handle_updating_existing_user_message = __( 'You\'re already subscribed. ', 'yikes-inc-easy-mailchimp-extender' );
|
255 |
+
$this->handle_updating_existing_user_link_message = __( 'To update your MailChimp profile, please click to send yourself an update link', 'yikes-inc-easy-mailchimp-extender' );
|
256 |
+
$this->handle_empty_required_field_message = __( 'A required field is missing.', 'yikes-inc-easy-mailchimp-extender' );
|
257 |
+
$this->handle_empty_required_interest_group_message = __( 'A required interest group is missing.', 'yikes-inc-easy-mailchimp-extender' );
|
258 |
+
$this->handle_nonce_message = __( 'Error: Sorry, the nonce security check didn\'t pass. Please reload the page and try again. You may want to try clearing your browser cache as a last attempt.' , 'yikes-inc-easy-mailchimp-extender' );
|
259 |
+
$this->handle_non_filled_recaptcha_message_message = __( 'Please check the reCAPTCHA field.', 'yikes-inc-easy-mailchimp-extender' );
|
260 |
+
$this->generic_recaptcha_error_message = __( 'Please refresh the page and try again.', 'yikes-inc-easy-mailchimp-extender' );
|
261 |
|
262 |
// Define our success messages
|
263 |
+
$this->default_response_single_optin_success_message = __( 'Thank you for subscribing!' , 'yikes-inc-easy-mailchimp-extender' );
|
264 |
+
$this->default_response_double_optin_success_message = __( 'Thank you for subscribing. Check your email for the confirmation message.' , 'yikes-inc-easy-mailchimp-extender' );
|
265 |
+
$this->existing_subscriber_profile_update_message = __( 'Thank you for already being a subscriber! Your profile info has been updated.', 'yikes-inc-easy-mailchimp-extender' );
|
266 |
}
|
267 |
|
268 |
/**** Setters for our Form Variables ****/
|
public/partials/shortcodes/process_form_shortcode.php
CHANGED
@@ -1048,12 +1048,14 @@ function process_mailchimp_shortcode( $atts ) {
|
|
1048 |
$description = apply_filters( 'yikes-mailchimp-' . $field['group_id'] . '-description-html', $description, esc_attr( stripslashes( $field['description'] ) ), $form_id );
|
1049 |
}
|
1050 |
|
1051 |
-
// Get
|
1052 |
-
$
|
1053 |
-
$default_choice = ( is_array( $default_choice ) ) ? $default_choice : array( $default_choice );
|
1054 |
|
1055 |
-
//
|
1056 |
-
$
|
|
|
|
|
|
|
1057 |
|
1058 |
$count = count( $groups );
|
1059 |
|
@@ -1085,7 +1087,7 @@ function process_mailchimp_shortcode( $atts ) {
|
|
1085 |
if ( $show_description === true && $description_above === true ) { echo $description; }
|
1086 |
|
1087 |
// Display Submission Errors
|
1088 |
-
if( ! empty( $missing_required_checkbox_interest_groups ) ) {
|
1089 |
if( in_array( $field['group_id'], $missing_required_checkbox_interest_groups ) ) {
|
1090 |
?>
|
1091 |
<p class="yikes-mailchimp-required-interest-group-error">
|
@@ -1098,7 +1100,7 @@ function process_mailchimp_shortcode( $atts ) {
|
|
1098 |
foreach ( $groups as $group_id => $name ) {
|
1099 |
|
1100 |
// If the form was submitted and failed, set the submitted/chosen values as the default
|
1101 |
-
if( isset( $_POST[ 'group-' . $field['group_id'] ] ) && $form_submitted === 0 ) {
|
1102 |
|
1103 |
// Format default choice as array
|
1104 |
$default_choice = ( is_array( $_POST[ 'group-' . $field['group_id'] ] ) ) ? $_POST[ 'group-' . $field['group_id'] ] : array( $_POST[ 'group-' . $field['group_id'] ] );
|
@@ -1273,6 +1275,8 @@ function process_mailchimp_shortcode( $atts ) {
|
|
1273 |
?>
|
1274 |
<!-- Nonce Security Check -->
|
1275 |
<input type="hidden" id="yikes_easy_mc_new_subscriber_<?php echo esc_attr( $form_id ); ?>" name="yikes_easy_mc_new_subscriber" value="<?php echo wp_create_nonce( 'yikes_easy_mc_form_submit' ); ?>">
|
|
|
|
|
1276 |
</form>
|
1277 |
<!-- MailChimp Form generated by Easy Forms for MailChimp v<?php echo YIKES_MC_VERSION; ?> (https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/) -->
|
1278 |
|
1048 |
$description = apply_filters( 'yikes-mailchimp-' . $field['group_id'] . '-description-html', $description, esc_attr( stripslashes( $field['description'] ) ), $form_id );
|
1049 |
}
|
1050 |
|
1051 |
+
// Get our groups
|
1052 |
+
$groups = isset( $field['groups'] ) && ! empty( $field['groups'] ) ? json_decode( $field['groups'], true ) : array();
|
|
|
1053 |
|
1054 |
+
// Get the default choice(s) from the field settings and turn them into an array if not already
|
1055 |
+
$default_choice = isset( $field['default_choice'] ) ? $field['default_choice'] : '';
|
1056 |
+
$default_choice = is_array( $default_choice ) ? $default_choice : array( $default_choice );
|
1057 |
+
$default_choice = apply_filters( 'yikes-mailchimp-' . $field['group_id'] . '-default', $default_choice, $groups, $field, $form_id );
|
1058 |
+
|
1059 |
|
1060 |
$count = count( $groups );
|
1061 |
|
1087 |
if ( $show_description === true && $description_above === true ) { echo $description; }
|
1088 |
|
1089 |
// Display Submission Errors
|
1090 |
+
if ( ! empty( $missing_required_checkbox_interest_groups ) ) {
|
1091 |
if( in_array( $field['group_id'], $missing_required_checkbox_interest_groups ) ) {
|
1092 |
?>
|
1093 |
<p class="yikes-mailchimp-required-interest-group-error">
|
1100 |
foreach ( $groups as $group_id => $name ) {
|
1101 |
|
1102 |
// If the form was submitted and failed, set the submitted/chosen values as the default
|
1103 |
+
if ( isset( $_POST[ 'group-' . $field['group_id'] ] ) && $form_submitted === 0 ) {
|
1104 |
|
1105 |
// Format default choice as array
|
1106 |
$default_choice = ( is_array( $_POST[ 'group-' . $field['group_id'] ] ) ) ? $_POST[ 'group-' . $field['group_id'] ] : array( $_POST[ 'group-' . $field['group_id'] ] );
|
1275 |
?>
|
1276 |
<!-- Nonce Security Check -->
|
1277 |
<input type="hidden" id="yikes_easy_mc_new_subscriber_<?php echo esc_attr( $form_id ); ?>" name="yikes_easy_mc_new_subscriber" value="<?php echo wp_create_nonce( 'yikes_easy_mc_form_submit' ); ?>">
|
1278 |
+
<?php wp_referer_field(); ?>
|
1279 |
+
|
1280 |
</form>
|
1281 |
<!-- MailChimp Form generated by Easy Forms for MailChimp v<?php echo YIKES_MC_VERSION; ?> (https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/) -->
|
1282 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://yikesplugins.com/?utm_source=wp_plugin_repo&utm_medium=dona
|
|
4 |
Tags: MailChimp, MailChimp forms, MailChimp lists, opt-in forms, sign up form, MailChimp, email, forms, mailing lists, marketing, newsletter, sign up
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9.8
|
7 |
-
Stable tag: 6.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -171,8 +171,8 @@ For information and code examples on how to implement the hooks and filters prov
|
|
171 |
|
172 |
== Changelog ==
|
173 |
|
174 |
-
= 6.4.
|
175 |
-
*
|
176 |
-
*
|
177 |
-
*
|
178 |
-
*
|
4 |
Tags: MailChimp, MailChimp forms, MailChimp lists, opt-in forms, sign up form, MailChimp, email, forms, mailing lists, marketing, newsletter, sign up
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9.8
|
7 |
+
Stable tag: 6.4.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
171 |
|
172 |
== Changelog ==
|
173 |
|
174 |
+
= 6.4.7 - October 2nd, 2018 =
|
175 |
+
* Fixing an issue with logging an error from a dashboard widget.
|
176 |
+
* Adding a warning to when changing an API key.
|
177 |
+
* Re-adding WordPress' HTTP referer field to forms.
|
178 |
+
* Adding a filter for default interest groups.
|
yikes-inc-easy-mailchimp-extender.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Easy Forms for MailChimp
|
4 |
* Plugin URI: https://yikesplugins.com/plugin/easy-forms-for-mailchimp/
|
5 |
* Description: The ultimate MailChimp WordPress plugin. Easily build <strong>unlimited forms for your MailChimp lists</strong>, add them to your site and track subscriber activity. To get started, go to the settings page and enter your <a href="https://yikesplugins.com/support/knowledge-base/finding-your-mailchimp-api-key/" target="_blank">MailChimp API key</a>.
|
6 |
-
* Version: 6.4.
|
7 |
* Author: YIKES, Inc.
|
8 |
* Author URI: https://www.yikesplugins.com/
|
9 |
* License: GPL-3.0+
|
@@ -43,7 +43,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
43 |
* @since 6.1.3
|
44 |
*/
|
45 |
if ( ! defined( 'YIKES_MC_VERSION' ) ) {
|
46 |
-
define( 'YIKES_MC_VERSION' , '6.4.
|
47 |
}
|
48 |
|
49 |
/**
|
3 |
* Plugin Name: Easy Forms for MailChimp
|
4 |
* Plugin URI: https://yikesplugins.com/plugin/easy-forms-for-mailchimp/
|
5 |
* Description: The ultimate MailChimp WordPress plugin. Easily build <strong>unlimited forms for your MailChimp lists</strong>, add them to your site and track subscriber activity. To get started, go to the settings page and enter your <a href="https://yikesplugins.com/support/knowledge-base/finding-your-mailchimp-api-key/" target="_blank">MailChimp API key</a>.
|
6 |
+
* Version: 6.4.7
|
7 |
* Author: YIKES, Inc.
|
8 |
* Author URI: https://www.yikesplugins.com/
|
9 |
* License: GPL-3.0+
|
43 |
* @since 6.1.3
|
44 |
*/
|
45 |
if ( ! defined( 'YIKES_MC_VERSION' ) ) {
|
46 |
+
define( 'YIKES_MC_VERSION' , '6.4.7' );
|
47 |
}
|
48 |
|
49 |
/**
|