Easy Forms for MailChimp - Version 6.8.2

Version Description

  • February 17, 2021 =
  • Dropdown hotfix
Download this release

Release Info

Developer jpowersdev
Plugin Icon 128x128 Easy Forms for MailChimp
Version 6.8.2
Comparing to
See all releases

Code changes from version 6.8.1 to 6.8.2

admin/class-yikes-inc-easy-mailchimp-extender-admin.php CHANGED
@@ -541,7 +541,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
541
  /* Lets only display our admin notice on YT4WP pages to not annoy the hell out of people :) */
542
  if ( in_array( get_current_screen()->base , array( 'dashboard', 'post', 'edit' ) ) || strpos( get_current_screen()->base ,'yikes-inc-easy-mailchimp') !== false ) {
543
 
544
- // The URL of the page the user is currently on
545
  $current_uri = isset( $_SERVER['REQUEST_URI'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : false;
546
  $current_host = isset( $_SERVER['HTTP_HOST'] ) && ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : false;
547
  $current_protocol = is_ssl() === true ? 'https://' : 'http://';
@@ -559,15 +559,15 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
559
  $nobugurl = ( ! empty( $nobugurl ) ) ? $nobugurl : '';
560
 
561
  $review_message = '<div id="yikes-mailchimp-logo"></div>';
562
- $review_message .= sprintf(
563
- __( 'It looks like you\'ve been using %1$s for 2 weeks now. We hope you\'re enjoying the features included with the free version. If so, please consider leaving us a review. Reviews only help to catch other users attention as well as provide us with feedback to grow and improve upon. If you\'re really enjoying the plugin, consider buying an add-on or developer license for some really awesome features and premium support.', 'yikes-inc-easy-mailchimp-extender' )
564
  . '<span class="button-container"> <a href="%2$s" target="_blank" class="button-secondary"><span class="dashicons dashicons-star-filled"></span>'
565
- . __( "Leave A Review" , 'yikes-inc-easy-mailchimp-extender' )
566
  . '</a> <a href="%3$s" class="button-secondary"><span class="dashicons dashicons-upload"></span>'
567
- . __( "View Addons" , 'yikes-inc-easy-mailchimp-extender' )
568
  . '</a> <a href="%4$s" class="button-secondary"><span class="dashicons dashicons-no-alt"></span>'
569
- . __( "Dismiss" , 'yikes-inc-easy-mailchimp-extender' )
570
- . "</a> </span>",
571
  $plugin_name, $reviewurl, $addons_url, $nobugurl );
572
  ?>
573
  <div id="review-yikes-easy-mailchimp-notice">
@@ -988,7 +988,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
988
  */
989
  function generateSupportPage() {
990
 
991
- wp_enqueue_script( 'yikes-inc-easy-mailchimp-extender-support-scripts', plugin_dir_url( __FILE__ ) . 'js/support.js', array( 'jquery' ), $this->version, false );
992
  require_once YIKES_MC_PATH . 'admin/partials/menu/support.php';
993
  }
994
 
@@ -1596,9 +1596,9 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
1596
  if ( ! empty( $merge_variables['merge_fields'] ) ) {
1597
  $available_merge_variables = wp_list_pluck( $merge_variables['merge_fields'], 'tag' );
1598
  $mailchimp_merge_field_ids = wp_list_pluck( $merge_variables['merge_fields'], 'merge_id' );
1599
-
1600
  // Array will look like $merge_tag => $merge_id
1601
- foreach( $available_merge_variables as $index => $merge_tag ) {
1602
  $merge_field_ids[$merge_tag] = $mailchimp_merge_field_ids[$index];
1603
  }
1604
  }
@@ -1613,6 +1613,10 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
1613
  $merged_fields = array_merge( $available_merge_variables, $available_interest_groups );
1614
  $excluded_fields = array_diff( $assigned_fields, $merged_fields );
1615
 
 
 
 
 
1616
  $i = 1;
1617
  foreach( $form_fields as $field ) {
1618
 
@@ -1646,8 +1650,8 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
1646
  <input type="hidden" class="yikes-mc-merge-field-type" name="field[<?php echo $field['merge']; ?>][type]" value="<?php echo $field['type']; ?>" />
1647
  <input type="hidden" class="yikes-mc-merge-field-tag" name="field[<?php echo $field['merge']; ?>][merge]" value="<?php echo $field['merge']; ?>" />
1648
  <input type="hidden" class="field-<?php echo $field['merge']; ?>-position position-input" name="field[<?php echo $field['merge']; ?>][position]" value="<?php echo $i++; ?>" />
1649
- <?php if ( isset( $merge_field_ids[ $field['merge'] ] ) && is_int( $merge_field_ids[ $field['merge'] ] ) ) { ?>
1650
- <input type="hidden" class="yikes-mc-merge-field-id" name="field[<?php echo $field['merge']; ?>][id]" value="<?php echo $merge_field_ids[ $field['merge'] ] ?>" />
1651
  <?php } ?>
1652
 
1653
  <?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) {
@@ -2059,7 +2063,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
2059
  <input id="<?php echo $field_id . 'no-default'; ?>"
2060
  type="<?php echo $field_type; ?>"
2061
  name="<?php echo $field_name; ?>"
2062
- value="no-default"
2063
  <?php is_array( $field['default_choice'] ) ? checked( current( $field['default_choice'] ), 'no-default' ) : checked( $field['default_choice'], 'no-default' ); ?>>
2064
  No Default&nbsp;
2065
  </label>
@@ -2370,11 +2374,11 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
2370
  foreach ( $available_interest_groups as $interest_group ) {
2371
  $not_available = isset( $fields_assigned_to_form[ $interest_group['id'] ] );
2372
  ?>
2373
- <li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>"
2374
- alt="<?php echo esc_attr( $interest_group['id'] ); ?>"
2375
- data-group-id="<?php echo esc_attr( $interest_group['id'] ); ?>"
2376
- data-attr-field-name="<?php echo esc_attr( htmlspecialchars( $interest_group['title'] ) ); ?>"
2377
- data-attr-field-type="<?php echo esc_attr( $interest_group['type'] ); ?>"
2378
  data-attr-form-id="<?php echo esc_attr( $list_id ); ?>"
2379
  title="<?php echo $not_available ? __( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ) : ''; ?>"
2380
  <?php echo $not_available ? 'disabled="disabled"' : ''; ?>
@@ -2508,7 +2512,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
2508
  *
2509
  * @param $post_id_to_clone | int | ID of the original form
2510
  * @param $result | mixed | ID of the new form OR false if the operation failed
2511
- * @param $form_data | array | Array of the form data
2512
  *
2513
  */
2514
  do_action( 'yikes-mailchimp-after-duplicating-form', $post_id_to_clone, $result, $form_data );
@@ -2679,7 +2683,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
2679
  }
2680
 
2681
  public static function generate_default_email_body() {
2682
- $email_body = '<p>' . __( 'Greetings,', 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
2683
 
2684
  $email_body .= '<p>';
2685
  $email_body .= __( 'A request has been made to update your Mailchimp account profile information.', 'yikes-inc-easy-mailchimp-extender' );
@@ -2880,7 +2884,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
2880
  $addons = get_option( 'yikes-easy-mc-active-addons', array() );
2881
 
2882
  // If we have premium add-ons...
2883
- if ( ! empty( $addons ) ) {
2884
 
2885
  // Add our premium support partial.
2886
  include_once( YIKES_MC_PATH . 'admin/partials/helpers/premium-support.php' );
541
  /* Lets only display our admin notice on YT4WP pages to not annoy the hell out of people :) */
542
  if ( in_array( get_current_screen()->base , array( 'dashboard', 'post', 'edit' ) ) || strpos( get_current_screen()->base ,'yikes-inc-easy-mailchimp') !== false ) {
543
 
544
+ // The URL of the page the user is currently on
545
  $current_uri = isset( $_SERVER['REQUEST_URI'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : false;
546
  $current_host = isset( $_SERVER['HTTP_HOST'] ) && ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : false;
547
  $current_protocol = is_ssl() === true ? 'https://' : 'http://';
559
  $nobugurl = ( ! empty( $nobugurl ) ) ? $nobugurl : '';
560
 
561
  $review_message = '<div id="yikes-mailchimp-logo"></div>';
562
+ $review_message .= sprintf(
563
+ __( 'It looks like you\'ve been using %1$s for 2 weeks now. We hope you\'re enjoying the features included with the free version. If so, please consider leaving us a review. Reviews only help to catch other users attention as well as provide us with feedback to grow and improve upon. If you\'re really enjoying the plugin, consider buying an add-on or developer license for some really awesome features and premium support.', 'yikes-inc-easy-mailchimp-extender' )
564
  . '<span class="button-container"> <a href="%2$s" target="_blank" class="button-secondary"><span class="dashicons dashicons-star-filled"></span>'
565
+ . __( "Leave A Review" , 'yikes-inc-easy-mailchimp-extender' )
566
  . '</a> <a href="%3$s" class="button-secondary"><span class="dashicons dashicons-upload"></span>'
567
+ . __( "View Addons" , 'yikes-inc-easy-mailchimp-extender' )
568
  . '</a> <a href="%4$s" class="button-secondary"><span class="dashicons dashicons-no-alt"></span>'
569
+ . __( "Dismiss" , 'yikes-inc-easy-mailchimp-extender' )
570
+ . "</a> </span>",
571
  $plugin_name, $reviewurl, $addons_url, $nobugurl );
572
  ?>
573
  <div id="review-yikes-easy-mailchimp-notice">
988
  */
989
  function generateSupportPage() {
990
 
991
+ wp_enqueue_script( 'yikes-inc-easy-mailchimp-extender-support-scripts', plugin_dir_url( __FILE__ ) . 'js/support.js', array( 'jquery' ), $this->version, false );
992
  require_once YIKES_MC_PATH . 'admin/partials/menu/support.php';
993
  }
994
 
1596
  if ( ! empty( $merge_variables['merge_fields'] ) ) {
1597
  $available_merge_variables = wp_list_pluck( $merge_variables['merge_fields'], 'tag' );
1598
  $mailchimp_merge_field_ids = wp_list_pluck( $merge_variables['merge_fields'], 'merge_id' );
1599
+
1600
  // Array will look like $merge_tag => $merge_id
1601
+ foreach( $available_merge_variables as $index => $merge_tag ) {
1602
  $merge_field_ids[$merge_tag] = $mailchimp_merge_field_ids[$index];
1603
  }
1604
  }
1613
  $merged_fields = array_merge( $available_merge_variables, $available_interest_groups );
1614
  $excluded_fields = array_diff( $assigned_fields, $merged_fields );
1615
 
1616
+ $form_fields = array_filter($form_fields, function($field){
1617
+ return isset($field['type']);
1618
+ });
1619
+
1620
  $i = 1;
1621
  foreach( $form_fields as $field ) {
1622
 
1650
  <input type="hidden" class="yikes-mc-merge-field-type" name="field[<?php echo $field['merge']; ?>][type]" value="<?php echo $field['type']; ?>" />
1651
  <input type="hidden" class="yikes-mc-merge-field-tag" name="field[<?php echo $field['merge']; ?>][merge]" value="<?php echo $field['merge']; ?>" />
1652
  <input type="hidden" class="field-<?php echo $field['merge']; ?>-position position-input" name="field[<?php echo $field['merge']; ?>][position]" value="<?php echo $i++; ?>" />
1653
+ <?php if ( isset( $merge_field_ids[ $field['merge'] ] ) && is_int( $merge_field_ids[ $field['merge'] ] ) ) { ?>
1654
+ <input type="hidden" class="yikes-mc-merge-field-id" name="field[<?php echo $field['merge']; ?>][id]" value="<?php echo $merge_field_ids[ $field['merge'] ] ?>" />
1655
  <?php } ?>
1656
 
1657
  <?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) {
2063
  <input id="<?php echo $field_id . 'no-default'; ?>"
2064
  type="<?php echo $field_type; ?>"
2065
  name="<?php echo $field_name; ?>"
2066
+ value="no-default"
2067
  <?php is_array( $field['default_choice'] ) ? checked( current( $field['default_choice'] ), 'no-default' ) : checked( $field['default_choice'], 'no-default' ); ?>>
2068
  No Default&nbsp;
2069
  </label>
2374
  foreach ( $available_interest_groups as $interest_group ) {
2375
  $not_available = isset( $fields_assigned_to_form[ $interest_group['id'] ] );
2376
  ?>
2377
+ <li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>"
2378
+ alt="<?php echo esc_attr( $interest_group['id'] ); ?>"
2379
+ data-group-id="<?php echo esc_attr( $interest_group['id'] ); ?>"
2380
+ data-attr-field-name="<?php echo esc_attr( htmlspecialchars( $interest_group['title'] ) ); ?>"
2381
+ data-attr-field-type="<?php echo esc_attr( $interest_group['type'] ); ?>"
2382
  data-attr-form-id="<?php echo esc_attr( $list_id ); ?>"
2383
  title="<?php echo $not_available ? __( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ) : ''; ?>"
2384
  <?php echo $not_available ? 'disabled="disabled"' : ''; ?>
2512
  *
2513
  * @param $post_id_to_clone | int | ID of the original form
2514
  * @param $result | mixed | ID of the new form OR false if the operation failed
2515
+ * @param $form_data | array | Array of the form data
2516
  *
2517
  */
2518
  do_action( 'yikes-mailchimp-after-duplicating-form', $post_id_to_clone, $result, $form_data );
2683
  }
2684
 
2685
  public static function generate_default_email_body() {
2686
+ $email_body = '<p>' . __( 'Greetings,', 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
2687
 
2688
  $email_body .= '<p>';
2689
  $email_body .= __( 'A request has been made to update your Mailchimp account profile information.', 'yikes-inc-easy-mailchimp-extender' );
2884
  $addons = get_option( 'yikes-easy-mc-active-addons', array() );
2885
 
2886
  // If we have premium add-ons...
2887
+ if ( ! empty( $addons ) ) {
2888
 
2889
  // Add our premium support partial.
2890
  include_once( YIKES_MC_PATH . 'admin/partials/helpers/premium-support.php' );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Mailchimp, Mailchimp forms, Mailchimp lists, opt-in forms, sign up form, M
5
  Requires at least: 4.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.2.13
8
- Stable tag: 6.8.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -172,6 +172,9 @@ For information and code examples on how to implement the hooks and filters prov
172
 
173
  == Changelog ==
174
 
 
 
 
175
  = 6.8.1 - December 30, 2020 =
176
  * Added 'yearRange' to jQuery UI Datepicker Options
177
  Thank you to @ptsteadman
@@ -210,4 +213,4 @@ Thank you to @ptsteadman
210
  * Removed support for setting the timestamp_opt variable for all subscribers. This plugin will no longer set the timestamp_opt Mailchimp merge variable.
211
  * Fixed an issue with default selected interest groups not working in our Gutenberg block.
212
  * Fixed admin input field code injection vulnerability. Thanks to Henri Salo from Nixu Corporation for finding and reporting this to us.
213
- * Fixed an error w/ error handling a failed API hit on the Manage Lists page.
5
  Requires at least: 4.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.2.13
8
+ Stable tag: 6.8.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
172
 
173
  == Changelog ==
174
 
175
+ = 6.8.2 - February 17, 2021 =
176
+ * Dropdown hotfix
177
+
178
  = 6.8.1 - December 30, 2020 =
179
  * Added 'yearRange' to jQuery UI Datepicker Options
180
  Thank you to @ptsteadman
213
  * Removed support for setting the timestamp_opt variable for all subscribers. This plugin will no longer set the timestamp_opt Mailchimp merge variable.
214
  * Fixed an issue with default selected interest groups not working in our Gutenberg block.
215
  * Fixed admin input field code injection vulnerability. Thanks to Henri Salo from Nixu Corporation for finding and reporting this to us.
216
+ * Fixed an error w/ error handling a failed API hit on the Manage Lists page.
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.8.1
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.7.0' );
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.8.2
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.8.2' );
47
  }
48
 
49
  /**