Bootstrap for Contact Form 7 - Version 1.4.2

Version Description

  • Fixed: plugin compatibility fatal errors with Contact Form 7 version 4.6 with count and CAPTCHA shortcodes
Download this release

Release Info

Developer flixos90
Plugin Icon 128x128 Bootstrap for Contact Form 7
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.4.1 to 1.4.2

bootstrap-for-contact-form-7.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Bootstrap for Contact Form 7
4
  Plugin URI: https://wordpress.org/plugins/bootstrap-for-contact-form-7/
5
  Description: This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.
6
- Version: 1.4.1
7
  Author: Felix Arntz
8
  Author URI: https://leaves-and-love.net
9
  License: GNU General Public License v3
@@ -24,7 +24,7 @@ if ( ! defined( 'WPCF7_AUTOP' ) ) {
24
  }
25
 
26
  function cf7bs_maybe_init() {
27
- define( 'CF7BS_VERSION', '1.4.1' );
28
  define( 'CF7BS_MAINFILE', __FILE__ );
29
  define( 'CF7BS_PATH', untrailingslashit( plugin_dir_path( CF7BS_MAINFILE ) ) );
30
  define( 'CF7BS_URL', untrailingslashit( plugin_dir_url( CF7BS_MAINFILE ) ) );
3
  Plugin Name: Bootstrap for Contact Form 7
4
  Plugin URI: https://wordpress.org/plugins/bootstrap-for-contact-form-7/
5
  Description: This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.
6
+ Version: 1.4.2
7
  Author: Felix Arntz
8
  Author URI: https://leaves-and-love.net
9
  License: GNU General Public License v3
24
  }
25
 
26
  function cf7bs_maybe_init() {
27
+ define( 'CF7BS_VERSION', '1.4.2' );
28
  define( 'CF7BS_MAINFILE', __FILE__ );
29
  define( 'CF7BS_PATH', untrailingslashit( plugin_dir_path( CF7BS_MAINFILE ) ) );
30
  define( 'CF7BS_URL', untrailingslashit( plugin_dir_url( CF7BS_MAINFILE ) ) );
changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 1.4.1 =
4
  * Fixed: plugin is now compatible with Contact Form 7 version 4.6 and its renamed functions / classes
5
 
1
  == Changelog ==
2
 
3
+ = 1.4.2 =
4
+ * Fixed: plugin compatibility fatal errors with Contact Form 7 version 4.6 with count and CAPTCHA shortcodes
5
+
6
  = 1.4.1 =
7
  * Fixed: plugin is now compatible with Contact Form 7 version 4.6 and its renamed functions / classes
8
 
modules/count.php CHANGED
@@ -33,7 +33,7 @@ function cf7bs_count_shortcode_handler( $tag ) {
33
  }
34
 
35
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
36
- 'name' => wpcf7_count_shortcode_handler( $tag ),
37
  'type' => 'custom',
38
  'label' => $tag_obj->content,
39
  'grid_columns' => cf7bs_get_form_property( 'grid_columns', 0, $tag_obj ),
33
  }
34
 
35
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
36
+ 'name' => function_exists( 'wpcf7_count_form_tag_handler' ) ? wpcf7_count_form_tag_handler( $tag ) : wpcf7_count_shortcode_handler( $tag ),
37
  'type' => 'custom',
38
  'label' => $tag_obj->content,
39
  'grid_columns' => cf7bs_get_form_property( 'grid_columns', 0, $tag_obj ),
modules/really-simple-captcha.php CHANGED
@@ -48,7 +48,7 @@ function cf7bs_captcha_shortcode_handler( $tag ) {
48
  $tag['options'][] = 'size:' . $image_size;
49
 
50
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
51
- 'name' => wpcf7_captcha_shortcode_handler( $tag ),
52
  'type' => 'custom',
53
  'label' => $tag_obj->content,
54
  'help_text' => $validation_error,
@@ -97,7 +97,7 @@ function cf7bs_captcha_shortcode_handler( $tag ) {
97
 
98
  $tag = cf7bs_captchar_to_captchac( $tag );
99
 
100
- $$captchac_mode = wpcf7_captcha_shortcode_handler( $tag );
101
  }
102
 
103
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
48
  $tag['options'][] = 'size:' . $image_size;
49
 
50
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
51
+ 'name' => function_exists( 'wpcf7_captcha_form_tag_handler' ) ? wpcf7_captcha_form_tag_handler( $tag ) : wpcf7_captcha_shortcode_handler( $tag ),
52
  'type' => 'custom',
53
  'label' => $tag_obj->content,
54
  'help_text' => $validation_error,
97
 
98
  $tag = cf7bs_captchar_to_captchac( $tag );
99
 
100
+ $$captchac_mode = function_exists( 'wpcf7_captcha_form_tag_handler' ) ? wpcf7_captcha_form_tag_handler( $tag ) : wpcf7_captcha_shortcode_handler( $tag );
101
  }
102
 
103
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
modules/recaptcha.php CHANGED
@@ -34,7 +34,7 @@ if ( function_exists( 'wpcf7_recaptcha_add_shortcode_recaptcha' ) ) {
34
  $tag_obj = new $classname( $tag );
35
 
36
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
37
- 'name' => wpcf7_recaptcha_shortcode_handler( $tag ),
38
  'type' => 'custom',
39
  'label' => $tag_obj->content,
40
  'grid_columns' => cf7bs_get_form_property( 'grid_columns', 0, $tag_obj ),
34
  $tag_obj = new $classname( $tag );
35
 
36
  $field = new CF7BS_Form_Field( cf7bs_apply_field_args_filter( array(
37
+ 'name' => function_exists( 'wpcf7_recaptcha_form_tag_handler' ) ? wpcf7_recaptcha_form_tag_handler( $tag ) : wpcf7_recaptcha_shortcode_handler( $tag ),
38
  'type' => 'custom',
39
  'label' => $tag_obj->content,
40
  'grid_columns' => cf7bs_get_form_property( 'grid_columns', 0, $tag_obj ),
modules/text.php CHANGED
@@ -130,10 +130,12 @@ function cf7bs_text_shortcode_handler( $tag ) {
130
 
131
  $tag = cf7bs_text_to_count( $tag, $count_down );
132
 
 
 
133
  if ( ! empty( $$count_mode ) ) {
134
- $$count_mode = wpcf7_count_shortcode_handler( $tag ) . ' ' . $$count_mode;
135
  } else {
136
- $$count_mode = wpcf7_count_shortcode_handler( $tag );
137
  }
138
  }
139
 
130
 
131
  $tag = cf7bs_text_to_count( $tag, $count_down );
132
 
133
+ $handler_func = function_exists( 'wpcf7_count_form_tag_handler' ) ? 'wpcf7_count_form_tag_handler' : 'wpcf7_count_shortcode_handler';
134
+
135
  if ( ! empty( $$count_mode ) ) {
136
+ $$count_mode = call_user_func( $handler_func, $tag ) . ' ' . $$count_mode;
137
  } else {
138
+ $$count_mode = call_user_func( $handler_func, $tag );
139
  }
140
  }
141
 
modules/textarea.php CHANGED
@@ -126,10 +126,12 @@ function cf7bs_textarea_shortcode_handler( $tag ) {
126
 
127
  $tag = cf7bs_textarea_to_count( $tag, $count_down );
128
 
 
 
129
  if ( ! empty( $$count_mode ) ) {
130
- $$count_mode = wpcf7_count_shortcode_handler( $tag ) . ' ' . $$count_mode;
131
  } else {
132
- $$count_mode = wpcf7_count_shortcode_handler( $tag );
133
  }
134
  }
135
 
126
 
127
  $tag = cf7bs_textarea_to_count( $tag, $count_down );
128
 
129
+ $handler_func = function_exists( 'wpcf7_count_form_tag_handler' ) ? 'wpcf7_count_form_tag_handler' : 'wpcf7_count_shortcode_handler';
130
+
131
  if ( ! empty( $$count_mode ) ) {
132
+ $$count_mode = call_user_func( $handler_func, $tag ) . ' ' . $$count_mode;
133
  } else {
134
+ $$count_mode = call_user_func( $handler_func, $tag );
135
  }
136
  }
137
 
readme.txt CHANGED
@@ -8,8 +8,8 @@ Contributors: flixos90
8
  Donate link: https://leaves-and-love.net/wordpress-plugins/
9
  Requires at least: 3.6
10
  Tested up to: 4.7
11
- Stable tag: 1.4.1
12
- Version: 1.4.1
13
  License: GNU General Public License v3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
  Tags: contact form 7, wpcf7, bootstrap, bootstrap 3, bootstrap framework, addon, contact form 7 addon, contact form, cf7bs
@@ -111,6 +111,9 @@ You can also contribute to the plugin by translating it. Simply visit [translate
111
 
112
  == Changelog ==
113
 
 
 
 
114
  = 1.4.1 =
115
  * Fixed: plugin is now compatible with Contact Form 7 version 4.6 and its renamed functions / classes
116
 
8
  Donate link: https://leaves-and-love.net/wordpress-plugins/
9
  Requires at least: 3.6
10
  Tested up to: 4.7
11
+ Stable tag: 1.4.2
12
+ Version: 1.4.2
13
  License: GNU General Public License v3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
  Tags: contact form 7, wpcf7, bootstrap, bootstrap 3, bootstrap framework, addon, contact form 7 addon, contact form, cf7bs
111
 
112
  == Changelog ==
113
 
114
+ = 1.4.2 =
115
+ * Fixed: plugin compatibility fatal errors with Contact Form 7 version 4.6 with count and CAPTCHA shortcodes
116
+
117
  = 1.4.1 =
118
  * Fixed: plugin is now compatible with Contact Form 7 version 4.6 and its renamed functions / classes
119