Easy Forms for MailChimp - Version 6.3.13

Version Description

Download this release

Release Info

Developer yikesitskevin
Plugin Icon 128x128 Easy Forms for MailChimp
Version 6.3.13
Comparing to
See all releases

Code changes from version 6.3.12 to 6.3.13

admin/class-yikes-inc-easy-mailchimp-extender-admin.php CHANGED
@@ -298,7 +298,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
298
  public function yikes_easy_forms_admin_disclaimer( $footer_text ) {
299
  $page = get_current_screen();
300
  $base = $page->base;
301
- if ( strpos( $base, 'yikes-' ) !== false ) {
302
  $disclaimer_text = sprintf( '<em>' . __( 'Disclaimer: <strong>Easy Forms for MailChimp</strong> is in no way endorsed, affiliated or backed by MailChimp, or its parent company Rocket Science Group.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" data-rated="' . __( 'Thanks :)', 'yikes-inc-easy-mailchimp-extender' ) . '">', '</a></em>' );
303
  return $disclaimer_text;
304
  } else {
298
  public function yikes_easy_forms_admin_disclaimer( $footer_text ) {
299
  $page = get_current_screen();
300
  $base = $page->base;
301
+ if ( strpos( $base, 'yikes-inc-easy-mailchimp' ) !== false || strpos( $base, 'yikes-mailchimp' ) !== false ) {
302
  $disclaimer_text = sprintf( '<em>' . __( 'Disclaimer: <strong>Easy Forms for MailChimp</strong> is in no way endorsed, affiliated or backed by MailChimp, or its parent company Rocket Science Group.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" data-rated="' . __( 'Thanks :)', 'yikes-inc-easy-mailchimp-extender' ) . '">', '</a></em>' );
303
  return $disclaimer_text;
304
  } else {
public/classes/checkbox-integrations/class.comment_form-checkbox.php CHANGED
@@ -16,10 +16,28 @@
16
  public function __construct() {
17
  // hooks for outputting the checkbox
18
  add_action( 'thesis_hook_after_comment_box', array( $this, 'output_checkbox' ), 10 );
19
- add_action( 'comment_form_field_comment', array( $this, 'output_checkbox' ), 10 );
20
  // hooks for checking if we should subscribe the commenter
21
  add_action( 'comment_post', array( $this, 'subscribe_from_comment' ), 40, 2 );
22
- // setup the type
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
 
25
 
16
  public function __construct() {
17
  // hooks for outputting the checkbox
18
  add_action( 'thesis_hook_after_comment_box', array( $this, 'output_checkbox' ), 10 );
19
+
20
  // hooks for checking if we should subscribe the commenter
21
  add_action( 'comment_post', array( $this, 'subscribe_from_comment' ), 40, 2 );
22
+
23
+ add_action( 'init', array( $this, 'init_filters' ) );
24
+ }
25
+
26
+ /**
27
+ * Allows us to apply_filters for the filters we're adding
28
+ */
29
+ public function init_filters() {
30
+
31
+ /**
32
+ * yikes-mailchimp-wp-comment-integration-placement
33
+ *
34
+ * Decide the placement of the subscription checkbox. Default is after the "Comment" box.
35
+ *
36
+ * @return string | The name of a WP comment field's filter
37
+ */
38
+ $checkbox_placement = apply_filters( 'yikes-mailchimp-wp-comment-integration-placement', 'comment_form_field_comment' );
39
+
40
+ add_action( $checkbox_placement, array( $this, 'output_checkbox' ), 10 );
41
  }
42
 
43
 
public/classes/process/class.process_form_submission_handler.php CHANGED
@@ -969,8 +969,24 @@ class Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_Handler {
969
  * @param string | $nonce_name | The name of the nonce
970
  */
971
  public function handle_nonce( $nonce_value, $nonce_name ) {
972
- if ( wp_verify_nonce( $nonce_value, $nonce_name ) === false ) {
973
- return $this->yikes_fail( $hide = 0, $error = 1, $this->handle_nonce_message );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
974
  }
975
  }
976
 
969
  * @param string | $nonce_name | The name of the nonce
970
  */
971
  public function handle_nonce( $nonce_value, $nonce_name ) {
972
+
973
+ /**
974
+ * yikes-mailchimp-use-nonce-verification
975
+ *
976
+ * Decide if we're going to check the nonce value.
977
+ * The reason we filter this is that some users are experiencing nonce issues repeatedly.
978
+ * The default will always be to use the nonce.
979
+ *
980
+ * @param int | $form_id | The form id
981
+ *
982
+ * @return bool | True if we should check the nonce
983
+ */
984
+ $use_nonce = apply_filters( 'yikes-mailchimp-use-nonce-verification', true, $this->form_id );
985
+
986
+ if ( $use_nonce === true ) {
987
+ if ( wp_verify_nonce( $nonce_value, $nonce_name ) === false ) {
988
+ return $this->yikes_fail( $hide = 0, $error = 1, $this->handle_nonce_message );
989
+ }
990
  }
991
  }
992
 
public/partials/shortcodes/process/process_form_submission.php CHANGED
@@ -13,12 +13,6 @@ $submission_handler = new Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_H
13
  // Capture our form data
14
  $data = $_POST;
15
 
16
- // Check our nonce
17
- if ( $submission_handler->handle_nonce( $_POST['yikes_easy_mc_new_subscriber'], 'yikes_easy_mc_form_submit' ) === false ) {
18
- $process_submission_response = $submission_handler->wrap_form_submission_response( $submission_handler->handle_nonce_message, $is_success = false );
19
- return;
20
- }
21
-
22
  // Confirm we have a form id to work with
23
  $form_id = ( isset( $data['yikes-mailchimp-submitted-form'] ) ) ? absint( $data['yikes-mailchimp-submitted-form'] ) : false;
24
 
@@ -33,6 +27,12 @@ if ( $submission_handler->handle_empty_form_id( $form_id ) === false ) {
33
  return;
34
  }
35
 
 
 
 
 
 
 
36
  // Get the form data
37
  $interface = yikes_easy_mailchimp_extender_get_form_interface();
38
  $form_data = $interface->get_form( $form_id );
13
  // Capture our form data
14
  $data = $_POST;
15
 
 
 
 
 
 
 
16
  // Confirm we have a form id to work with
17
  $form_id = ( isset( $data['yikes-mailchimp-submitted-form'] ) ) ? absint( $data['yikes-mailchimp-submitted-form'] ) : false;
18
 
27
  return;
28
  }
29
 
30
+ // Check our nonce
31
+ if ( $submission_handler->handle_nonce( $_POST['yikes_easy_mc_new_subscriber'], 'yikes_easy_mc_form_submit' ) === false ) {
32
+ $process_submission_response = $submission_handler->wrap_form_submission_response( $submission_handler->handle_nonce_message, $is_success = false );
33
+ return;
34
+ }
35
+
36
  // Get the form data
37
  $interface = yikes_easy_mailchimp_extender_get_form_interface();
38
  $form_data = $interface->get_form( $form_id );
public/partials/shortcodes/process/process_form_submission_ajax.php CHANGED
@@ -10,9 +10,6 @@ $submission_handler = new Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_H
10
  // parse our form data
11
  parse_str( $_POST['form_data'], $data );
12
 
13
- // Check our nonce
14
- $submission_handler->handle_nonce( $_POST['ajax_security_nonce'], 'yikes_mc_form_submission_security_nonce' );
15
-
16
  // Get the form_id
17
  $form_id = absint( $_POST['form_id'] );
18
 
@@ -22,6 +19,9 @@ $submission_handler->handle_empty_form_id( $form_id );
22
  // Set the form id in our class
23
  $submission_handler->set_form_id( $form_id );
24
 
 
 
 
25
  // Get the form data
26
  $interface = yikes_easy_mailchimp_extender_get_form_interface();
27
  $form_data = $interface->get_form( $form_id );
10
  // parse our form data
11
  parse_str( $_POST['form_data'], $data );
12
 
 
 
 
13
  // Get the form_id
14
  $form_id = absint( $_POST['form_id'] );
15
 
19
  // Set the form id in our class
20
  $submission_handler->set_form_id( $form_id );
21
 
22
+ // Check our nonce
23
+ $submission_handler->handle_nonce( $_POST['ajax_security_nonce'], 'yikes_mc_form_submission_security_nonce' );
24
+
25
  // Get the form data
26
  $interface = yikes_easy_mailchimp_extender_get_form_interface();
27
  $form_data = $interface->get_form( $form_id );
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.7.3
7
- Stable tag: 6.3.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -229,6 +229,9 @@ Below you'll find a complete list of the hooks and filters available in Easy For
229
  * Version 6.3.10:
230
  * `yikes-mailchimp-countries-with-zip` - Control which countries the zip field displays for. If the chosen country is not in this array, the zip field will fade out. @params: $countries_with_zip, $form_id
231
  * `yikes-mailchimp-state-province-list` - Add or remove options from the states dropdown list. Default: All U.S. States and Canadian Provinces - @params: $state_and_province_list, $form_id
 
 
 
232
 
233
  **Actions**
234
 
@@ -250,6 +253,11 @@ Below you'll find a complete list of the hooks and filters available in Easy For
250
 
251
  == Changelog ==
252
 
 
 
 
 
 
253
  = Easy Forms for MailChimp 6.3.12 - April 6th, 2017 =
254
  * Security vulnerability patched - Discovered with DefenseCode ThunderScan Source Code Security Analyzer by Neven Biruski
255
 
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.7.3
7
+ Stable tag: 6.3.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
229
  * Version 6.3.10:
230
  * `yikes-mailchimp-countries-with-zip` - Control which countries the zip field displays for. If the chosen country is not in this array, the zip field will fade out. @params: $countries_with_zip, $form_id
231
  * `yikes-mailchimp-state-province-list` - Add or remove options from the states dropdown list. Default: All U.S. States and Canadian Provinces - @params: $state_and_province_list, $form_id
232
+ * Version 6.3.13:
233
+ * `yikes-mailchimp-use-nonce-verification` - Control whether we verify the nonce on form submissions. Default: `true` (by default, we check the nonce). @params: $use_nonce, $form_id
234
+ * `yikes-mailchimp-wp-comment-integration-placement` - Control the placement of the subscription checkbox for the WP Comment Form integration. Default: `comment_form_field_comment` (after the comment textarea box) - @params: $comment_form_field. This filter allows you to choose which WP Comment Form filter to use, and for the full list of WP Comment Form filters, check the documentation: https://codex.wordpress.org/Function_Reference/comment_form.
235
 
236
  **Actions**
237
 
253
 
254
  == Changelog ==
255
 
256
+ = Easy Forms for MailChimp 6.3.13 - April 17th, 2017 =
257
+ * Two new filters: `yikes-mailchimp-wp-comment-integration-placement` and `yikes-mailchimp-use-nonce-verification`.
258
+ * `yikes-mailchimp-use-nonce-verification` - Control whether we verify the nonce on form submissions. Default: `true` (by default, we check the nonce). @params: $use_nonce, $form_id
259
+ * `yikes-mailchimp-wp-comment-integration-placement` - Control the placement of the subscription checkbox for the WP Comment Form integration. Default: `comment_form_field_comment` (after the comment textarea box) - @params: $comment_form_field. This filter allows you to choose which WP Comment Form filter to use, and for the full list of WP Comment Form filters, check the documentation: https://codex.wordpress.org/Function_Reference/comment_form.
260
+
261
  = Easy Forms for MailChimp 6.3.12 - April 6th, 2017 =
262
  * Security vulnerability patched - Discovered with DefenseCode ThunderScan Source Code Security Analyzer by Neven Biruski
263
 
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.3.12
7
  * Author: YIKES, Inc.
8
  * Author URI: https://www.yikesplugins.com/
9
  * License: GPL-3.0+
@@ -42,7 +42,7 @@ if ( ! defined( 'WPINC' ) ) {
42
  * @since 6.1.3
43
  */
44
  if ( ! defined( 'YIKES_MC_VERSION' ) ) {
45
- define( 'YIKES_MC_VERSION' , '6.3.12' );
46
  }
47
 
48
  /**
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.3.13
7
  * Author: YIKES, Inc.
8
  * Author URI: https://www.yikesplugins.com/
9
  * License: GPL-3.0+
42
  * @since 6.1.3
43
  */
44
  if ( ! defined( 'YIKES_MC_VERSION' ) ) {
45
+ define( 'YIKES_MC_VERSION' , '6.3.13' );
46
  }
47
 
48
  /**