Version Description
- Bug fix : Fixed a bug that number of newline characters are different by the environment.
- Changed : Modified to ignore uppercase letters of lowercase letters at the file type validation.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 2.1.3 |
Comparing to | |
See all releases |
Code changes from version 2.1.2 to 2.1.3
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 can create mail form with a confirmation screen.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
-
* Modified:
|
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 can create mail form with a confirmation screen.
|
6 |
+
* Version: 2.1.3
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: December 1, 2014
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== MW WP Form ===
|
2 |
Contributors: inc2734, ryu263
|
3 |
Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
4 |
-
Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -71,6 +71,10 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
74 |
= 2.1.2 =
|
75 |
* Added : Added form key in list of MW WP Form page.
|
76 |
* Bug fix : Fixed a bug that "add form tag button" is displayed in complete message area.
|
1 |
=== MW WP Form ===
|
2 |
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.0
|
7 |
+
Stable tag: 2.1.3
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 2.1.3 =
|
75 |
+
* Bug fix : Fixed a bug that number of newline characters are different by the environment.
|
76 |
+
* Changed : Modified to ignore uppercase letters of lowercase letters at the file type validation.
|
77 |
+
|
78 |
= 2.1.2 =
|
79 |
* Added : Added form key in list of MW WP Form page.
|
80 |
* Bug fix : Fixed a bug that "add form tag button" is displayed in complete message area.
|
system/mwf_functions.php
CHANGED
@@ -88,6 +88,16 @@ class MWF_Functions {
|
|
88 |
return $fileurl;
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
/**
|
92 |
* deprecated_message
|
93 |
* 古いメソッドを使った場合にエラーを出力
|
88 |
return $fileurl;
|
89 |
}
|
90 |
|
91 |
+
/**
|
92 |
+
* convert_eol
|
93 |
+
* 改行コードを \n に統一
|
94 |
+
* @param sring $string
|
95 |
+
* @return string $string
|
96 |
+
*/
|
97 |
+
public static function convert_eol( $string ) {
|
98 |
+
return preg_replace( "/\r\n|\r|\n/", "\n", $string );
|
99 |
+
}
|
100 |
+
|
101 |
/**
|
102 |
* deprecated_message
|
103 |
* 古いメソッドを使った場合にエラーを出力
|
validation_rules/mw_validation_rule_between.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW Validation Rule Between
|
4 |
* Description: 値の文字数が範囲内
|
5 |
-
* Version: 1.0.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : July 21, 2014
|
9 |
-
* Modified:
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -25,6 +25,7 @@ class MW_Validation_Rule_Between extends MW_Validation_Rule {
|
|
25 |
*/
|
26 |
public function rule( $key, array $options = array() ) {
|
27 |
$value = $this->Data->get( $key );
|
|
|
28 |
if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
|
29 |
$defaults = array(
|
30 |
'min' => 0,
|
2 |
/**
|
3 |
* Name: MW Validation Rule Between
|
4 |
* Description: 値の文字数が範囲内
|
5 |
+
* Version: 1.0.3
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : July 21, 2014
|
9 |
+
* Modified: December 1, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
25 |
*/
|
26 |
public function rule( $key, array $options = array() ) {
|
27 |
$value = $this->Data->get( $key );
|
28 |
+
$value = MWF_Functions::convert_eol( $value );
|
29 |
if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
|
30 |
$defaults = array(
|
31 |
'min' => 0,
|
validation_rules/mw_validation_rule_filetype.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW Validation Rule FileType
|
4 |
* Description: ファイル名が指定した拡張子を含む。types は , 区切り
|
5 |
-
* Version: 1.0.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : July 21, 2014
|
9 |
-
* Modified:
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -36,7 +36,7 @@ class MW_Validation_Rule_FileType extends MW_Validation_Rule {
|
|
36 |
$types[] = preg_quote( trim( $type ), '/' );
|
37 |
}
|
38 |
$types = implode( '|', MWF_Functions::array_clean( $types ) );
|
39 |
-
$pattern = '/\.(' . $types . ')$/';
|
40 |
if ( !preg_match( $pattern, $value ) ) {
|
41 |
return $options['message'];
|
42 |
}
|
2 |
/**
|
3 |
* Name: MW Validation Rule FileType
|
4 |
* Description: ファイル名が指定した拡張子を含む。types は , 区切り
|
5 |
+
* Version: 1.0.3
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : July 21, 2014
|
9 |
+
* Modified: December 1, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
36 |
$types[] = preg_quote( trim( $type ), '/' );
|
37 |
}
|
38 |
$types = implode( '|', MWF_Functions::array_clean( $types ) );
|
39 |
+
$pattern = '/\.(' . $types . ')$/i';
|
40 |
if ( !preg_match( $pattern, $value ) ) {
|
41 |
return $options['message'];
|
42 |
}
|
validation_rules/mw_validation_rule_minlength.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW Validation Rule MinLength
|
4 |
* Description: 値の文字数が範囲内
|
5 |
-
* Version: 1.0.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : July 21, 2014
|
9 |
-
* Modified:
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -25,6 +25,7 @@ class MW_Validation_Rule_MinLength extends MW_Validation_Rule {
|
|
25 |
*/
|
26 |
public function rule( $key, array $options = array() ) {
|
27 |
$value = $this->Data->get( $key );
|
|
|
28 |
if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
|
29 |
$defaults = array(
|
30 |
'min' => 0,
|
2 |
/**
|
3 |
* Name: MW Validation Rule MinLength
|
4 |
* Description: 値の文字数が範囲内
|
5 |
+
* Version: 1.0.3
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : July 21, 2014
|
9 |
+
* Modified: December 1, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
25 |
*/
|
26 |
public function rule( $key, array $options = array() ) {
|
27 |
$value = $this->Data->get( $key );
|
28 |
+
$value = MWF_Functions::convert_eol( $value );
|
29 |
if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
|
30 |
$defaults = array(
|
31 |
'min' => 0,
|