Conditional Fields for Contact Form 7 - Version 1.8

Version Description

(02-03-20) = * WPML compatibility: Force conditions to be an array. (https://wordpress.org/support/topic/wpml-conditional-fields-not-working-on-translations/#post-12390827)

Download this release

Release Info

Developer Jules Colle
Plugin Icon 128x128 Conditional Fields for Contact Form 7
Version 1.8
Comparing to
See all releases

Code changes from version 1.7.9 to 1.8

Files changed (4) hide show
  1. cf7cf.php +3 -1
  2. contact-form-7-conditional-fields.php +1 -1
  3. init.php +1 -1
  4. readme.txt +4 -1
cf7cf.php CHANGED
@@ -343,7 +343,9 @@ class CF7CF {
343
  * @return void
344
  */
345
  public static function getConditions($form_id) {
346
- return get_post_meta($form_id,'wpcf7cf_options',true); // the meta key 'wpcf7cf_options' is a bit misleading at this point, because it only holds the form's conditions, no other options/settings
 
 
347
  }
348
 
349
 
343
  * @return void
344
  */
345
  public static function getConditions($form_id) {
346
+ // make sure conditions are an array.
347
+ $options = get_post_meta($form_id,'wpcf7cf_options',true);
348
+ return is_array($options) ? $options : array(); // the meta key 'wpcf7cf_options' is a bit misleading at this point, because it only holds the form's conditions, no other options/settings
349
  }
350
 
351
 
contact-form-7-conditional-fields.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7 Conditional Fields
4
  Plugin URI: http://bdwm.be/
5
  Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  Author: Jules Colle
7
- Version: 1.7.9
8
  Author URI: http://bdwm.be/
9
  */
10
 
4
  Plugin URI: http://bdwm.be/
5
  Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  Author: Jules Colle
7
+ Version: 1.8
8
  Author URI: http://bdwm.be/
9
  */
10
 
init.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.7.9' );
4
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
5
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
6
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
1
  <?php
2
 
3
+ if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.8' );
4
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
5
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
6
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
readme.txt CHANGED
@@ -6,7 +6,7 @@ Website: http://bdwm.be
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
- Stable tag: 1.7.9
10
  Requires PHP: 5.6
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -102,6 +102,9 @@ The conditional fields javascript code is loaded during wp_footer, so a call to
102
 
103
  == Changelog ==
104
 
 
 
 
105
  = 1.7.9 (01-22-20) =
106
  * PRO (01-02-20) Added quick fix for problem with [_format_date "d m Y"] inside repeater. (see: https://github.com/pwkip/contact-form-7-conditional-fields/issues/38)
107
  * (01-22-20) Fixed Ajax by adding global wpcf7cf variable to window.
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
+ Stable tag: 1.8
10
  Requires PHP: 5.6
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
102
 
103
  == Changelog ==
104
 
105
+ = 1.8 (02-03-20) =
106
+ * WPML compatibility: Force conditions to be an array. (https://wordpress.org/support/topic/wpml-conditional-fields-not-working-on-translations/#post-12390827)
107
+
108
  = 1.7.9 (01-22-20) =
109
  * PRO (01-02-20) Added quick fix for problem with [_format_date "d m Y"] inside repeater. (see: https://github.com/pwkip/contact-form-7-conditional-fields/issues/38)
110
  * (01-22-20) Fixed Ajax by adding global wpcf7cf variable to window.