Version Description
- Bugfix : Fixed a bug the custom_mail_tag from To, CC and BCC.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 2.4.7 |
Comparing to | |
See all releases |
Code changes from version 2.4.6 to 2.4.7
- classes/services/class.mail-parser.php +29 -8
- mw-wp-form.php +2 -2
- readme.txt +4 -1
classes/services/class.mail-parser.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Parser
|
4 |
* Description: メールパーサー
|
5 |
-
* Version : 1.0.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : April 14, 2015
|
9 |
-
* Modified : April
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -87,12 +87,7 @@ class MW_WP_Form_Mail_Parser {
|
|
87 |
}
|
88 |
|
89 |
if ( $key == 'to' || $key == 'cc' || $key == 'bcc' ) {
|
90 |
-
$
|
91 |
-
$form_key = MWF_Functions::get_form_key_from_form_id( $form_id );
|
92 |
-
$value = $this->apply_filters_mwform_custom_mail_tag( $form_key, null, $key );
|
93 |
-
if ( !is_null( $value ) ) {
|
94 |
-
$this->Mail->$key = $value;
|
95 |
-
}
|
96 |
continue;
|
97 |
}
|
98 |
|
@@ -106,6 +101,32 @@ class MW_WP_Form_Mail_Parser {
|
|
106 |
return $this->Mail;
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
/**
|
110 |
* メール本文用に {name属性} を置換
|
111 |
*
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Parser
|
4 |
* Description: メールパーサー
|
5 |
+
* Version : 1.0.2
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : April 14, 2015
|
9 |
+
* Modified : April 23, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
87 |
}
|
88 |
|
89 |
if ( $key == 'to' || $key == 'cc' || $key == 'bcc' ) {
|
90 |
+
$this->Mail->$key = $this->parse_mail_destination( $value );
|
|
|
|
|
|
|
|
|
|
|
91 |
continue;
|
92 |
}
|
93 |
|
101 |
return $this->Mail;
|
102 |
}
|
103 |
|
104 |
+
/**
|
105 |
+
* メール送信先用に {name属性} を置換。Data からの取得は行わない
|
106 |
+
*
|
107 |
+
* @param string $value
|
108 |
+
* @return string
|
109 |
+
*/
|
110 |
+
protected function parse_mail_destination( $value ) {
|
111 |
+
return preg_replace_callback(
|
112 |
+
'/{(.+?)}/',
|
113 |
+
array( $this, '_parse_mail_destination' ),
|
114 |
+
$value
|
115 |
+
);
|
116 |
+
}
|
117 |
+
protected function _parse_mail_destination( $matches ) {
|
118 |
+
$match = $matches[1];
|
119 |
+
$form_id = $this->Setting->get( 'post_id' );
|
120 |
+
$form_key = MWF_Functions::get_form_key_from_form_id( $form_id );
|
121 |
+
$value = $this->apply_filters_mwform_custom_mail_tag( $form_key, null, $match );
|
122 |
+
|
123 |
+
// カスタムメールタグが利用されていない = null ときは送信先の初期値である空白を返す
|
124 |
+
if ( !is_null( $value ) ) {
|
125 |
+
return $value;
|
126 |
+
}
|
127 |
+
return '';
|
128 |
+
}
|
129 |
+
|
130 |
/**
|
131 |
* メール本文用に {name属性} を置換
|
132 |
*
|
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.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
-
* Modified: April
|
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.7
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: April 23, 2015
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPLv2
|
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: 3.7
|
6 |
Tested up to: 4.1.1
|
7 |
-
Stable tag: 2.4.
|
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.6 =
|
75 |
* Changed : The custom_mail_tag filter hook applied to To, CC and BCC.
|
76 |
* Changed : Full size image is displayed when you click the thumbnail of the attached image in saving contact data list.
|
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.1.1
|
7 |
+
Stable tag: 2.4.7
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 2.4.7 =
|
75 |
+
* Bugfix : Fixed a bug the custom_mail_tag from To, CC and BCC.
|
76 |
+
|
77 |
= 2.4.6 =
|
78 |
* Changed : The custom_mail_tag filter hook applied to To, CC and BCC.
|
79 |
* Changed : Full size image is displayed when you click the thumbnail of the attached image in saving contact data list.
|