Version Description
- Bugfix : Support validation check of custom mail tag fields.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 3.2.2 |
Comparing to | |
See all releases |
Code changes from version 3.2.1 to 3.2.2
- classes/config.php +5 -0
- classes/form-fields/class.custom-mail-tag.php +15 -1
- classes/models/class.data.php +22 -0
- mw-wp-form.php +2 -2
- readme.txt +5 -2
classes/config.php
CHANGED
@@ -32,6 +32,11 @@ class MWF_Config {
|
|
32 |
*/
|
33 |
const UPLOAD_FILE_KEYS = 'mwf_upload_files';
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* $_FILES
|
37 |
*/
|
32 |
*/
|
33 |
const UPLOAD_FILE_KEYS = 'mwf_upload_files';
|
34 |
|
35 |
+
/**
|
36 |
+
* カスタムメールタグを示す name属性 を保存する配列、メタデータの名前
|
37 |
+
*/
|
38 |
+
const CUSTOM_MAIL_TAG_KEYS = 'mwf_custom_mail_tags';
|
39 |
+
|
40 |
/**
|
41 |
* $_FILES
|
42 |
*/
|
classes/form-fields/class.custom-mail-tag.php
CHANGED
@@ -54,6 +54,10 @@ class MW_WP_Form_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
|
54 |
'id' => $this->atts['id'],
|
55 |
'class' => $this->atts['class'],
|
56 |
) );
|
|
|
|
|
|
|
|
|
57 |
return $_ret;
|
58 |
}
|
59 |
|
@@ -67,6 +71,7 @@ class MW_WP_Form_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
|
67 |
'id' => $this->atts['id'],
|
68 |
'class' => $this->atts['class'],
|
69 |
) );
|
|
|
70 |
return $_ret;
|
71 |
}
|
72 |
|
@@ -129,11 +134,20 @@ class MW_WP_Form_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
|
129 |
* @return string
|
130 |
*/
|
131 |
protected function apply_filters_mwform_custom_mail_tag( $form_key, $value, $name ) {
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
'mwform_custom_mail_tag_' . $form_key,
|
134 |
$value,
|
135 |
$name,
|
136 |
null
|
137 |
);
|
|
|
|
|
138 |
}
|
139 |
}
|
54 |
'id' => $this->atts['id'],
|
55 |
'class' => $this->atts['class'],
|
56 |
) );
|
57 |
+
$_ret .= $this->Form->hidden( MWF_Config::CUSTOM_MAIL_TAG_KEYS . '[]', $this->atts['name'] );
|
58 |
+
if ( $this->atts['show_error'] !== 'false' ) {
|
59 |
+
$_ret .= $this->get_error( $this->atts['name'] );
|
60 |
+
}
|
61 |
return $_ret;
|
62 |
}
|
63 |
|
71 |
'id' => $this->atts['id'],
|
72 |
'class' => $this->atts['class'],
|
73 |
) );
|
74 |
+
$_ret .= $this->Form->hidden( MWF_Config::CUSTOM_MAIL_TAG_KEYS . '[]', $this->atts['name'] );
|
75 |
return $_ret;
|
76 |
}
|
77 |
|
134 |
* @return string
|
135 |
*/
|
136 |
protected function apply_filters_mwform_custom_mail_tag( $form_key, $value, $name ) {
|
137 |
+
$value = apply_filters(
|
138 |
+
'mwform_custom_mail_tag',
|
139 |
+
$value,
|
140 |
+
$name,
|
141 |
+
null
|
142 |
+
);
|
143 |
+
|
144 |
+
$value = apply_filters(
|
145 |
'mwform_custom_mail_tag_' . $form_key,
|
146 |
$value,
|
147 |
$name,
|
148 |
null
|
149 |
);
|
150 |
+
|
151 |
+
return $value;
|
152 |
}
|
153 |
}
|
classes/models/class.data.php
CHANGED
@@ -64,6 +64,28 @@ class MW_WP_Form_Data {
|
|
64 |
$this->data = $this->Session->gets();
|
65 |
$this->set_request_valiables( $this->POST );
|
66 |
$this->set_files_valiables( $this->POST, $this->FILES );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
/**
|
64 |
$this->data = $this->Session->gets();
|
65 |
$this->set_request_valiables( $this->POST );
|
66 |
$this->set_files_valiables( $this->POST, $this->FILES );
|
67 |
+
|
68 |
+
if ( isset( $POST[ MWF_Config::CUSTOM_MAIL_TAG_KEYS ] ) ) {
|
69 |
+
foreach ( $POST[ MWF_Config::CUSTOM_MAIL_TAG_KEYS ] as $custom_mail_tag_key ) {
|
70 |
+
$value = apply_filters(
|
71 |
+
'mwform_custom_mail_tag',
|
72 |
+
null,
|
73 |
+
$custom_mail_tag_key,
|
74 |
+
null
|
75 |
+
);
|
76 |
+
|
77 |
+
$value = apply_filters(
|
78 |
+
'mwform_custom_mail_tag_' . $form_key,
|
79 |
+
$value,
|
80 |
+
$custom_mail_tag_key,
|
81 |
+
null
|
82 |
+
);
|
83 |
+
|
84 |
+
if ( ! is_null( $value ) ) {
|
85 |
+
$this->set( $custom_mail_tag_key, $value );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
}
|
89 |
}
|
90 |
|
91 |
/**
|
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: 3.2.
|
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 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: 3.2.2
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: July 21, 2018
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPLv2 or later
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: inc2734, ryu263, tomothumb, nanniku, mt8.biz, NExt-Season, kuck1u,
|
|
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: 4.0
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 3.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -80,6 +80,9 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
80 |
|
81 |
== Changelog ==
|
82 |
|
|
|
|
|
|
|
83 |
= 3.2.1 =
|
84 |
* Bugfix : Fixed a bug that displayed send error page when admin mail address is `false`.
|
85 |
|
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: 4.0
|
6 |
+
Tested up to: 4.9.7
|
7 |
+
Stable tag: 3.2.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 3.2.2 =
|
84 |
+
* Bugfix : Support validation check of custom mail tag fields.
|
85 |
+
|
86 |
= 3.2.1 =
|
87 |
* Bugfix : Fixed a bug that displayed send error page when admin mail address is `false`.
|
88 |
|