MW WP Form - Version 2.8.1

Version Description

  • Added : Added MinImageSize validation.
  • Added : Added MaxImageSize validation.
  • Bugfix : Fixed a set_upload_file_keys bug and rename to regenerate_upload_file_keys.
Download this release

Release Info

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

Code changes from version 2.8.0 to 2.8.1

classes/controllers/class.main.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Name : MW WP Form Main Controller
4
  * Description: フロントエンドにおいて、適切な画面にリダイレクトさせる
5
- * Version : 1.3.0
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : December 23, 2014
9
- * Modified : April 3, 2016
10
  * License : GPLv2 or later
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -349,11 +349,13 @@ class MW_WP_Form_Main_Controller {
349
  foreach ( $upload_files as $key => $file ) {
350
  if ( $this->Validation->single_check( $key ) ) {
351
  $files[$key] = $file;
 
 
352
  }
353
  }
354
  $uploaded_files = $File->upload( $files );
355
- $this->Data->set_upload_file_keys();
356
  $this->Data->push_uploaded_file_keys( $uploaded_files );
 
357
  }
358
 
359
  /**
2
  /**
3
  * Name : MW WP Form Main Controller
4
  * Description: フロントエンドにおいて、適切な画面にリダイレクトさせる
5
+ * Version : 1.3.1
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : December 23, 2014
9
+ * Modified : April 4, 2016
10
  * License : GPLv2 or later
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
349
  foreach ( $upload_files as $key => $file ) {
350
  if ( $this->Validation->single_check( $key ) ) {
351
  $files[$key] = $file;
352
+ } elseif ( isset( $files[$key] ) ) {
353
+ unset( $files[$key] );
354
  }
355
  }
356
  $uploaded_files = $File->upload( $files );
 
357
  $this->Data->push_uploaded_file_keys( $uploaded_files );
358
+ $this->Data->regenerate_upload_file_keys();
359
  }
360
 
361
  /**
classes/form-fields/class.file.php CHANGED
@@ -56,6 +56,7 @@ class MW_WP_Form_Field_File extends MW_WP_Form_Abstract_Form_Field {
56
  'class' => $this->atts['class'],
57
  ) );
58
  $value = $this->Data->get_raw( $this->atts['name'] );
 
59
  $upload_file_keys = $this->Data->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
60
  if ( !empty( $value ) && is_array( $upload_file_keys ) && in_array( $this->atts['name'], $upload_file_keys ) ) {
61
  $filepath = MWF_Functions::fileurl_to_path( $value );
56
  'class' => $this->atts['class'],
57
  ) );
58
  $value = $this->Data->get_raw( $this->atts['name'] );
59
+
60
  $upload_file_keys = $this->Data->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
61
  if ( !empty( $value ) && is_array( $upload_file_keys ) && in_array( $this->atts['name'], $upload_file_keys ) ) {
62
  $filepath = MWF_Functions::fileurl_to_path( $value );
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.5.0
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : October 10, 2013
9
- * Modified : April 1, 2016
10
  * License : GPLv2 or later
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -472,17 +472,21 @@ class MW_WP_Form_Data {
472
  /**
473
  * アップロードに失敗、もしくはファイルが削除されている key を UPLOAD_FILE_KEYS から削除
474
  */
475
- public function set_upload_file_keys() {
476
  $upload_file_keys = $this->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
 
 
 
 
477
  $upload_file_keys = apply_filters(
478
  'mwform_upload_file_keys_' . $this->form_key,
479
  $upload_file_keys,
480
  clone $this
481
  );
482
- $upload_file_keys = array_values( array_unique( $upload_file_keys ) );
483
- if ( !$upload_file_keys ) {
484
  $upload_file_keys = array();
485
  }
 
486
 
487
  $wp_upload_dir = wp_upload_dir();
488
  foreach ( $upload_file_keys as $key => $upload_file_key ) {
@@ -504,6 +508,9 @@ class MW_WP_Form_Data {
504
  */
505
  public function push_uploaded_file_keys( array $uploaded_files = array() ) {
506
  $upload_file_keys = $this->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
 
 
 
507
  foreach ( $uploaded_files as $key => $upload_file ) {
508
  $this->set( $key, $upload_file );
509
  if ( is_array( $upload_file_keys ) && !in_array( $key, $upload_file_keys ) ) {
2
  /**
3
  * Name : MW WP Form Data
4
  * Description: MW WP Form のデータ操作用
5
+ * Version : 1.5.1
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : October 10, 2013
9
+ * Modified : April 4, 2016
10
  * License : GPLv2 or later
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
472
  /**
473
  * アップロードに失敗、もしくはファイルが削除されている key を UPLOAD_FILE_KEYS から削除
474
  */
475
+ public function regenerate_upload_file_keys() {
476
  $upload_file_keys = $this->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
477
+ if ( !is_array( $upload_file_keys ) ) {
478
+ $upload_file_keys = array();
479
+ }
480
+
481
  $upload_file_keys = apply_filters(
482
  'mwform_upload_file_keys_' . $this->form_key,
483
  $upload_file_keys,
484
  clone $this
485
  );
486
+ if ( !is_array( $upload_file_keys ) ) {
 
487
  $upload_file_keys = array();
488
  }
489
+ $upload_file_keys = array_values( array_unique( $upload_file_keys ) );
490
 
491
  $wp_upload_dir = wp_upload_dir();
492
  foreach ( $upload_file_keys as $key => $upload_file_key ) {
508
  */
509
  public function push_uploaded_file_keys( array $uploaded_files = array() ) {
510
  $upload_file_keys = $this->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
511
+ if ( !is_array( $upload_file_keys ) ) {
512
+ $upload_file_keys = array();
513
+ }
514
  foreach ( $uploaded_files as $key => $upload_file ) {
515
  $this->set( $key, $upload_file );
516
  if ( is_array( $upload_file_keys ) && !in_array( $key, $upload_file_keys ) ) {
classes/models/class.validation.php CHANGED
@@ -81,7 +81,7 @@ class MW_WP_Form_Validation {
81
  */
82
  public function set_rules( MW_WP_Form_Setting $Setting ) {
83
  $Data = MW_WP_Form_Data::getInstance();
84
-
85
  $rules = array();
86
  $validations = $Setting->get('validation' );
87
  if ( $validations ) {
81
  */
82
  public function set_rules( MW_WP_Form_Setting $Setting ) {
83
  $Data = MW_WP_Form_Data::getInstance();
84
+
85
  $rules = array();
86
  $validations = $Setting->get('validation' );
87
  if ( $validations ) {
classes/validation-rules/class.maximagesize.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Name : MW WP Form Validation Rule MaxImageSize
4
+ * Description: 画像サイズが指定したサイズ以内
5
+ * Version : 1.0.0
6
+ * Author : Takashi Kitajima
7
+ * Author URI : http://2inc.org
8
+ * Created : April 4, 2016
9
+ * Modified :
10
+ * License : GPLv2 or later
11
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
+ */
13
+ class MW_WP_Form_Validation_Rule_MaxImageSize extends MW_WP_Form_Abstract_Validation_Rule {
14
+
15
+ /**
16
+ * バリデーションルール名を指定
17
+ * @var string
18
+ */
19
+ protected $name = 'maxfilesize';
20
+
21
+ /**
22
+ * バリデーションチェック
23
+ *
24
+ * @param string $key name属性
25
+ * @param array $option
26
+ * @return string エラーメッセージ
27
+ */
28
+ public function rule( $key, array $options = array() ) {
29
+ $value = $this->Data->get( $key );
30
+ if ( !$value ) {
31
+ return;
32
+ }
33
+
34
+ if ( !MWF_Functions::is_numeric( $options['width'] ) || !MWF_Functions::is_numeric( $options['width'] ) ) {
35
+ return;
36
+ }
37
+
38
+ /**
39
+ * 送信ボタンを押して次のページが表示されるまでの間、
40
+ * 1.そのページに post されてチェック
41
+ * 2.リダイレクト先でチェック
42
+ * の2度チェックされる。画像サイズのチェックは画像が存在しないとできないが、1.でエラーだった場合
43
+ * ファイルがアップロードされないので 2.でスルーされ画面表示時にはエラーも出ない。
44
+ */
45
+ $upload_file_keys = $this->Data->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
46
+ $upload_files = $this->Data->get_post_value_by_key( MWF_Config::UPLOAD_FILES );
47
+ $is_error = false;
48
+
49
+ if ( !is_array( $upload_file_keys ) ) {
50
+ $upload_file_keys = array();
51
+ }
52
+
53
+ if ( !is_array( $upload_files ) ) {
54
+ $upload_files = array();
55
+ }
56
+
57
+ // アップロード直後のチェック
58
+ if ( !in_array( $key, $upload_file_keys ) && array_key_exists( $key, $upload_files ) ) {
59
+ $file_path = $upload_files[$key]['tmp_name'];
60
+ }
61
+ // アップロード済みの場合のチェック
62
+ else {
63
+ $file_path = MWF_Functions::fileurl_to_path( $value );
64
+ }
65
+
66
+ if ( file_exists( $file_path ) && exif_imagetype( $file_path ) ) {
67
+ $imagesize = getimagesize( $file_path );
68
+ } else {
69
+ if ( !in_array( $key, $upload_file_keys ) ) {
70
+ $is_error = true;
71
+ }
72
+ }
73
+
74
+ $defaults = array(
75
+ 'width' => 1,
76
+ 'height' => 1,
77
+ 'message' => __( 'This image size is too big.', 'mw-wp-form' )
78
+ );
79
+ $options = array_merge( $defaults, $options );
80
+ if ( $is_error || $imagesize[0] > $options['width'] || $imagesize[1] > $options['height'] ) {
81
+ return $options['message'];
82
+ }
83
+ }
84
+
85
+ /**
86
+ * 設定パネルに追加
87
+ *
88
+ * @param numeric $key バリデーションルールセットの識別番号
89
+ * @param array $value バリデーションルールセットの内容
90
+ */
91
+ public function admin( $key, $value ) {
92
+ $width = '';
93
+ $height = '';
94
+ if ( is_array( $value[$this->getName()] ) ) {
95
+ if ( isset( $value[$this->getName()]['width'] ) ) {
96
+ $width = $value[$this->getName()]['width'];
97
+ }
98
+ if ( isset( $value[$this->getName()]['height'] ) ) {
99
+ $height = $value[$this->getName()]['height'];
100
+ }
101
+ }
102
+ ?>
103
+ <table>
104
+ <tr>
105
+ <td><?php esc_html_e( 'Maximum image size', 'mw-wp-form' ); ?></td>
106
+ <td>
107
+ <input type="text" value="<?php echo esc_attr( $width ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][width]" />
108
+ &times;
109
+ <input type="text" value="<?php echo esc_attr( $height ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][height]" />
110
+ </td>
111
+ </tr>
112
+ </table>
113
+ <?php
114
+ }
115
+ }
classes/validation-rules/class.minimagesize.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Name : MW WP Form Validation Rule MinImageSize
4
+ * Description: 画像サイズが指定したサイズ以内
5
+ * Version : 1.0.0
6
+ * Author : Takashi Kitajima
7
+ * Author URI : http://2inc.org
8
+ * Created : April 4, 2016
9
+ * Modified :
10
+ * License : GPLv2 or later
11
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
+ */
13
+ class MW_WP_Form_Validation_Rule_MinImageSize extends MW_WP_Form_Abstract_Validation_Rule {
14
+
15
+ /**
16
+ * バリデーションルール名を指定
17
+ * @var string
18
+ */
19
+ protected $name = 'minfilesize';
20
+
21
+ /**
22
+ * バリデーションチェック
23
+ *
24
+ * @param string $key name属性
25
+ * @param array $option
26
+ * @return string エラーメッセージ
27
+ */
28
+ public function rule( $key, array $options = array() ) {
29
+ $value = $this->Data->get( $key );
30
+ if ( !$value ) {
31
+ return;
32
+ }
33
+
34
+ if ( !MWF_Functions::is_numeric( $options['width'] ) || !MWF_Functions::is_numeric( $options['width'] ) ) {
35
+ return;
36
+ }
37
+
38
+ /**
39
+ * 送信ボタンを押して次のページが表示されるまでの間、
40
+ * 1.そのページに post されてチェック
41
+ * 2.リダイレクト先でチェック
42
+ * の2度チェックされる。画像サイズのチェックは画像が存在しないとできないが、1.でエラーだった場合
43
+ * ファイルがアップロードされないので 2.でスルーされ画面表示時にはエラーも出ない。
44
+ */
45
+ $upload_file_keys = $this->Data->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
46
+ $upload_files = $this->Data->get_post_value_by_key( MWF_Config::UPLOAD_FILES );
47
+ $is_error = false;
48
+
49
+ if ( !is_array( $upload_file_keys ) ) {
50
+ $upload_file_keys = array();
51
+ }
52
+
53
+ if ( !is_array( $upload_files ) ) {
54
+ $upload_files = array();
55
+ }
56
+
57
+ // アップロード直後のチェック
58
+ if ( !in_array( $key, $upload_file_keys ) && array_key_exists( $key, $upload_files ) ) {
59
+ $file_path = $upload_files[$key]['tmp_name'];
60
+ }
61
+ // アップロード済みの場合のチェック
62
+ else {
63
+ $file_path = MWF_Functions::fileurl_to_path( $value );
64
+ }
65
+
66
+ if ( file_exists( $file_path ) && exif_imagetype( $file_path ) ) {
67
+ $imagesize = getimagesize( $file_path );
68
+ } else {
69
+ if ( !in_array( $key, $upload_file_keys ) ) {
70
+ $is_error = true;
71
+ }
72
+ }
73
+
74
+ $defaults = array(
75
+ 'width' => 1,
76
+ 'height' => 1,
77
+ 'message' => __( 'This image size is too small.', 'mw-wp-form' )
78
+ );
79
+ $options = array_merge( $defaults, $options );
80
+ if ( $is_error || $imagesize[0] < $options['width'] || $imagesize[1] < $options['height'] ) {
81
+ return $options['message'];
82
+ }
83
+ }
84
+
85
+ /**
86
+ * 設定パネルに追加
87
+ *
88
+ * @param numeric $key バリデーションルールセットの識別番号
89
+ * @param array $value バリデーションルールセットの内容
90
+ */
91
+ public function admin( $key, $value ) {
92
+ $width = '';
93
+ $height = '';
94
+ if ( is_array( $value[$this->getName()] ) ) {
95
+ if ( isset( $value[$this->getName()]['width'] ) ) {
96
+ $width = $value[$this->getName()]['width'];
97
+ }
98
+ if ( isset( $value[$this->getName()]['height'] ) ) {
99
+ $height = $value[$this->getName()]['height'];
100
+ }
101
+ }
102
+ ?>
103
+ <table>
104
+ <tr>
105
+ <td><?php esc_html_e( 'Minimum image size', 'mw-wp-form' ); ?></td>
106
+ <td>
107
+ <input type="text" value="<?php echo esc_attr( $width ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][width]" />
108
+ &times;
109
+ <input type="text" value="<?php echo esc_attr( $height ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][height]" />
110
+ </td>
111
+ </tr>
112
+ </table>
113
+ <?php
114
+ }
115
+ }
languages/mw-wp-form-ja.mo CHANGED
Binary file
languages/mw-wp-form-ja.po CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the MW WP Form package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MW WP Form 2.8.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mw-wp-form\n"
7
- "POT-Creation-Date: 2016-04-03 17:21+0900\n"
8
- "PO-Revision-Date: 2016-04-03 17:21+0900\n"
9
  "Last-Translator: inc2734 <inc@2inc.org>\n"
10
  "Language-Team: Takashi Kitajima <inc@2inc.org>\n"
11
  "Language: ja\n"
@@ -179,7 +179,7 @@ msgstr "垂直に配置する"
179
  #: classes/form-fields/class.checkbox.php:156
180
  #: classes/form-fields/class.datepicker.php:166
181
  #: classes/form-fields/class.email.php:137
182
- #: classes/form-fields/class.file.php:122
183
  #: classes/form-fields/class.image.php:126
184
  #: classes/form-fields/class.number.php:133
185
  #: classes/form-fields/class.password.php:129
@@ -195,7 +195,7 @@ msgstr "エラー表示"
195
  #: classes/form-fields/class.checkbox.php:158
196
  #: classes/form-fields/class.datepicker.php:168
197
  #: classes/form-fields/class.email.php:139
198
- #: classes/form-fields/class.file.php:124
199
  #: classes/form-fields/class.image.php:128
200
  #: classes/form-fields/class.number.php:135
201
  #: classes/form-fields/class.password.php:131
@@ -253,7 +253,7 @@ msgstr "エラーを表示したい要素のname属性"
253
  msgid "File"
254
  msgstr "ファイルフィールド"
255
 
256
- #: classes/form-fields/class.file.php:70 classes/form-fields/class.file.php:92
257
  msgid "Uploaded."
258
  msgstr "アップロードしました。"
259
 
@@ -469,6 +469,22 @@ msgstr "メールアドレスの形式ではありません。"
469
  msgid "E-mail"
470
  msgstr "メールアドレス"
471
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
472
  #: classes/validation-rules/class.minlength.php:34
473
  msgid "The number of characters is a few."
474
  msgstr "文字数が足りません。"
2
  # This file is distributed under the same license as the MW WP Form package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MW WP Form 2.8.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mw-wp-form\n"
7
+ "POT-Creation-Date: 2016-04-05 00:10+0900\n"
8
+ "PO-Revision-Date: 2016-04-05 00:11+0900\n"
9
  "Last-Translator: inc2734 <inc@2inc.org>\n"
10
  "Language-Team: Takashi Kitajima <inc@2inc.org>\n"
11
  "Language: ja\n"
179
  #: classes/form-fields/class.checkbox.php:156
180
  #: classes/form-fields/class.datepicker.php:166
181
  #: classes/form-fields/class.email.php:137
182
+ #: classes/form-fields/class.file.php:123
183
  #: classes/form-fields/class.image.php:126
184
  #: classes/form-fields/class.number.php:133
185
  #: classes/form-fields/class.password.php:129
195
  #: classes/form-fields/class.checkbox.php:158
196
  #: classes/form-fields/class.datepicker.php:168
197
  #: classes/form-fields/class.email.php:139
198
+ #: classes/form-fields/class.file.php:125
199
  #: classes/form-fields/class.image.php:128
200
  #: classes/form-fields/class.number.php:135
201
  #: classes/form-fields/class.password.php:131
253
  msgid "File"
254
  msgstr "ファイルフィールド"
255
 
256
+ #: classes/form-fields/class.file.php:71 classes/form-fields/class.file.php:93
257
  msgid "Uploaded."
258
  msgstr "アップロードしました。"
259
 
469
  msgid "E-mail"
470
  msgstr "メールアドレス"
471
 
472
+ #: classes/validation-rules/class.maximagesize.php:77
473
+ msgid "This image size is too big."
474
+ msgstr "画像サイズが大きすぎます。"
475
+
476
+ #: classes/validation-rules/class.maximagesize.php:105
477
+ msgid "Maximum image size"
478
+ msgstr "最大画像サイズ"
479
+
480
+ #: classes/validation-rules/class.minimagesize.php:77
481
+ msgid "This image size is too small."
482
+ msgstr "画像サイズが小さすぎます。"
483
+
484
+ #: classes/validation-rules/class.minimagesize.php:105
485
+ msgid "Minimum image size"
486
+ msgstr "最小画像サイズ"
487
+
488
  #: classes/validation-rules/class.minlength.php:34
489
  msgid "The number of characters is a few."
490
  msgstr "文字数が足りません。"
languages/mw-wp-form.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: MW WP Form 2.8.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mw-wp-form\n"
7
- "POT-Creation-Date: 2016-04-03 08:20:33+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -167,7 +167,7 @@ msgstr ""
167
  #: classes/form-fields/class.checkbox.php:156
168
  #: classes/form-fields/class.datepicker.php:166
169
  #: classes/form-fields/class.email.php:137
170
- #: classes/form-fields/class.file.php:122
171
  #: classes/form-fields/class.image.php:126
172
  #: classes/form-fields/class.number.php:133
173
  #: classes/form-fields/class.password.php:129
@@ -183,7 +183,7 @@ msgstr ""
183
  #: classes/form-fields/class.checkbox.php:158
184
  #: classes/form-fields/class.datepicker.php:168
185
  #: classes/form-fields/class.email.php:139
186
- #: classes/form-fields/class.file.php:124
187
  #: classes/form-fields/class.image.php:128
188
  #: classes/form-fields/class.number.php:135
189
  #: classes/form-fields/class.password.php:131
@@ -241,7 +241,7 @@ msgstr ""
241
  msgid "File"
242
  msgstr ""
243
 
244
- #: classes/form-fields/class.file.php:70 classes/form-fields/class.file.php:92
245
  msgid "Uploaded."
246
  msgstr ""
247
 
@@ -457,6 +457,22 @@ msgstr ""
457
  msgid "E-mail"
458
  msgstr ""
459
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  #: classes/validation-rules/class.minlength.php:34
461
  msgid "The number of characters is a few."
462
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: MW WP Form 2.8.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mw-wp-form\n"
7
+ "POT-Creation-Date: 2016-04-04 15:10:15+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
167
  #: classes/form-fields/class.checkbox.php:156
168
  #: classes/form-fields/class.datepicker.php:166
169
  #: classes/form-fields/class.email.php:137
170
+ #: classes/form-fields/class.file.php:123
171
  #: classes/form-fields/class.image.php:126
172
  #: classes/form-fields/class.number.php:133
173
  #: classes/form-fields/class.password.php:129
183
  #: classes/form-fields/class.checkbox.php:158
184
  #: classes/form-fields/class.datepicker.php:168
185
  #: classes/form-fields/class.email.php:139
186
+ #: classes/form-fields/class.file.php:125
187
  #: classes/form-fields/class.image.php:128
188
  #: classes/form-fields/class.number.php:135
189
  #: classes/form-fields/class.password.php:131
241
  msgid "File"
242
  msgstr ""
243
 
244
+ #: classes/form-fields/class.file.php:71 classes/form-fields/class.file.php:93
245
  msgid "Uploaded."
246
  msgstr ""
247
 
457
  msgid "E-mail"
458
  msgstr ""
459
 
460
+ #: classes/validation-rules/class.maximagesize.php:77
461
+ msgid "This image size is too big."
462
+ msgstr ""
463
+
464
+ #: classes/validation-rules/class.maximagesize.php:105
465
+ msgid "Maximum image size"
466
+ msgstr ""
467
+
468
+ #: classes/validation-rules/class.minimagesize.php:77
469
+ msgid "This image size is too small."
470
+ msgstr ""
471
+
472
+ #: classes/validation-rules/class.minimagesize.php:105
473
+ msgid "Minimum image size"
474
+ msgstr ""
475
+
476
  #: classes/validation-rules/class.minlength.php:34
477
  msgid "The number of characters is a few."
478
  msgstr ""
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.8.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: March 10, 2016
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPLv2 or later
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.8.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: April 5, 2016
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPLv2 or later
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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: 4.0
6
  Tested up to: 4.4.0
7
- Stable tag: 2.8.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -79,6 +79,11 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
82
  = 2.8.0 =
83
  * Added : Support slug attribute. e.g. [mwform_formkey slug="form_slug"]
84
  * Added : Added filter hook mwform_inquiry_data_columns-mwf_xxx
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: 4.0
6
  Tested up to: 4.4.0
7
+ Stable tag: 2.8.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
79
 
80
  == Changelog ==
81
 
82
+ = 2.8.1 =
83
+ * Added : Added MinImageSize validation.
84
+ * Added : Added MaxImageSize validation.
85
+ * Bugfix : Fixed a set_upload_file_keys bug and rename to regenerate_upload_file_keys.
86
+
87
  = 2.8.0 =
88
  * Added : Support slug attribute. e.g. [mwform_formkey slug="form_slug"]
89
  * Added : Added filter hook mwform_inquiry_data_columns-mwf_xxx