Constant Contact Forms - Version 1.9.1

Version Description

  • Fixed: Removing duplicate IDs on form submit button.
  • Fixed: Preventing Bad Request request errors from rendering an admin notice.
  • Fixed: Various other admin and front-end fixes.
Download this release

Release Info

Developer constantcontact
Plugin Icon 128x128 Constant Contact Forms
Version 1.9.1
Comparing to
See all releases

Code changes from version 1.9.0 to 1.9.1

constant-contact-forms.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Constant Contact Forms for WordPress
13
  * Plugin URI: https://www.constantcontact.com
14
  * Description: Be a better marketer. All it takes is Constant Contact email marketing.
15
- * Version: 1.9.0
16
  * Author: Constant Contact
17
  * Author URI: https://www.constantcontact.com/index?pn=miwordpress
18
  * License: GPLv3
@@ -72,7 +72,7 @@ class Constant_Contact {
72
  * @since 1.0.0
73
  * @var string
74
  */
75
- const VERSION = '1.9.0';
76
 
77
  /**
78
  * URL of plugin directory.
12
  * Plugin Name: Constant Contact Forms for WordPress
13
  * Plugin URI: https://www.constantcontact.com
14
  * Description: Be a better marketer. All it takes is Constant Contact email marketing.
15
+ * Version: 1.9.1
16
  * Author: Constant Contact
17
  * Author URI: https://www.constantcontact.com/index?pn=miwordpress
18
  * License: GPLv3
72
  * @since 1.0.0
73
  * @var string
74
  */
75
+ const VERSION = '1.9.1';
76
 
77
  /**
78
  * URL of plugin directory.
includes/class-api.php CHANGED
@@ -528,7 +528,7 @@ class ConstantContact_API {
528
  $errors = $ex->getErrors();
529
  $our_errors[] = $extra . ' - ' . $errors[0]->error_key . ' - ' . $errors[0]->error_message;
530
  $this->log_errors( $our_errors );
531
- if ( 400 !== $ex->getCode() || false !== strpos( 'Bad Request', $ex->getMessage() ) ) {
532
  constant_contact_set_has_exceptions();
533
  }
534
  } catch ( Exception $ex ) {
@@ -537,7 +537,7 @@ class ConstantContact_API {
537
  $error->error_message = $ex->getMessage();
538
 
539
  add_filter( 'constant_contact_force_logging', '__return_true' );
540
- if ( 400 !== $ex->getCode() || false !== strpos( 'Bad Request', $ex->getMessage() ) ) {
541
  constant_contact_set_has_exceptions();
542
  }
543
 
528
  $errors = $ex->getErrors();
529
  $our_errors[] = $extra . ' - ' . $errors[0]->error_key . ' - ' . $errors[0]->error_message;
530
  $this->log_errors( $our_errors );
531
+ if ( 400 !== $ex->getCode() || false === strpos( $ex->getMessage(), 'Bad request' ) ) {
532
  constant_contact_set_has_exceptions();
533
  }
534
  } catch ( Exception $ex ) {
537
  $error->error_message = $ex->getMessage();
538
 
539
  add_filter( 'constant_contact_force_logging', '__return_true' );
540
+ if ( 400 !== $ex->getCode() || false === strpos( $ex->getMessage(), 'Bad request' ) ) {
541
  constant_contact_set_has_exceptions();
542
  }
543
 
includes/class-connect.php CHANGED
@@ -180,9 +180,13 @@ class ConstantContact_Connect {
180
  <p>
181
  <?php
182
  $token = constant_contact()->api->get_api_token();
183
- $account = constant_contact()->api->cc()->accountService->getAccountInfo( $token );
184
- if ( $account ) {
185
- echo esc_html( $account->first_name . ' ' . $account->last_name . ' (' . $account->email . ')' );
 
 
 
 
186
  }
187
  ?>
188
  </p>
180
  <p>
181
  <?php
182
  $token = constant_contact()->api->get_api_token();
183
+ try {
184
+ $account = constant_contact()->api->cc()->accountService->getAccountInfo( $token );
185
+ if ( $account ) {
186
+ echo esc_html( $account->first_name . ' ' . $account->last_name . ' (' . $account->email . ')' );
187
+ }
188
+ } catch ( CtctException $ex ) {
189
+ esc_html_e( 'There was an issue with retrieving connected account information. Please try again.', 'constant-contact-forms' );
190
  }
191
  ?>
192
  </p>
includes/class-display.php CHANGED
@@ -990,9 +990,10 @@ class ConstantContact_Display {
990
  * @return string HTML markup for field.
991
  */
992
  public function input( $type = 'text', $name = '', $id = '', $value = '', $label = '', $req = false, $f_only = false, $field_error = false, $form_id = 0, $label_placement = '', $instance = 0 ) {
 
993
  $name = sanitize_text_field( $name );
994
  $field_key = sanitize_title( $id );
995
- $field_id = "{$field_key}_{$instance}";
996
  $input_inline_styles = '';
997
  $label_placement_class = 'ctct-label-' . $label_placement;
998
  $specific_form_styles = $this->specific_form_styles;
990
  * @return string HTML markup for field.
991
  */
992
  public function input( $type = 'text', $name = '', $id = '', $value = '', $label = '', $req = false, $f_only = false, $field_error = false, $form_id = 0, $label_placement = '', $instance = 0 ) {
993
+ $id_salt = wp_rand();
994
  $name = sanitize_text_field( $name );
995
  $field_key = sanitize_title( $id );
996
+ $field_id = "{$field_key}_{$instance}_{$id_salt}";
997
  $input_inline_styles = '';
998
  $label_placement_class = 'ctct-label-' . $label_placement;
999
  $specific_form_styles = $this->specific_form_styles;
includes/class-notification-content.php CHANGED
@@ -180,7 +180,7 @@ class ConstantContact_Notification_Content {
180
  return sprintf(
181
  /* Translators: placeholders will be html `<a>` links. */
182
  esc_html__( 'Constant Contact Forms has experienced issues that may need addressed and functionality may be missing. Please enable the "Support" checkbox under the Support tab in %1$sConstant Contact settings%2$s and start a %3$sforum support thread%4$s. Our support team will aid with further steps.', 'constant-contact-forms' ),
183
- sprintf( '<a href="%s">', esc_url( admin_url( 'edit.php?post_type=ctct_forms&page=ctct_options_settings' ) ) ),
184
  '</a>',
185
  sprintf( '<a href="%s" target="_blank">', esc_url( 'https://wordpress.org/support/topic/constant-contact-forms-has-experienced-issues-that-need-addressed-admin-notice/' ) ),
186
  '</a>'
180
  return sprintf(
181
  /* Translators: placeholders will be html `<a>` links. */
182
  esc_html__( 'Constant Contact Forms has experienced issues that may need addressed and functionality may be missing. Please enable the "Support" checkbox under the Support tab in %1$sConstant Contact settings%2$s and start a %3$sforum support thread%4$s. Our support team will aid with further steps.', 'constant-contact-forms' ),
183
+ sprintf( '<a href="%s">', esc_url( admin_url( 'edit.php?post_type=ctct_forms&page=ctct_options_settings_support' ) ) ),
184
  '</a>',
185
  sprintf( '<a href="%s" target="_blank">', esc_url( 'https://wordpress.org/support/topic/constant-contact-forms-has-experienced-issues-that-need-addressed-admin-notice/' ) ),
186
  '</a>'
includes/compatibility.php CHANGED
@@ -87,6 +87,11 @@ function constant_contact_wpspamshield_compatibility( $ignored_keys = [], $form_
87
  // and then return all the unique values for our return value.
88
  $new_ignore_keys = array_unique( array_merge( $ignored_keys, $bad_keys ) );
89
 
 
 
 
 
 
90
  return $new_ignore_keys;
91
  }
92
  add_filter( 'constant_contact_ignored_post_form_values', 'constant_contact_wpspamshield_compatibility', 10, 2 );
87
  // and then return all the unique values for our return value.
88
  $new_ignore_keys = array_unique( array_merge( $ignored_keys, $bad_keys ) );
89
 
90
+ // Filter $new_ignore_keys array for items without `lists___`.
91
+ $new_ignore_keys = array_filter( $new_ignore_keys, function ( $item ) {
92
+ return false === strpos( $item, 'lists___' );
93
+ } );
94
+
95
  return $new_ignore_keys;
96
  }
97
  add_filter( 'constant_contact_ignored_post_form_values', 'constant_contact_wpspamshield_compatibility', 10, 2 );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: constantcontact, webdevstudios, tw2113, znowebdev, ggwicz, ra
3
  Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
4
  Requires at least: 5.2.0
5
  Tested up to: 5.5.1
6
- Stable tag: 1.9.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
  Requires PHP: 5.6
@@ -35,6 +35,11 @@ BONUS: If you have a Constant Contact account, all new email addresses that you
35
 
36
  == Changelog ==
37
 
 
 
 
 
 
38
  = 1.9.0 =
39
  * Added: Ability for site owners to multiple lists for users to choose which to sign up for.
40
  * Fixed: Issues around enabling list signup on user registration.
3
  Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
4
  Requires at least: 5.2.0
5
  Tested up to: 5.5.1
6
+ Stable tag: 1.9.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
  Requires PHP: 5.6
35
 
36
  == Changelog ==
37
 
38
+ = 1.9.1 =
39
+ * Fixed: Removing duplicate IDs on form submit button.
40
+ * Fixed: Preventing `Bad Request` request errors from rendering an admin notice.
41
+ * Fixed: Various other admin and front-end fixes.
42
+
43
  = 1.9.0 =
44
  * Added: Ability for site owners to multiple lists for users to choose which to sign up for.
45
  * Fixed: Issues around enabling list signup on user registration.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInita82e6231acfd166d9b5a465ded099432::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb96901d3471276ce8fb7d93b66af66b6::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInita82e6231acfd166d9b5a465ded099432
6
  {
7
  private static $loader;
8
 
@@ -13,21 +13,24 @@ class ComposerAutoloaderInita82e6231acfd166d9b5a465ded099432
13
  }
14
  }
15
 
 
 
 
16
  public static function getLoader()
17
  {
18
  if (null !== self::$loader) {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInita82e6231acfd166d9b5a465ded099432', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInita82e6231acfd166d9b5a465ded099432', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInita82e6231acfd166d9b5a465ded099432::getInitializer($loader));
31
  } else {
32
  $classMap = require __DIR__ . '/autoload_classmap.php';
33
  if ($classMap) {
@@ -39,19 +42,19 @@ class ComposerAutoloaderInita82e6231acfd166d9b5a465ded099432
39
  $loader->register(true);
40
 
41
  if ($useStaticLoader) {
42
- $includeFiles = Composer\Autoload\ComposerStaticInita82e6231acfd166d9b5a465ded099432::$files;
43
  } else {
44
  $includeFiles = require __DIR__ . '/autoload_files.php';
45
  }
46
  foreach ($includeFiles as $fileIdentifier => $file) {
47
- composerRequirea82e6231acfd166d9b5a465ded099432($fileIdentifier, $file);
48
  }
49
 
50
  return $loader;
51
  }
52
  }
53
 
54
- function composerRequirea82e6231acfd166d9b5a465ded099432($fileIdentifier, $file)
55
  {
56
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
57
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitb96901d3471276ce8fb7d93b66af66b6
6
  {
7
  private static $loader;
8
 
13
  }
14
  }
15
 
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
  public static function getLoader()
20
  {
21
  if (null !== self::$loader) {
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitb96901d3471276ce8fb7d93b66af66b6', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitb96901d3471276ce8fb7d93b66af66b6', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitb96901d3471276ce8fb7d93b66af66b6::getInitializer($loader));
34
  } else {
35
  $classMap = require __DIR__ . '/autoload_classmap.php';
36
  if ($classMap) {
42
  $loader->register(true);
43
 
44
  if ($useStaticLoader) {
45
+ $includeFiles = Composer\Autoload\ComposerStaticInitb96901d3471276ce8fb7d93b66af66b6::$files;
46
  } else {
47
  $includeFiles = require __DIR__ . '/autoload_files.php';
48
  }
49
  foreach ($includeFiles as $fileIdentifier => $file) {
50
+ composerRequireb96901d3471276ce8fb7d93b66af66b6($fileIdentifier, $file);
51
  }
52
 
53
  return $loader;
54
  }
55
  }
56
 
57
+ function composerRequireb96901d3471276ce8fb7d93b66af66b6($fileIdentifier, $file)
58
  {
59
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
60
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInita82e6231acfd166d9b5a465ded099432
8
  {
9
  public static $files = array (
10
  'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@@ -390,10 +390,10 @@ class ComposerStaticInita82e6231acfd166d9b5a465ded099432
390
  public static function getInitializer(ClassLoader $loader)
391
  {
392
  return \Closure::bind(function () use ($loader) {
393
- $loader->prefixLengthsPsr4 = ComposerStaticInita82e6231acfd166d9b5a465ded099432::$prefixLengthsPsr4;
394
- $loader->prefixDirsPsr4 = ComposerStaticInita82e6231acfd166d9b5a465ded099432::$prefixDirsPsr4;
395
- $loader->prefixesPsr0 = ComposerStaticInita82e6231acfd166d9b5a465ded099432::$prefixesPsr0;
396
- $loader->classMap = ComposerStaticInita82e6231acfd166d9b5a465ded099432::$classMap;
397
 
398
  }, null, ClassLoader::class);
399
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitb96901d3471276ce8fb7d93b66af66b6
8
  {
9
  public static $files = array (
10
  'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
390
  public static function getInitializer(ClassLoader $loader)
391
  {
392
  return \Closure::bind(function () use ($loader) {
393
+ $loader->prefixLengthsPsr4 = ComposerStaticInitb96901d3471276ce8fb7d93b66af66b6::$prefixLengthsPsr4;
394
+ $loader->prefixDirsPsr4 = ComposerStaticInitb96901d3471276ce8fb7d93b66af66b6::$prefixDirsPsr4;
395
+ $loader->prefixesPsr0 = ComposerStaticInitb96901d3471276ce8fb7d93b66af66b6::$prefixesPsr0;
396
+ $loader->classMap = ComposerStaticInitb96901d3471276ce8fb7d93b66af66b6::$classMap;
397
 
398
  }, null, ClassLoader::class);
399
  }
vendor/constantcontact/constantcontact/.gitignore ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Created by .gitignore support plugin (hsz.mobi)
2
+
3
+ ## Directory-based project format
4
+ .idea/
5
+ /*.iml
6
+
7
+ ## File-based project format
8
+ *.ipr
9
+ *.iws
10
+
11
+ ## Additional for IntelliJ
12
+ out/
13
+
14
+ # generated by mpeltonen/sbt-idea plugin
15
+ .idea_modules/
16
+
17
+ # generated by JIRA plugin
18
+ atlassian-ide-plugin.xml
19
+
20
+ ### Composer template
21
+ composer.lock
22
+ composer.phar
23
+ vendor/
24
+
25
+ devFile.php
vendor/defuse/php-encryption/.gitignore ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ *~
2
+ /test/unit/File/big-generated-file
3
+ /composer.lock
4
+ /vendor
5
+ defuse-crypto.phar
6
+ defuse-crypto.phar.sig
7
+ composer.phar
8
+ box.phar
9
+ phpunit.phar
10
+ phpunit.phar.asc
11
+ test/unit/File/tmp
vendor/google/recaptcha/.gitignore ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /.php_cs.cache
2
+ /.phpunit.result.cache
3
+ /build
4
+ /composer.lock
5
+ /examples/config.php
6
+ /nbproject/private/
7
+ /vendor/
vendor/guzzlehttp/ringphp/.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ vendor
2
+ build/artifacts/
3
+ composer.lock
4
+ docs/_build/
vendor/guzzlehttp/streams/.gitignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ .idea
2
+ .DS_STORE
3
+ coverage
4
+ phpunit.xml
5
+ composer.lock
6
+ vendor/
vendor/psr/log/.gitignore ADDED
@@ -0,0 +1 @@
 
1
+ vendor
vendor/react/promise/.gitignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ composer.lock
2
+ composer.phar
3
+ phpunit.xml
4
+ build/
5
+ vendor/