MW WP Form - Version 2.4.9

Version Description

  • Bugfix : Fixes a bug that the value of last checkbox is only posted when multiple same name checkboxes created and those post_raw is true.
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin MW WP Form
Version 2.4.9
Comparing to
See all releases

Code changes from version 2.4.8 to 2.4.9

classes/models/class.abstract-form-field.php CHANGED
@@ -213,8 +213,8 @@ abstract class MW_WP_Form_Abstract_Form_Field {
213
  }
214
 
215
  /**
216
- * get_children
217
  * 選択肢の配列を返す(:が含まれている場合は分割して前をキーに、後ろを表示名にする)
 
218
  * @param string $_children
219
  * @return array $children
220
  */
213
  }
214
 
215
  /**
 
216
  * 選択肢の配列を返す(:が含まれている場合は分割して前をキーに、後ろを表示名にする)
217
+ *
218
  * @param string $_children
219
  * @return array $children
220
  */
classes/models/class.data.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Name : MW WP Form Data
4
  * Description: MW WP Form のデータ操作用
5
- * Version : 1.3.8
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : October 10, 2013
9
- * Modified : April 15, 2015
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -220,8 +220,14 @@ class MW_WP_Form_Data {
220
  return;
221
  }
222
 
223
- if ( empty( $children ) && isset( $this->data['__children'][$key] ) ) {
224
- $children = json_decode( $this->data['__children'][$key], true );
 
 
 
 
 
 
225
  }
226
 
227
  if ( is_array( $this->data[$key] ) ) {
@@ -255,10 +261,16 @@ class MW_WP_Form_Data {
255
  }
256
 
257
  $children = array();
258
- if ( isset( $this->data['__children'][$key] ) ) {
259
- $children = json_decode( $this->data['__children'][$key], true );
 
 
 
 
 
 
260
  }
261
-
262
  if ( is_array( $this->data[$key] ) ) {
263
  if ( $children ) {
264
  return $this->get_separated_raw_value( $key, $children );
2
  /**
3
  * Name : MW WP Form Data
4
  * Description: MW WP Form のデータ操作用
5
+ * Version : 1.3.9
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : October 10, 2013
9
+ * Modified : May 6, 2015
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
220
  return;
221
  }
222
 
223
+ if ( empty( $children ) && isset( $this->data['__children'][$key] ) && is_array( $this->data['__children'][$key] ) ) {
224
+ $_children = $this->data['__children'][$key];
225
+ foreach ( $_children as $_child ) {
226
+ $_child = json_decode( $_child, true );
227
+ foreach ( $_child as $_child_key => $_child_value ) {
228
+ $children[$_child_key] = $_child_value;
229
+ }
230
+ }
231
  }
232
 
233
  if ( is_array( $this->data[$key] ) ) {
261
  }
262
 
263
  $children = array();
264
+ if ( isset( $this->data['__children'][$key] ) && is_array( $this->data['__children'][$key] ) ) {
265
+ $_children = $this->data['__children'][$key];
266
+ foreach ( $_children as $_child ) {
267
+ $_child = json_decode( $_child, true );
268
+ foreach ( $_child as $_child_key => $_child_value ) {
269
+ $children[$_child_key] = $_child_value;
270
+ }
271
+ }
272
  }
273
+
274
  if ( is_array( $this->data[$key] ) ) {
275
  if ( $children ) {
276
  return $this->get_separated_raw_value( $key, $children );
classes/models/class.form.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Name : MW WP Form Form
4
  * Description: フォームヘルパー
5
- * Version : 1.6.2
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : September 25, 2012
9
- * Modified : April 15, 2015
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -172,7 +172,7 @@ class MW_WP_Form_Form {
172
  * @return string HTML
173
  */
174
  public function children( $key, array $children ) {
175
- $name = sprintf( '__children[%s]', $key );
176
  return $this->hidden( $name, json_encode( $children ) );
177
  }
178
 
2
  /**
3
  * Name : MW WP Form Form
4
  * Description: フォームヘルパー
5
+ * Version : 1.6.3
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : September 25, 2012
9
+ * Modified : May 6, 2015
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
172
  * @return string HTML
173
  */
174
  public function children( $key, array $children ) {
175
+ $name = sprintf( '__children[%s][]', $key );
176
  return $this->hidden( $name, json_encode( $children ) );
177
  }
178
 
mw-wp-form.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form is shortcode base contact form plugin. This plugin have many feature. For example you can use many validation rules, contact data saving, and chart aggregation using saved contact data.
6
- * Version: 2.4.8
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: April 24, 2015
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPLv2
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form is shortcode base contact form plugin. This plugin have many feature. For example you can use many validation rules, contact data saving, and chart aggregation using saved contact data.
6
+ * Version: 2.4.9
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: May 6, 2015
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPLv2
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: inc2734, ryu263
3
  Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
5
  Requires at least: 3.7
6
- Tested up to: 4.2
7
- Stable tag: 2.4.8
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -71,6 +71,9 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
71
 
72
  == Changelog ==
73
 
 
 
 
74
  = 2.4.8 =
75
  * Changed : Change the value to save even null when you save the contact data.
76
  * Changed : Default value of radio and checkbox is null.
3
  Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
5
  Requires at least: 3.7
6
+ Tested up to: 4.2.1
7
+ Stable tag: 2.4.9
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
71
 
72
  == Changelog ==
73
 
74
+ = 2.4.9 =
75
+ * Bugfix : Fixes a bug that the value of last checkbox is only posted when multiple same name checkboxes created and those post_raw is true.
76
+
77
  = 2.4.8 =
78
  * Changed : Change the value to save even null when you save the contact data.
79
  * Changed : Default value of radio and checkbox is null.