Version Description
- Added : Support slug attribute. e.g. [mwform_formkey slug="form_slug"]
- Added : Added filter hook mwform_inquiry_data_columns-mwf_xxx
- Added : Added filter hook mwform_upload_file_keys_mw-wp-form-xxx
- Added : Added args of filter hook mwform_upload_dir_mw-wp-form-xxx and mwform_upload_filename_mw-wp-form-xxx
- Added : Added the Custom Mail Tag field. This field display value of mwform_custom_mail_tag_mw-wp-form-xxx.
- Bugfix : docx, xlsx, pptx upload bug fixed.
- Bugfix : Fixed a bug that the extension isn't added when using filter hook mwform_upload_filename_mw-wp-form-xxx.
- Changed : Sending the file url when saving in database and input {file key} and {image key} in the mail.
- Changed : Check of the js attribute of datepicker is now strictly. Property MUST be enclosed in double quotes.
- Changed : Changed the form token name.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 2.8.0 |
Comparing to | |
See all releases |
Code changes from version 2.7.0 to 2.8.0
- classes/controllers/class.contact-data-list.php +5 -4
- classes/controllers/class.main.php +18 -6
- classes/form-fields/class.custom-mail-tag.php +139 -0
- classes/form-fields/class.datepicker.php +27 -16
- classes/functions.php +37 -11
- classes/models/class.abstract-form-field.php +1 -1
- classes/models/class.csv.php +25 -26
- classes/models/class.data.php +25 -12
- classes/models/class.file.php +4 -4
- classes/models/class.form.php +4 -4
- classes/models/class.json-parser.php +201 -0
- classes/services/class.exec-shortcode.php +18 -11
- classes/services/class.mail-parser.php +5 -3
- classes/services/class.mail.php +2 -7
- css/style.css +41 -8
- languages/mw-wp-form-ja.mo +0 -0
- languages/mw-wp-form-ja.po +28 -26
- languages/mw-wp-form.pot +42 -64
- mw-wp-form.php +3 -2
- readme.txt +14 -1
- templates/contact-data/detail.php +23 -9
classes/controllers/class.contact-data-list.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Contact Data List Controller
|
4 |
-
* Version : 1.
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
-
* Modified :
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -125,7 +125,7 @@ class MW_WP_Form_Contact_Data_List_Controller extends MW_WP_Form_Controller {
|
|
125 |
continue;
|
126 |
}
|
127 |
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
128 |
-
$
|
129 |
continue;
|
130 |
}
|
131 |
$_columns[$key] = $key;
|
@@ -133,7 +133,8 @@ class MW_WP_Form_Contact_Data_List_Controller extends MW_WP_Form_Controller {
|
|
133 |
}
|
134 |
}
|
135 |
ksort( $_columns );
|
136 |
-
$
|
|
|
137 |
return $columns;
|
138 |
}
|
139 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Contact Data List Controller
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
+
* Modified : March 26, 2016
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
125 |
continue;
|
126 |
}
|
127 |
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
128 |
+
$columns[$key] = MWF_Functions::get_tracking_number_title( $this->post_type );
|
129 |
continue;
|
130 |
}
|
131 |
$_columns[$key] = $key;
|
133 |
}
|
134 |
}
|
135 |
ksort( $_columns );
|
136 |
+
$_columns = apply_filters( 'mwform_inquiry_data_columns-' . $this->post_type, $_columns );
|
137 |
+
$columns = array_merge( $columns, $_columns );
|
138 |
return $columns;
|
139 |
}
|
140 |
|
classes/controllers/class.main.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Main Controller
|
4 |
* Description: フロントエンドにおいて、適切な画面にリダイレクトさせる
|
5 |
-
* Version : 1.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 23, 2014
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -40,7 +40,7 @@ class MW_WP_Form_Main_Controller {
|
|
40 |
/**
|
41 |
* @var string
|
42 |
*/
|
43 |
-
protected $token_name = '
|
44 |
|
45 |
/**
|
46 |
* リダイレクトされてからの complete であれば true
|
@@ -70,7 +70,10 @@ class MW_WP_Form_Main_Controller {
|
|
70 |
* WordPressへのリクエストに含まれている、$_POSTの値を削除
|
71 |
*/
|
72 |
public function remove_query_vars_from_post( $wp_query ) {
|
73 |
-
if (
|
|
|
|
|
|
|
74 |
foreach ( $_POST as $key => $value ) {
|
75 |
if ( $key == 'token' ) {
|
76 |
continue;
|
@@ -263,6 +266,13 @@ class MW_WP_Form_Main_Controller {
|
|
263 |
|
264 |
// 管理画面で作成した場合だけ自動で送信
|
265 |
if ( $this->ExecShortcode->is_generated_by_formkey() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
$Mail_Service->send_admin_mail();
|
267 |
|
268 |
// 自動返信メールの送信
|
@@ -303,12 +313,14 @@ class MW_WP_Form_Main_Controller {
|
|
303 |
$new_upload_dir = apply_filters(
|
304 |
'mwform_upload_dir_' . $form_key,
|
305 |
'',
|
306 |
-
$this->Data
|
|
|
307 |
);
|
308 |
$new_filename = apply_filters(
|
309 |
'mwform_upload_filename_' . $form_key,
|
310 |
'',
|
311 |
-
$this->Data
|
|
|
312 |
);
|
313 |
$filepath = MWF_Functions::move_temp_file_to_upload_dir(
|
314 |
$filepath,
|
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 |
*/
|
40 |
/**
|
41 |
* @var string
|
42 |
*/
|
43 |
+
protected $token_name = 'mw_wp_form_token';
|
44 |
|
45 |
/**
|
46 |
* リダイレクトされてからの complete であれば true
|
70 |
* WordPressへのリクエストに含まれている、$_POSTの値を削除
|
71 |
*/
|
72 |
public function remove_query_vars_from_post( $wp_query ) {
|
73 |
+
if ( isset( $_POST[$this->token_name] ) ) {
|
74 |
+
$request_token = $_POST[$this->token_name];
|
75 |
+
}
|
76 |
+
if ( isset( $request_token ) ) {
|
77 |
foreach ( $_POST as $key => $value ) {
|
78 |
if ( $key == 'token' ) {
|
79 |
continue;
|
266 |
|
267 |
// 管理画面で作成した場合だけ自動で送信
|
268 |
if ( $this->ExecShortcode->is_generated_by_formkey() ) {
|
269 |
+
// データベース非保存の場合はファイルも保存されないので、メールで URL が飛ばないように消す
|
270 |
+
if ( !$this->Setting->get( 'usedb' ) ) {
|
271 |
+
foreach ( $attachments as $key => $attachment ) {
|
272 |
+
$this->Data->clear_value( $key );
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
$Mail_Service->send_admin_mail();
|
277 |
|
278 |
// 自動返信メールの送信
|
313 |
$new_upload_dir = apply_filters(
|
314 |
'mwform_upload_dir_' . $form_key,
|
315 |
'',
|
316 |
+
$this->Data,
|
317 |
+
$key
|
318 |
);
|
319 |
$new_filename = apply_filters(
|
320 |
'mwform_upload_filename_' . $form_key,
|
321 |
'',
|
322 |
+
$this->Data,
|
323 |
+
$key
|
324 |
);
|
325 |
$filepath = MWF_Functions::move_temp_file_to_upload_dir(
|
326 |
$filepath,
|
classes/form-fields/class.custom-mail-tag.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Name : MW WP Form Field Custom Mail Tag
|
4 |
+
* Description: mwform_custom_mail_tag_mw-wp-form-xxx で指定されたデータを出力
|
5 |
+
* Version : 1.0.0
|
6 |
+
* Author : Takashi Kitajima
|
7 |
+
* Author URI : http://2inc.org
|
8 |
+
* Created : April 3, 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_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* $type
|
17 |
+
* フォームタグの種類 input|select|button|error|other
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
public $type = 'other';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* set_names
|
24 |
+
* shortcode_name、display_nameを定義。各子クラスで上書きする。
|
25 |
+
* @return array shortcode_name, display_name
|
26 |
+
*/
|
27 |
+
protected function set_names() {
|
28 |
+
return array(
|
29 |
+
'shortcode_name' => 'mwform_custom_mail_tag',
|
30 |
+
'display_name' => __( 'Custom Mail Tag', 'mw-wp-form' ),
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* set_defaults
|
36 |
+
* $this->defaultsを設定し返す
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
protected function set_defaults() {
|
40 |
+
return array(
|
41 |
+
'name' => '',
|
42 |
+
'id' => null,
|
43 |
+
'class' => null,
|
44 |
+
);
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* input_page
|
49 |
+
* 入力ページでのフォーム項目を返す
|
50 |
+
* @return string html
|
51 |
+
*/
|
52 |
+
protected function input_page() {
|
53 |
+
$_ret = $this->custom_mail_tag_field( $this->atts['name'], array(
|
54 |
+
'id' => $this->atts['id'],
|
55 |
+
'class' => $this->atts['class'],
|
56 |
+
) );
|
57 |
+
return $_ret;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* confirm_page
|
62 |
+
* 確認ページでのフォーム項目を返す
|
63 |
+
* @return string HTML
|
64 |
+
*/
|
65 |
+
protected function confirm_page() {
|
66 |
+
$_ret = $this->custom_mail_tag_field( $this->atts['name'], array(
|
67 |
+
'id' => $this->atts['id'],
|
68 |
+
'class' => $this->atts['class'],
|
69 |
+
) );
|
70 |
+
return $_ret;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* add_mwform_tag_generator
|
75 |
+
* フォームタグジェネレーター
|
76 |
+
*/
|
77 |
+
public function mwform_tag_generator_dialog( array $options = array() ) {
|
78 |
+
?>
|
79 |
+
<p>
|
80 |
+
<strong>name<span class="mwf_require">*</span></strong>
|
81 |
+
<?php $name = $this->get_value_for_generator( 'name', $options ); ?>
|
82 |
+
<input type="text" name="name" value="<?php echo esc_attr( $name ); ?>" />
|
83 |
+
</p>
|
84 |
+
<p>
|
85 |
+
<strong>id</strong>
|
86 |
+
<?php $id = $this->get_value_for_generator( 'id', $options ); ?>
|
87 |
+
<input type="text" name="id" value="<?php echo esc_attr( $id ); ?>" />
|
88 |
+
</p>
|
89 |
+
<p>
|
90 |
+
<strong>class</strong>
|
91 |
+
<?php $class = $this->get_value_for_generator( 'class', $options ); ?>
|
92 |
+
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
93 |
+
</p>
|
94 |
+
<?php
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* 任意のデータを表示する要素を生成
|
99 |
+
*
|
100 |
+
* @param string $name name属性
|
101 |
+
* @param array
|
102 |
+
* @return string html
|
103 |
+
*/
|
104 |
+
public function custom_mail_tag_field( $name, $options = array() ) {
|
105 |
+
$defaults = array(
|
106 |
+
'id' => null,
|
107 |
+
'class' => null,
|
108 |
+
);
|
109 |
+
$options = array_merge( $defaults, $options );
|
110 |
+
$class = $options['class'];
|
111 |
+
unset( $options['class'] );
|
112 |
+
$Form = new MW_WP_Form_Form();
|
113 |
+
$attributes = $Form->generate_attributes( $options );
|
114 |
+
|
115 |
+
return sprintf(
|
116 |
+
'<span class="mwform-custom-mail-tag-field %s" %s>%s</span>',
|
117 |
+
esc_attr( $class ),
|
118 |
+
$attributes,
|
119 |
+
esc_html( $this->apply_filters_mwform_custom_mail_tag( $this->form_key, '', $name ) )
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* フィルターフック mwform_custom_mail_tag を実行
|
125 |
+
*
|
126 |
+
* @param string $form_key
|
127 |
+
* @param string|null $value
|
128 |
+
* @param string $name
|
129 |
+
* @return string
|
130 |
+
*/
|
131 |
+
protected function apply_filters_mwform_custom_mail_tag( $form_key, $value, $name ) {
|
132 |
+
return apply_filters(
|
133 |
+
'mwform_custom_mail_tag_' . $form_key,
|
134 |
+
$value,
|
135 |
+
$name,
|
136 |
+
null
|
137 |
+
);
|
138 |
+
}
|
139 |
+
}
|
classes/form-fields/class.datepicker.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Field Datepicker
|
4 |
* Description: datepickerを出力
|
5 |
-
* Version : 1.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -59,25 +59,36 @@ class MW_WP_Form_Field_Datepicker extends MW_WP_Form_Abstract_Form_Field {
|
|
59 |
$ui = $wp_scripts->query( 'jquery-ui-core' );
|
60 |
wp_enqueue_style( 'jquery.ui', '//ajax.googleapis.com/ajax/libs/jqueryui/' . $ui->ver . '/themes/smoothness/jquery-ui.min.css', array(), $ui->ver );
|
61 |
wp_enqueue_script( 'jquery-ui-datepicker' );
|
|
|
|
|
|
|
|
|
|
|
62 |
// jsの指定がないときはデフォルトで年付き変更機能追加
|
63 |
-
if ( empty( $
|
64 |
-
$
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
|
|
66 |
// 日本語の場合は日本語表記に変更
|
67 |
if ( get_locale() == 'ja' ) {
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
monthNames: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],
|
78 |
-
monthNamesShort: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]
|
79 |
-
';
|
80 |
}
|
|
|
|
|
|
|
81 |
$value = $this->Data->get_raw( $this->atts['name'] );
|
82 |
if ( is_null( $value ) ) {
|
83 |
$value = $this->atts['value'];
|
2 |
/**
|
3 |
* Name : MW WP Form Field Datepicker
|
4 |
* Description: datepickerを出力
|
5 |
+
* Version : 1.7.1
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
+
* Modified : April 3, 2016
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
59 |
$ui = $wp_scripts->query( 'jquery-ui-core' );
|
60 |
wp_enqueue_style( 'jquery.ui', '//ajax.googleapis.com/ajax/libs/jqueryui/' . $ui->ver . '/themes/smoothness/jquery-ui.min.css', array(), $ui->ver );
|
61 |
wp_enqueue_script( 'jquery-ui-datepicker' );
|
62 |
+
|
63 |
+
$Json_Parser = new MW_WP_Form_Json_Parser( $this->atts['js'] );
|
64 |
+
$this->atts['js'] = $Json_Parser->create_json();
|
65 |
+
$js = json_decode( $this->atts['js'], true );
|
66 |
+
|
67 |
// jsの指定がないときはデフォルトで年付き変更機能追加
|
68 |
+
if ( empty( $js ) ) {
|
69 |
+
$js = '"showMonthAfterYear": true, "changeYear": true, "changeMonth": true';
|
70 |
+
$js = array(
|
71 |
+
'showMonthAfterYear' => 'true',
|
72 |
+
'changeYear' => 'true',
|
73 |
+
'changeMonth' => 'true',
|
74 |
+
);
|
75 |
}
|
76 |
+
|
77 |
// 日本語の場合は日本語表記に変更
|
78 |
if ( get_locale() == 'ja' ) {
|
79 |
+
$js = array_merge( array(
|
80 |
+
'yearSuffix' => '年',
|
81 |
+
'dateFormat' => 'yy年mm月dd日',
|
82 |
+
'dayNames' => array( '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日' ),
|
83 |
+
'dayNamesMin' => array( '日', '月', '火', '水', '木', '金', '土' ),
|
84 |
+
'dayNamesShort' => array( '日曜', '月曜', '火曜', '水曜', '木曜', '金曜', '土曜' ),
|
85 |
+
'monthNames' => array( '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ),
|
86 |
+
'monthNamesShort' => array( '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ),
|
87 |
+
), $js );
|
|
|
|
|
|
|
88 |
}
|
89 |
+
|
90 |
+
$this->atts['js'] = json_encode( $js );
|
91 |
+
|
92 |
$value = $this->Data->get_raw( $this->atts['name'] );
|
93 |
if ( is_null( $value ) ) {
|
94 |
$value = $this->atts['value'];
|
classes/functions.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MWF Functions
|
4 |
* Description: 関数
|
5 |
-
* Version : 1.5.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : May 29, 2013
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -62,7 +62,7 @@ class MWF_Functions {
|
|
62 |
$fileurl = preg_replace( '/^https?:\/\/(.+)$/', '$1', $fileurl );
|
63 |
$filepath = str_replace(
|
64 |
$baseurl,
|
65 |
-
|
66 |
$fileurl
|
67 |
);
|
68 |
return $filepath;
|
@@ -78,7 +78,7 @@ class MWF_Functions {
|
|
78 |
public static function filepath_to_url( $filepath ) {
|
79 |
$wp_upload_dir = wp_upload_dir();
|
80 |
$fileurl = str_replace(
|
81 |
-
|
82 |
$wp_upload_dir['baseurl'],
|
83 |
$filepath
|
84 |
);
|
@@ -159,23 +159,32 @@ class MWF_Functions {
|
|
159 |
* @return string 新しいファイルパス
|
160 |
*/
|
161 |
public static function move_temp_file_to_upload_dir( $filepath, $upload_dir = '', $filename = '' ) {
|
162 |
-
|
163 |
-
$wp_upload_dir = wp_upload_dir();
|
164 |
-
$upload_dir = realpath( $wp_upload_dir['path'] );
|
165 |
-
}
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
|
|
170 |
}
|
171 |
|
172 |
if ( !$filename ) {
|
173 |
$filename = basename( $filepath );
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
$filename = wp_unique_filename( $upload_dir, $filename );
|
176 |
|
177 |
$new_filepath = trailingslashit( $upload_dir ) . $filename;
|
178 |
|
|
|
|
|
|
|
|
|
179 |
// もし temp ファイルが存在しない場合、一応リネーム後のパスだけ返す
|
180 |
if ( !file_exists( $filepath ) ) {
|
181 |
return $new_filepath;
|
@@ -275,11 +284,28 @@ class MWF_Functions {
|
|
275 |
);
|
276 |
break;
|
277 |
case 'docx' :
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
case 'xlsx' :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
case 'pptx' :
|
280 |
$wp_check_filetype['type'] = array(
|
281 |
$wp_check_filetype['type'],
|
282 |
'application/zip',
|
|
|
|
|
|
|
283 |
);
|
284 |
break;
|
285 |
}
|
2 |
/**
|
3 |
* Name : MWF Functions
|
4 |
* Description: 関数
|
5 |
+
* Version : 1.5.3
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : May 29, 2013
|
9 |
+
* Modified : April 2, 2016
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
62 |
$fileurl = preg_replace( '/^https?:\/\/(.+)$/', '$1', $fileurl );
|
63 |
$filepath = str_replace(
|
64 |
$baseurl,
|
65 |
+
$wp_upload_dir['basedir'],
|
66 |
$fileurl
|
67 |
);
|
68 |
return $filepath;
|
78 |
public static function filepath_to_url( $filepath ) {
|
79 |
$wp_upload_dir = wp_upload_dir();
|
80 |
$fileurl = str_replace(
|
81 |
+
$wp_upload_dir['basedir'],
|
82 |
$wp_upload_dir['baseurl'],
|
83 |
$filepath
|
84 |
);
|
159 |
* @return string 新しいファイルパス
|
160 |
*/
|
161 |
public static function move_temp_file_to_upload_dir( $filepath, $upload_dir = '', $filename = '' ) {
|
162 |
+
$wp_upload_dir = wp_upload_dir();
|
|
|
|
|
|
|
163 |
|
164 |
+
if ( !$upload_dir ) {
|
165 |
+
$upload_dir = $wp_upload_dir['path'];
|
166 |
+
} else {
|
167 |
+
$upload_dir = trailingslashit( $wp_upload_dir['basedir'] ) . ltrim( $upload_dir, '/\\' );
|
168 |
+
$bool = wp_mkdir_p( $upload_dir );
|
169 |
}
|
170 |
|
171 |
if ( !$filename ) {
|
172 |
$filename = basename( $filepath );
|
173 |
}
|
174 |
+
|
175 |
+
if ( !preg_match( '/(\..+?)$/', $filename ) ) {
|
176 |
+
$extension = pathinfo( $filepath, PATHINFO_EXTENSION );
|
177 |
+
$filename = $filename . '.' . $extension;
|
178 |
+
}
|
179 |
+
$filename = sanitize_file_name( $filename );
|
180 |
$filename = wp_unique_filename( $upload_dir, $filename );
|
181 |
|
182 |
$new_filepath = trailingslashit( $upload_dir ) . $filename;
|
183 |
|
184 |
+
if ( $filepath == $new_filepath ) {
|
185 |
+
return $filepath;
|
186 |
+
}
|
187 |
+
|
188 |
// もし temp ファイルが存在しない場合、一応リネーム後のパスだけ返す
|
189 |
if ( !file_exists( $filepath ) ) {
|
190 |
return $new_filepath;
|
284 |
);
|
285 |
break;
|
286 |
case 'docx' :
|
287 |
+
$wp_check_filetype['type'] = array(
|
288 |
+
$wp_check_filetype['type'],
|
289 |
+
'application/zip',
|
290 |
+
'application/msword',
|
291 |
+
);
|
292 |
+
break;
|
293 |
case 'xlsx' :
|
294 |
+
$wp_check_filetype['type'] = array(
|
295 |
+
$wp_check_filetype['type'],
|
296 |
+
'application/zip',
|
297 |
+
'application/excel',
|
298 |
+
'application/msexcel',
|
299 |
+
'application/vnd.ms-excel',
|
300 |
+
);
|
301 |
+
break;
|
302 |
case 'pptx' :
|
303 |
$wp_check_filetype['type'] = array(
|
304 |
$wp_check_filetype['type'],
|
305 |
'application/zip',
|
306 |
+
'application/mspowerpoint',
|
307 |
+
'application/powerpoint',
|
308 |
+
'application/ppt',
|
309 |
);
|
310 |
break;
|
311 |
}
|
classes/models/class.abstract-form-field.php
CHANGED
@@ -14,7 +14,7 @@ abstract class MW_WP_Form_Abstract_Form_Field {
|
|
14 |
|
15 |
/**
|
16 |
* $shortcode_name
|
17 |
-
* @var string
|
18 |
*/
|
19 |
protected $shortcode_name;
|
20 |
|
14 |
|
15 |
/**
|
16 |
* $shortcode_name
|
17 |
+
* @var string
|
18 |
*/
|
19 |
protected $shortcode_name;
|
20 |
|
classes/models/class.csv.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form CSV
|
4 |
-
* Version : 1.0
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : April 3, 2015
|
8 |
-
* Modified :
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -28,7 +28,7 @@ class MW_WP_Form_CSV {
|
|
28 |
*/
|
29 |
public function download() {
|
30 |
$key_of_csv_download = MWF_Config::NAME . '-csv-download';
|
31 |
-
|
32 |
if ( !isset( $_POST[$key_of_csv_download] ) || !check_admin_referer( MWF_Config::NAME ) ) {
|
33 |
return;
|
34 |
}
|
@@ -117,15 +117,14 @@ class MW_WP_Form_CSV {
|
|
117 |
* @return array
|
118 |
*/
|
119 |
protected function get_csv_headings( array $posts ) {
|
120 |
-
$
|
121 |
-
'ID',
|
122 |
-
__( 'Response Status', 'mw-wp-form' ),
|
123 |
-
'post_date',
|
124 |
-
'post_modified',
|
125 |
-
'post_title'
|
126 |
);
|
127 |
-
$
|
128 |
-
$columns = array();
|
129 |
foreach ( $posts as $post ) {
|
130 |
$post_custom_keys = get_post_custom_keys( $post->ID );
|
131 |
if ( !is_array( $post_custom_keys ) ) {
|
@@ -136,17 +135,17 @@ class MW_WP_Form_CSV {
|
|
136 |
continue;
|
137 |
}
|
138 |
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
139 |
-
$
|
140 |
-
|
141 |
-
$column = $key;
|
142 |
}
|
143 |
-
$
|
144 |
}
|
145 |
}
|
146 |
-
ksort( $
|
147 |
-
$
|
148 |
-
$
|
149 |
-
|
|
|
150 |
}
|
151 |
|
152 |
/**
|
@@ -166,19 +165,19 @@ class MW_WP_Form_CSV {
|
|
166 |
$Contact_Data_Setting = new MW_WP_Form_Contact_Data_Setting( $post->ID );
|
167 |
$response_statuses = $Contact_Data_Setting->get_response_statuses();
|
168 |
$column = '';
|
169 |
-
if ( $
|
170 |
$response_status = $Contact_Data_Setting->get( 'response_status' );
|
171 |
$column = $response_statuses[$response_status];
|
172 |
-
} elseif ( $
|
173 |
$column = $Contact_Data_Setting->get( 'memo' );
|
174 |
-
} elseif ( $
|
175 |
$column = get_post_meta( get_the_ID(), MWF_Config::TRACKINGNUMBER, true );
|
176 |
-
} elseif ( isset( $post->$
|
177 |
-
$post_meta = $post->$
|
178 |
-
if ( $Contact_Data_Setting->is_upload_file_key( $post, $
|
179 |
// 過去バージョンでの不具合でメタデータが空になっていることがあるのでその場合は代替処理
|
180 |
if ( $post_meta === '' ) {
|
181 |
-
$post_meta = MWF_Functions::get_multimedia_id__fallback( $post, $
|
182 |
}
|
183 |
$column = wp_get_attachment_url( $post_meta );
|
184 |
} else {
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form CSV
|
4 |
+
* Version : 1.1.0
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : April 3, 2015
|
8 |
+
* Modified : March 26, 2016
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
28 |
*/
|
29 |
public function download() {
|
30 |
$key_of_csv_download = MWF_Config::NAME . '-csv-download';
|
31 |
+
|
32 |
if ( !isset( $_POST[$key_of_csv_download] ) || !check_admin_referer( MWF_Config::NAME ) ) {
|
33 |
return;
|
34 |
}
|
117 |
* @return array
|
118 |
*/
|
119 |
protected function get_csv_headings( array $posts ) {
|
120 |
+
$columns = array(
|
121 |
+
'ID' => 'ID',
|
122 |
+
'response_status' => __( 'Response Status', 'mw-wp-form' ),
|
123 |
+
'post_date' => 'post_date',
|
124 |
+
'post_modified' => 'post_modified',
|
125 |
+
'post_title' => 'post_title',
|
126 |
);
|
127 |
+
$_columns = array();
|
|
|
128 |
foreach ( $posts as $post ) {
|
129 |
$post_custom_keys = get_post_custom_keys( $post->ID );
|
130 |
if ( !is_array( $post_custom_keys ) ) {
|
135 |
continue;
|
136 |
}
|
137 |
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
138 |
+
$columns[$key] = MWF_Functions::get_tracking_number_title( $this->post_type );
|
139 |
+
continue;
|
|
|
140 |
}
|
141 |
+
$_columns[$key] = $key;
|
142 |
}
|
143 |
}
|
144 |
+
ksort( $_columns );
|
145 |
+
$_columns = apply_filters( 'mwform_inquiry_data_columns-' . $this->post_type, $_columns );
|
146 |
+
$columns = array_merge( $columns, $_columns );
|
147 |
+
$columns = array_merge( $columns, array( 'memo' => __( 'Memo', 'mw-wp-form' ) ) );
|
148 |
+
return $columns;
|
149 |
}
|
150 |
|
151 |
/**
|
165 |
$Contact_Data_Setting = new MW_WP_Form_Contact_Data_Setting( $post->ID );
|
166 |
$response_statuses = $Contact_Data_Setting->get_response_statuses();
|
167 |
$column = '';
|
168 |
+
if ( $key === 'response_status' ) {
|
169 |
$response_status = $Contact_Data_Setting->get( 'response_status' );
|
170 |
$column = $response_statuses[$response_status];
|
171 |
+
} elseif ( $key === 'memo' ) {
|
172 |
$column = $Contact_Data_Setting->get( 'memo' );
|
173 |
+
} elseif ( $key === MWF_Config::TRACKINGNUMBER ) {
|
174 |
$column = get_post_meta( get_the_ID(), MWF_Config::TRACKINGNUMBER, true );
|
175 |
+
} elseif ( isset( $post->$key ) ) {
|
176 |
+
$post_meta = $post->$key;
|
177 |
+
if ( $Contact_Data_Setting->is_upload_file_key( $post, $key ) ) {
|
178 |
// 過去バージョンでの不具合でメタデータが空になっていることがあるのでその場合は代替処理
|
179 |
if ( $post_meta === '' ) {
|
180 |
+
$post_meta = MWF_Functions::get_multimedia_id__fallback( $post, $key );
|
181 |
}
|
182 |
$column = wp_get_attachment_url( $post_meta );
|
183 |
} else {
|
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.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -60,7 +60,7 @@ class MW_WP_Form_Data {
|
|
60 |
$this->set_request_valiables( $this->POST );
|
61 |
$this->set_files_valiables( $this->POST, $this->FILES );
|
62 |
}
|
63 |
-
|
64 |
/**
|
65 |
* getInstance
|
66 |
*
|
@@ -84,7 +84,7 @@ class MW_WP_Form_Data {
|
|
84 |
}
|
85 |
exit( 'MW_WP_Form_Data instantiation error.' );
|
86 |
}
|
87 |
-
|
88 |
/**
|
89 |
* Return form key
|
90 |
*
|
@@ -158,7 +158,7 @@ class MW_WP_Form_Data {
|
|
158 |
*/
|
159 |
public function gets() {
|
160 |
if ( $this->data === null ) {
|
161 |
-
|
162 |
}
|
163 |
return $this->data;
|
164 |
}
|
@@ -225,7 +225,9 @@ class MW_WP_Form_Data {
|
|
225 |
* @return string|null
|
226 |
*/
|
227 |
public function get( $key, array $children = array() ) {
|
228 |
-
|
|
|
|
|
229 |
return;
|
230 |
}
|
231 |
|
@@ -239,8 +241,8 @@ class MW_WP_Form_Data {
|
|
239 |
}
|
240 |
}
|
241 |
|
242 |
-
if ( is_array( $
|
243 |
-
if ( !array_key_exists( 'data', $
|
244 |
return;
|
245 |
}
|
246 |
if ( $children ) {
|
@@ -262,10 +264,12 @@ class MW_WP_Form_Data {
|
|
262 |
* @return string|null
|
263 |
*/
|
264 |
public function get_raw( $key ) {
|
265 |
-
|
|
|
|
|
266 |
return;
|
267 |
}
|
268 |
-
if ( is_array( $
|
269 |
return;
|
270 |
}
|
271 |
|
@@ -281,8 +285,8 @@ class MW_WP_Form_Data {
|
|
281 |
}
|
282 |
}
|
283 |
}
|
284 |
-
|
285 |
-
if ( is_array( $
|
286 |
if ( $children ) {
|
287 |
return $this->get_separated_raw_value( $key, $children );
|
288 |
}
|
@@ -297,6 +301,9 @@ class MW_WP_Form_Data {
|
|
297 |
|
298 |
/**
|
299 |
* そのキーに紐づく送信データを取得(通常の value 以外に separator や data などが紐づく)
|
|
|
|
|
|
|
300 |
*/
|
301 |
public function get_post_value_by_key( $key ) {
|
302 |
if ( isset( $this->data[$key] ) ) {
|
@@ -467,6 +474,12 @@ class MW_WP_Form_Data {
|
|
467 |
*/
|
468 |
public function set_upload_file_keys() {
|
469 |
$upload_file_keys = $this->get_post_value_by_key( MWF_Config::UPLOAD_FILE_KEYS );
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
if ( !$upload_file_keys ) {
|
471 |
$upload_file_keys = array();
|
472 |
}
|
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 |
*/
|
60 |
$this->set_request_valiables( $this->POST );
|
61 |
$this->set_files_valiables( $this->POST, $this->FILES );
|
62 |
}
|
63 |
+
|
64 |
/**
|
65 |
* getInstance
|
66 |
*
|
84 |
}
|
85 |
exit( 'MW_WP_Form_Data instantiation error.' );
|
86 |
}
|
87 |
+
|
88 |
/**
|
89 |
* Return form key
|
90 |
*
|
158 |
*/
|
159 |
public function gets() {
|
160 |
if ( $this->data === null ) {
|
161 |
+
$this->data = array();
|
162 |
}
|
163 |
return $this->data;
|
164 |
}
|
225 |
* @return string|null
|
226 |
*/
|
227 |
public function get( $key, array $children = array() ) {
|
228 |
+
$post_value = $this->get_post_value_by_key( $key );
|
229 |
+
|
230 |
+
if ( is_null( $post_value ) ) {
|
231 |
return;
|
232 |
}
|
233 |
|
241 |
}
|
242 |
}
|
243 |
|
244 |
+
if ( is_array( $post_value ) ) {
|
245 |
+
if ( !array_key_exists( 'data', $post_value ) ) {
|
246 |
return;
|
247 |
}
|
248 |
if ( $children ) {
|
264 |
* @return string|null
|
265 |
*/
|
266 |
public function get_raw( $key ) {
|
267 |
+
$post_value = $this->get_post_value_by_key( $key );
|
268 |
+
|
269 |
+
if ( is_null( $post_value ) ) {
|
270 |
return;
|
271 |
}
|
272 |
+
if ( is_array( $post_value ) && !array_key_exists( 'data', $post_value ) ) {
|
273 |
return;
|
274 |
}
|
275 |
|
285 |
}
|
286 |
}
|
287 |
}
|
288 |
+
|
289 |
+
if ( is_array( $post_value ) ) {
|
290 |
if ( $children ) {
|
291 |
return $this->get_separated_raw_value( $key, $children );
|
292 |
}
|
301 |
|
302 |
/**
|
303 |
* そのキーに紐づく送信データを取得(通常の value 以外に separator や data などが紐づく)
|
304 |
+
*
|
305 |
+
* @param string $key name 属性値
|
306 |
+
* @return mixed
|
307 |
*/
|
308 |
public function get_post_value_by_key( $key ) {
|
309 |
if ( isset( $this->data[$key] ) ) {
|
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 |
}
|
classes/models/class.file.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form File
|
4 |
* Description: Tempディレクトリ、ファイルアップロードの処理を行うクラス
|
5 |
-
* Version : 1.0.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -105,7 +105,7 @@ class MW_WP_Form_File {
|
|
105 |
$upload_url = $temp_dir['url'];
|
106 |
if ( !is_writable( $temp_dir['dir'] ) ) {
|
107 |
$wp_upload_dir = wp_upload_dir();
|
108 |
-
$upload_dir =
|
109 |
$upload_url = $wp_upload_dir['url'];
|
110 |
}
|
111 |
|
@@ -130,7 +130,7 @@ class MW_WP_Form_File {
|
|
130 |
public function get_temp_dir() {
|
131 |
$wp_upload_dir = wp_upload_dir();
|
132 |
$temp_dir_name = '/' . MWF_Config::NAME . '_uploads';
|
133 |
-
$temp_dir['dir'] =
|
134 |
$temp_dir['url'] = $wp_upload_dir['baseurl'] . $temp_dir_name;
|
135 |
return $temp_dir;
|
136 |
}
|
2 |
/**
|
3 |
* Name : MW WP Form File
|
4 |
* Description: Tempディレクトリ、ファイルアップロードの処理を行うクラス
|
5 |
+
* Version : 1.0.8
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
+
* Modified : March 18, 2016
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
105 |
$upload_url = $temp_dir['url'];
|
106 |
if ( !is_writable( $temp_dir['dir'] ) ) {
|
107 |
$wp_upload_dir = wp_upload_dir();
|
108 |
+
$upload_dir = $wp_upload_dir['path'];
|
109 |
$upload_url = $wp_upload_dir['url'];
|
110 |
}
|
111 |
|
130 |
public function get_temp_dir() {
|
131 |
$wp_upload_dir = wp_upload_dir();
|
132 |
$temp_dir_name = '/' . MWF_Config::NAME . '_uploads';
|
133 |
+
$temp_dir['dir'] = $wp_upload_dir['basedir'] . $temp_dir_name;
|
134 |
$temp_dir['url'] = $wp_upload_dir['baseurl'] . $temp_dir_name;
|
135 |
return $temp_dir;
|
136 |
}
|
classes/models/class.form.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Form
|
4 |
* Description: フォームヘルパー
|
5 |
-
* Version : 1.8.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : September 25, 2012
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -539,7 +539,7 @@ class MW_WP_Form_Form {
|
|
539 |
'value' => '',
|
540 |
);
|
541 |
$options = array_merge( $defaults, $options );
|
542 |
-
|
543 |
$_options = $options;
|
544 |
unset( $_options['value'] );
|
545 |
$attributes = $this->generate_attributes( $_options );
|
@@ -727,7 +727,7 @@ class MW_WP_Form_Form {
|
|
727 |
$_ret .= sprintf(
|
728 |
'<script type="text/javascript">jQuery( function( $ ) { $("input[name=\'%s\']").datepicker( { %s } ); } );</script>',
|
729 |
esc_js( $name ),
|
730 |
-
$options['js']
|
731 |
);
|
732 |
return $_ret;
|
733 |
}
|
2 |
/**
|
3 |
* Name : MW WP Form Form
|
4 |
* Description: フォームヘルパー
|
5 |
+
* Version : 1.8.2
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : September 25, 2012
|
9 |
+
* Modified : March 26, 2016
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
539 |
'value' => '',
|
540 |
);
|
541 |
$options = array_merge( $defaults, $options );
|
542 |
+
|
543 |
$_options = $options;
|
544 |
unset( $_options['value'] );
|
545 |
$attributes = $this->generate_attributes( $_options );
|
727 |
$_ret .= sprintf(
|
728 |
'<script type="text/javascript">jQuery( function( $ ) { $("input[name=\'%s\']").datepicker( { %s } ); } );</script>',
|
729 |
esc_js( $name ),
|
730 |
+
trim( $options['js'], '{}' )
|
731 |
);
|
732 |
return $_ret;
|
733 |
}
|
classes/models/class.json-parser.php
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Name : MW WP Form Json Parser
|
4 |
+
* Description: ショートコードから渡される json を正しい形式に変換
|
5 |
+
* Version : 1.0.0
|
6 |
+
* Author : Takashi Kitajima
|
7 |
+
* Author URI : http://2inc.org
|
8 |
+
* Created : April 3, 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_Json_Parser {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* ショートコードから渡される json
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
protected $maybe_json;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* シングルクォーテーションの待ち状態
|
23 |
+
* @var bool
|
24 |
+
*/
|
25 |
+
protected $s_quote_stay = false;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* ダブルクォーテーションの待ち状態
|
29 |
+
* @var bool
|
30 |
+
*/
|
31 |
+
protected $d_quote_stay = false;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* コロンの待ち状態
|
35 |
+
* @var bool
|
36 |
+
*/
|
37 |
+
protected $colon_stay = true;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* 正しい json を生成するための配列の添字
|
41 |
+
* @var int
|
42 |
+
*/
|
43 |
+
protected $index = 0;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* セットする文字が json のキーにあたるのか値にあたるのかを識別するフラグ
|
47 |
+
* @var string key|value
|
48 |
+
*/
|
49 |
+
protected $key = 'key';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* json 生成用の配列
|
53 |
+
* @var array
|
54 |
+
*/
|
55 |
+
protected $temp = array();
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @param string $maybe_json json
|
59 |
+
*/
|
60 |
+
public function __construct( $maybe_json ) {
|
61 |
+
$this->maybe_json = $maybe_json;
|
62 |
+
$this->set_default_params();
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* 各プロパティの初期値を設定
|
67 |
+
*/
|
68 |
+
protected function set_default_params() {
|
69 |
+
$this->s_quote_stay = false;
|
70 |
+
$this->d_quote_stay = false;
|
71 |
+
$this->colon_stay = true;
|
72 |
+
$this->index = 0;
|
73 |
+
$this->key = 'key';
|
74 |
+
$this->temp = array();
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* 文字を json 生成用の配列に追加する
|
79 |
+
*
|
80 |
+
* @param string $character
|
81 |
+
*/
|
82 |
+
public function push_character( $character ) {
|
83 |
+
if ( !isset( $this->temp[$this->index][$this->key] ) ) {
|
84 |
+
$this->temp[$this->index][$this->key] = '';
|
85 |
+
}
|
86 |
+
$this->temp[$this->index][$this->key] .= $character;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* シングルクォーテーション用の処理
|
91 |
+
*/
|
92 |
+
protected function proccess_single_quote() {
|
93 |
+
if ( !$this->d_quote_stay ) {
|
94 |
+
if ( !$this->s_quote_stay ) {
|
95 |
+
$this->s_quote_stay = true;
|
96 |
+
} else {
|
97 |
+
$this->s_quote_stay = false;
|
98 |
+
}
|
99 |
+
} else {
|
100 |
+
$this->push_character( "'" );
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* ダブルクォーテーション用の処理
|
106 |
+
*/
|
107 |
+
protected function proccess_double_quote() {
|
108 |
+
if ( !$this->s_quote_stay ) {
|
109 |
+
if ( !$this->d_quote_stay ) {
|
110 |
+
$this->d_quote_stay = true;
|
111 |
+
} else {
|
112 |
+
$this->d_quote_stay = false;
|
113 |
+
}
|
114 |
+
} else {
|
115 |
+
$this->push_character( '"' );
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* カンマ用の処理
|
121 |
+
*/
|
122 |
+
protected function proccess_comma() {
|
123 |
+
if ( !$this->s_quote_stay || !$this->d_quote_stay ) {
|
124 |
+
$this->index ++;
|
125 |
+
$this->colon_stay = true;
|
126 |
+
$this->key = 'key';
|
127 |
+
} else {
|
128 |
+
$this->push_character( ':' );
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* コロン用の処理
|
134 |
+
*
|
135 |
+
* @param string $character
|
136 |
+
*/
|
137 |
+
protected function proccess_colon() {
|
138 |
+
if ( $this->colon_stay ) {
|
139 |
+
$this->colon_stay = false;
|
140 |
+
$this->key = 'value';
|
141 |
+
} else {
|
142 |
+
$this->push_character( ':' );
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* json 生成用の配列を元に json を返す
|
148 |
+
*
|
149 |
+
* @return json
|
150 |
+
*/
|
151 |
+
public function json_encode() {
|
152 |
+
$js = array();
|
153 |
+
foreach ( $this->temp as $param ) {
|
154 |
+
if ( !isset( $param['key'] ) ) {
|
155 |
+
continue;
|
156 |
+
}
|
157 |
+
$key = $param['key'];
|
158 |
+
$value = '';
|
159 |
+
if ( isset( $param['value'] ) ) {
|
160 |
+
$value = $param['value'];
|
161 |
+
}
|
162 |
+
$js[ trim( $key ) ] = trim( $value );
|
163 |
+
}
|
164 |
+
return json_encode( $js );
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* @return json
|
169 |
+
*/
|
170 |
+
public function create_json() {
|
171 |
+
$_js = trim( $this->maybe_json, '{}' );
|
172 |
+
$_js = preg_split( "//u", $_js, -1, PREG_SPLIT_NO_EMPTY );
|
173 |
+
|
174 |
+
foreach ( $_js as $character ) {
|
175 |
+
// シングルクォーテーション
|
176 |
+
if ( $character === "'" ) {
|
177 |
+
$this->proccess_single_quote();
|
178 |
+
}
|
179 |
+
// ダブルクォーテーション
|
180 |
+
elseif ( $character === '"' ) {
|
181 |
+
$this->proccess_double_quote();
|
182 |
+
}
|
183 |
+
// カンマ
|
184 |
+
elseif ( $character === ',' ) {
|
185 |
+
$this->proccess_comma();
|
186 |
+
}
|
187 |
+
// コロン
|
188 |
+
elseif ( $character === ':' ) {
|
189 |
+
$this->proccess_colon();
|
190 |
+
}
|
191 |
+
// その他の文字
|
192 |
+
else {
|
193 |
+
$this->push_character( $character );
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
$json = $this->json_encode();
|
198 |
+
$this->set_default_params();
|
199 |
+
return $json;
|
200 |
+
}
|
201 |
+
}
|
classes/services/class.exec-shortcode.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Exec Shortcode
|
4 |
-
* Version : 1.
|
5 |
* Description: ExecShortcode(mwform、mwform_formkey)の存在有無のチェックとそれらの抽象化レイヤー
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 31, 2014
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -205,10 +205,17 @@ class MW_WP_Form_Exec_Shortcode {
|
|
205 |
*/
|
206 |
protected function get_form_id_by_mwform_formkey( $attributes ) {
|
207 |
$attributes = shortcode_atts( array(
|
208 |
-
'key'
|
|
|
209 |
), $attributes );
|
210 |
-
|
211 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
return $post->ID;
|
213 |
}
|
214 |
}
|
@@ -318,7 +325,7 @@ class MW_WP_Form_Exec_Shortcode {
|
|
318 |
$post = get_post( $post_id );
|
319 |
setup_postdata( $post );
|
320 |
$content = apply_filters( 'mwform_post_content_raw_' . $form_key, get_the_content() );
|
321 |
-
|
322 |
$has_wpautop = false;
|
323 |
if ( has_filter( 'the_content', 'wpautop' ) ) {
|
324 |
$has_wpautop = true;
|
@@ -328,11 +335,11 @@ class MW_WP_Form_Exec_Shortcode {
|
|
328 |
$has_wpautop,
|
329 |
$this->view_flg
|
330 |
);
|
331 |
-
|
332 |
if ( $has_wpautop ) {
|
333 |
$content = wpautop( $content );
|
334 |
}
|
335 |
-
|
336 |
$content = sprintf(
|
337 |
'[mwform]%s[/mwform]',
|
338 |
apply_filters( 'mwform_post_content_' . $form_key, $content )
|
@@ -360,7 +367,7 @@ class MW_WP_Form_Exec_Shortcode {
|
|
360 |
$form_key = $this->get( 'key' );
|
361 |
$Setting = $this->Setting;
|
362 |
$content = $Setting->get( 'complete_message' );
|
363 |
-
|
364 |
$has_wpautop = false;
|
365 |
if ( has_filter( 'the_content', 'wpautop' ) ) {
|
366 |
$has_wpautop = true;
|
@@ -370,11 +377,11 @@ class MW_WP_Form_Exec_Shortcode {
|
|
370 |
$has_wpautop,
|
371 |
$this->view_flg
|
372 |
);
|
373 |
-
|
374 |
if ( $has_wpautop ) {
|
375 |
$content = wpautop( $content );
|
376 |
}
|
377 |
-
|
378 |
$content = sprintf(
|
379 |
'[mwform_complete_message]%s[/mwform_complete_message]',
|
380 |
$content
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Exec Shortcode
|
4 |
+
* Version : 1.2.0
|
5 |
* Description: ExecShortcode(mwform、mwform_formkey)の存在有無のチェックとそれらの抽象化レイヤー
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 31, 2014
|
9 |
+
* Modified : March 10, 2016
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
205 |
*/
|
206 |
protected function get_form_id_by_mwform_formkey( $attributes ) {
|
207 |
$attributes = shortcode_atts( array(
|
208 |
+
'key' => '',
|
209 |
+
'slug' => '',
|
210 |
), $attributes );
|
211 |
+
|
212 |
+
if ( !empty( $attributes['slug'] ) ) {
|
213 |
+
$post = get_page_by_path( $attributes['slug'], OBJECT, MWF_Config::NAME );
|
214 |
+
} elseif ( !empty( $attributes['key'] ) ) {
|
215 |
+
$post = get_post( $attributes['key'] );
|
216 |
+
}
|
217 |
+
|
218 |
+
if ( !empty( $post ) && isset( $post->ID ) ) {
|
219 |
return $post->ID;
|
220 |
}
|
221 |
}
|
325 |
$post = get_post( $post_id );
|
326 |
setup_postdata( $post );
|
327 |
$content = apply_filters( 'mwform_post_content_raw_' . $form_key, get_the_content() );
|
328 |
+
|
329 |
$has_wpautop = false;
|
330 |
if ( has_filter( 'the_content', 'wpautop' ) ) {
|
331 |
$has_wpautop = true;
|
335 |
$has_wpautop,
|
336 |
$this->view_flg
|
337 |
);
|
338 |
+
|
339 |
if ( $has_wpautop ) {
|
340 |
$content = wpautop( $content );
|
341 |
}
|
342 |
+
|
343 |
$content = sprintf(
|
344 |
'[mwform]%s[/mwform]',
|
345 |
apply_filters( 'mwform_post_content_' . $form_key, $content )
|
367 |
$form_key = $this->get( 'key' );
|
368 |
$Setting = $this->Setting;
|
369 |
$content = $Setting->get( 'complete_message' );
|
370 |
+
|
371 |
$has_wpautop = false;
|
372 |
if ( has_filter( 'the_content', 'wpautop' ) ) {
|
373 |
$has_wpautop = true;
|
377 |
$has_wpautop,
|
378 |
$this->view_flg
|
379 |
);
|
380 |
+
|
381 |
if ( $has_wpautop ) {
|
382 |
$content = wpautop( $content );
|
383 |
}
|
384 |
+
|
385 |
$content = sprintf(
|
386 |
'[mwform_complete_message]%s[/mwform_complete_message]',
|
387 |
$content
|
classes/services/class.mail-parser.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Parser
|
4 |
* Description: メールパーサー
|
5 |
-
* Version : 1.1.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : April 14, 2015
|
9 |
-
* Modified :
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -61,6 +61,7 @@ class MW_WP_Form_Mail_Parser {
|
|
61 |
// 添付ファイルをメディアに保存
|
62 |
// save_mail_body 内のフックで添付ファイルの情報を使えるように、
|
63 |
// save_mail_body より前にこのブロックを実行する
|
|
|
64 |
if ( !empty( $saved_mail_id ) ) {
|
65 |
MWF_Functions::save_attachments_in_media(
|
66 |
$saved_mail_id,
|
@@ -185,10 +186,11 @@ class MW_WP_Form_Mail_Parser {
|
|
185 |
}
|
186 |
|
187 |
// 値が null でも保存(チェッボックス未チェックで直送信でも保存させるため)
|
188 |
-
// ただし、画像の場合はURLが保存されないように調整がはいるため除外が必要
|
189 |
if ( $do_update ) {
|
190 |
$ignore_keys = apply_filters( 'mwform_no_save_keys_' . $form_key, array() );
|
191 |
if ( !in_array( $match, $ignore_keys ) ) {
|
|
|
|
|
192 |
if ( !array_key_exists( $match, $this->Mail->attachments ) ) {
|
193 |
update_post_meta( $this->saved_mail_id, $match, $value );
|
194 |
}
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Parser
|
4 |
* Description: メールパーサー
|
5 |
+
* Version : 1.1.1
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : April 14, 2015
|
9 |
+
* Modified : March 18, 2016
|
10 |
* License : GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
61 |
// 添付ファイルをメディアに保存
|
62 |
// save_mail_body 内のフックで添付ファイルの情報を使えるように、
|
63 |
// save_mail_body より前にこのブロックを実行する
|
64 |
+
// ここでポストメタとしてURLではなくファイルのIDを保存
|
65 |
if ( !empty( $saved_mail_id ) ) {
|
66 |
MWF_Functions::save_attachments_in_media(
|
67 |
$saved_mail_id,
|
186 |
}
|
187 |
|
188 |
// 値が null でも保存(チェッボックス未チェックで直送信でも保存させるため)
|
|
|
189 |
if ( $do_update ) {
|
190 |
$ignore_keys = apply_filters( 'mwform_no_save_keys_' . $form_key, array() );
|
191 |
if ( !in_array( $match, $ignore_keys ) ) {
|
192 |
+
// ファイルは MWF_Functions::save_attachments_in_media() で ID が保存されるため
|
193 |
+
// ここで送信された値(URL)は保存しない
|
194 |
if ( !array_key_exists( $match, $this->Mail->attachments ) ) {
|
195 |
update_post_meta( $this->saved_mail_id, $match, $value );
|
196 |
}
|
classes/services/class.mail.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Service
|
4 |
-
* Version : 1.3.
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
-
* Modified :
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -81,11 +81,6 @@ class MW_WP_Form_Mail_Service {
|
|
81 |
* 管理者メールの送信とデータベースへの保存
|
82 |
*/
|
83 |
public function send_admin_mail() {
|
84 |
-
// save_mail_body でファイルURLではなくファイルのIDが保存されるように
|
85 |
-
foreach ( $this->attachments as $key => $attachment ) {
|
86 |
-
$this->Data->clear_value( $key );
|
87 |
-
}
|
88 |
-
|
89 |
if ( $this->Setting->get( 'usedb' ) ) {
|
90 |
$Mail_admin = $this->get_parsed_mail_object( $this->Mail_admin_raw, true );
|
91 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Service
|
4 |
+
* Version : 1.3.1
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
+
* Modified : March 18, 2016
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
81 |
* 管理者メールの送信とデータベースへの保存
|
82 |
*/
|
83 |
public function send_admin_mail() {
|
|
|
|
|
|
|
|
|
|
|
84 |
if ( $this->Setting->get( 'usedb' ) ) {
|
85 |
$Mail_admin = $this->get_parsed_mail_object( $this->Mail_admin_raw, true );
|
86 |
|
css/style.css
CHANGED
@@ -1,27 +1,41 @@
|
|
1 |
@charset "utf-8";
|
2 |
|
|
|
|
|
|
|
3 |
.mw_wp_form .error {
|
4 |
font-size : 93%;
|
5 |
color : #B70000;
|
6 |
display : block;
|
7 |
}
|
8 |
|
|
|
|
|
|
|
9 |
.mw_wp_form .akismet_error {
|
10 |
display: block;
|
11 |
}
|
12 |
|
13 |
-
|
|
|
|
|
|
|
14 |
display: block;
|
15 |
}
|
16 |
-
.vertical-item
|
17 |
margin-top: 5px;
|
18 |
}
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
margin-left: 10px;
|
21 |
}
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
25 |
.mwform-checkbox-field label,
|
26 |
.mwform-radio-field label {
|
27 |
font-weight: normal;
|
@@ -32,12 +46,18 @@
|
|
32 |
margin-right: 5px;
|
33 |
}
|
34 |
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
37 |
width: 40%;
|
38 |
margin: 0 5px;
|
39 |
}
|
40 |
|
|
|
|
|
|
|
41 |
.mw-wp-form-deprecated-message {
|
42 |
background: #F5A9A9;
|
43 |
border: #B40404 solid 2px;
|
@@ -48,11 +68,24 @@
|
|
48 |
padding: 5px;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
.mwform-file-delete {
|
52 |
cursor: pointer;
|
53 |
visibility: hidden;
|
54 |
}
|
55 |
|
|
|
|
|
|
|
56 |
.mwform-tel-field input[type="text"],
|
57 |
.mwform-zip-field input[type="text"] {
|
58 |
display: inline-block;
|
1 |
@charset "utf-8";
|
2 |
|
3 |
+
/**
|
4 |
+
* error message
|
5 |
+
*/
|
6 |
.mw_wp_form .error {
|
7 |
font-size : 93%;
|
8 |
color : #B70000;
|
9 |
display : block;
|
10 |
}
|
11 |
|
12 |
+
/**
|
13 |
+
* error message of akismet
|
14 |
+
*/
|
15 |
.mw_wp_form .akismet_error {
|
16 |
display: block;
|
17 |
}
|
18 |
|
19 |
+
/**
|
20 |
+
* vertical style of radio and checkbox
|
21 |
+
*/
|
22 |
+
.mw_wp_form .vertical-item {
|
23 |
display: block;
|
24 |
}
|
25 |
+
.mw_wp_form .vertical-item + .vertical-item {
|
26 |
margin-top: 5px;
|
27 |
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* horizontal style of radio and checkbox
|
31 |
+
*/
|
32 |
+
.mw_wp_form .horizontal-item + .horizontal-item {
|
33 |
margin-left: 10px;
|
34 |
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* radio and checkbox
|
38 |
+
*/
|
39 |
.mwform-checkbox-field label,
|
40 |
.mwform-radio-field label {
|
41 |
font-weight: normal;
|
46 |
margin-right: 5px;
|
47 |
}
|
48 |
|
49 |
+
/**
|
50 |
+
* datepicker
|
51 |
+
*/
|
52 |
+
.mw_wp_form .ui-datepicker .ui-datepicker-title select.ui-datepicker-month,
|
53 |
+
.mw_wp_form .ui-datepicker .ui-datepicker-title select.ui-datepicker-year {
|
54 |
width: 40%;
|
55 |
margin: 0 5px;
|
56 |
}
|
57 |
|
58 |
+
/**
|
59 |
+
* deprecated message
|
60 |
+
*/
|
61 |
.mw-wp-form-deprecated-message {
|
62 |
background: #F5A9A9;
|
63 |
border: #B40404 solid 2px;
|
68 |
padding: 5px;
|
69 |
}
|
70 |
|
71 |
+
/**
|
72 |
+
* file
|
73 |
+
*/
|
74 |
+
.mw_wp_form input[type="file"] {
|
75 |
+
display: inline-block;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* file delete button
|
80 |
+
*/
|
81 |
.mwform-file-delete {
|
82 |
cursor: pointer;
|
83 |
visibility: hidden;
|
84 |
}
|
85 |
|
86 |
+
/**
|
87 |
+
* tel and zip
|
88 |
+
*/
|
89 |
.mwform-tel-field input[type="text"],
|
90 |
.mwform-zip-field input[type="text"] {
|
91 |
display: inline-block;
|
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.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
-
"PO-Revision-Date:
|
9 |
"Last-Translator: inc2734 <inc@2inc.org>\n"
|
10 |
"Language-Team: Takashi Kitajima <inc@2inc.org>\n"
|
11 |
"Language: ja\n"
|
@@ -69,8 +69,7 @@ msgid "Registed Date"
|
|
69 |
msgstr "登録日時"
|
70 |
|
71 |
#: classes/controllers/class.contact-data-list.php:118
|
72 |
-
#: classes/models/class.csv.php:122
|
73 |
-
#: templates/contact-data/detail.php:36
|
74 |
msgid "Response Status"
|
75 |
msgstr "対応状況"
|
76 |
|
@@ -151,7 +150,7 @@ msgid ""
|
|
151 |
msgstr "選択肢を「:」で送信値と表示値に分割したとき、送信値をメールで送信"
|
152 |
|
153 |
#: classes/form-fields/class.checkbox.php:141
|
154 |
-
#: classes/form-fields/class.datepicker.php:
|
155 |
#: classes/form-fields/class.email.php:127
|
156 |
#: classes/form-fields/class.hidden.php:84
|
157 |
#: classes/form-fields/class.password.php:119
|
@@ -178,7 +177,7 @@ msgid "Arranged vertically."
|
|
178 |
msgstr "垂直に配置する"
|
179 |
|
180 |
#: classes/form-fields/class.checkbox.php:156
|
181 |
-
#: classes/form-fields/class.datepicker.php:
|
182 |
#: classes/form-fields/class.email.php:137
|
183 |
#: classes/form-fields/class.file.php:122
|
184 |
#: classes/form-fields/class.image.php:126
|
@@ -194,7 +193,7 @@ msgid "Dsiplay error"
|
|
194 |
msgstr "エラー表示"
|
195 |
|
196 |
#: classes/form-fields/class.checkbox.php:158
|
197 |
-
#: classes/form-fields/class.datepicker.php:
|
198 |
#: classes/form-fields/class.email.php:139
|
199 |
#: classes/form-fields/class.file.php:124
|
200 |
#: classes/form-fields/class.image.php:128
|
@@ -218,6 +217,10 @@ msgstr "確認ボタン"
|
|
218 |
msgid "Confirm"
|
219 |
msgstr "確認画面へ"
|
220 |
|
|
|
|
|
|
|
|
|
221 |
#: classes/form-fields/class.datepicker.php:30
|
222 |
msgid "Datepicker"
|
223 |
msgstr "日付"
|
@@ -338,11 +341,11 @@ msgstr "URL フィールド"
|
|
338 |
msgid "Zip Code"
|
339 |
msgstr "郵便番号"
|
340 |
|
341 |
-
#: classes/functions.php:
|
342 |
msgid "Uploaded from "
|
343 |
msgstr "Uploaded from "
|
344 |
|
345 |
-
#: classes/functions.php:
|
346 |
msgid "Tracking Number"
|
347 |
msgstr "問い合わせ番号"
|
348 |
|
@@ -358,8 +361,7 @@ msgstr "保留"
|
|
358 |
msgid "Supported"
|
359 |
msgstr "対応済み"
|
360 |
|
361 |
-
#: classes/models/class.csv.php:
|
362 |
-
#: templates/contact-data/detail.php:48
|
363 |
msgid "Memo"
|
364 |
msgstr "メモ"
|
365 |
|
@@ -517,60 +519,60 @@ msgstr "URL"
|
|
517 |
msgid "This is not the format of a zip code."
|
518 |
msgstr "郵便番号の形式ではありません。"
|
519 |
|
520 |
-
#: mw-wp-form.php:
|
521 |
msgid "Chart"
|
522 |
msgstr "グラフ"
|
523 |
|
524 |
-
#: mw-wp-form.php:
|
525 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
526 |
msgid "Inquiry data"
|
527 |
msgstr "問い合わせデータ"
|
528 |
|
529 |
-
#: mw-wp-form.php:
|
530 |
msgid "Add New Form"
|
531 |
msgstr "フォームを追加"
|
532 |
|
533 |
-
#: mw-wp-form.php:
|
534 |
msgid "Edit Form"
|
535 |
msgstr "フォームを編集"
|
536 |
|
537 |
-
#: mw-wp-form.php:
|
538 |
msgid "New Form"
|
539 |
msgstr "新しいフォーム"
|
540 |
|
541 |
-
#: mw-wp-form.php:
|
542 |
msgid "View Form"
|
543 |
msgstr "フォームを表示"
|
544 |
|
545 |
-
#: mw-wp-form.php:
|
546 |
msgid "Search Forms"
|
547 |
msgstr "フォームを検索"
|
548 |
|
549 |
-
#: mw-wp-form.php:
|
550 |
msgid "No Forms found"
|
551 |
msgstr "フォームがありません"
|
552 |
|
553 |
-
#: mw-wp-form.php:
|
554 |
msgid "No Forms found in Trash"
|
555 |
msgstr "ゴミ箱にフォームはありません"
|
556 |
|
557 |
-
#: mw-wp-form.php:
|
558 |
msgid "Edit "
|
559 |
msgstr "編集"
|
560 |
|
561 |
-
#: mw-wp-form.php:
|
562 |
msgid "View"
|
563 |
msgstr "表示"
|
564 |
|
565 |
-
#: mw-wp-form.php:
|
566 |
msgid "Search"
|
567 |
msgstr "検索"
|
568 |
|
569 |
-
#: mw-wp-form.php:
|
570 |
msgid "No data found"
|
571 |
msgstr "データがありません"
|
572 |
|
573 |
-
#: mw-wp-form.php:
|
574 |
msgid "No data found in Trash"
|
575 |
msgstr "ゴミ箱にデータはありません"
|
576 |
|
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"
|
69 |
msgstr "登録日時"
|
70 |
|
71 |
#: classes/controllers/class.contact-data-list.php:118
|
72 |
+
#: classes/models/class.csv.php:122 templates/contact-data/detail.php:50
|
|
|
73 |
msgid "Response Status"
|
74 |
msgstr "対応状況"
|
75 |
|
150 |
msgstr "選択肢を「:」で送信値と表示値に分割したとき、送信値をメールで送信"
|
151 |
|
152 |
#: classes/form-fields/class.checkbox.php:141
|
153 |
+
#: classes/form-fields/class.datepicker.php:156
|
154 |
#: classes/form-fields/class.email.php:127
|
155 |
#: classes/form-fields/class.hidden.php:84
|
156 |
#: classes/form-fields/class.password.php:119
|
177 |
msgstr "垂直に配置する"
|
178 |
|
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
|
193 |
msgstr "エラー表示"
|
194 |
|
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
|
217 |
msgid "Confirm"
|
218 |
msgstr "確認画面へ"
|
219 |
|
220 |
+
#: classes/form-fields/class.custom-mail-tag.php:30
|
221 |
+
msgid "Custom Mail Tag"
|
222 |
+
msgstr "カスタムメールタグ"
|
223 |
+
|
224 |
#: classes/form-fields/class.datepicker.php:30
|
225 |
msgid "Datepicker"
|
226 |
msgstr "日付"
|
341 |
msgid "Zip Code"
|
342 |
msgstr "郵便番号"
|
343 |
|
344 |
+
#: classes/functions.php:226
|
345 |
msgid "Uploaded from "
|
346 |
msgstr "Uploaded from "
|
347 |
|
348 |
+
#: classes/functions.php:342
|
349 |
msgid "Tracking Number"
|
350 |
msgstr "問い合わせ番号"
|
351 |
|
361 |
msgid "Supported"
|
362 |
msgstr "対応済み"
|
363 |
|
364 |
+
#: classes/models/class.csv.php:147 templates/contact-data/detail.php:62
|
|
|
365 |
msgid "Memo"
|
366 |
msgstr "メモ"
|
367 |
|
519 |
msgid "This is not the format of a zip code."
|
520 |
msgstr "郵便番号の形式ではありません。"
|
521 |
|
522 |
+
#: mw-wp-form.php:168 mw-wp-form.php:169 templates/chart/index.php:4
|
523 |
msgid "Chart"
|
524 |
msgstr "グラフ"
|
525 |
|
526 |
+
#: mw-wp-form.php:197 mw-wp-form.php:198
|
527 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
528 |
msgid "Inquiry data"
|
529 |
msgstr "問い合わせデータ"
|
530 |
|
531 |
+
#: mw-wp-form.php:293
|
532 |
msgid "Add New Form"
|
533 |
msgstr "フォームを追加"
|
534 |
|
535 |
+
#: mw-wp-form.php:294
|
536 |
msgid "Edit Form"
|
537 |
msgstr "フォームを編集"
|
538 |
|
539 |
+
#: mw-wp-form.php:295
|
540 |
msgid "New Form"
|
541 |
msgstr "新しいフォーム"
|
542 |
|
543 |
+
#: mw-wp-form.php:296
|
544 |
msgid "View Form"
|
545 |
msgstr "フォームを表示"
|
546 |
|
547 |
+
#: mw-wp-form.php:297
|
548 |
msgid "Search Forms"
|
549 |
msgstr "フォームを検索"
|
550 |
|
551 |
+
#: mw-wp-form.php:298
|
552 |
msgid "No Forms found"
|
553 |
msgstr "フォームがありません"
|
554 |
|
555 |
+
#: mw-wp-form.php:299
|
556 |
msgid "No Forms found in Trash"
|
557 |
msgstr "ゴミ箱にフォームはありません"
|
558 |
|
559 |
+
#: mw-wp-form.php:316
|
560 |
msgid "Edit "
|
561 |
msgstr "編集"
|
562 |
|
563 |
+
#: mw-wp-form.php:317
|
564 |
msgid "View"
|
565 |
msgstr "表示"
|
566 |
|
567 |
+
#: mw-wp-form.php:318
|
568 |
msgid "Search"
|
569 |
msgstr "検索"
|
570 |
|
571 |
+
#: mw-wp-form.php:319
|
572 |
msgid "No data found"
|
573 |
msgstr "データがありません"
|
574 |
|
575 |
+
#: mw-wp-form.php:320
|
576 |
msgid "No data found in Trash"
|
577 |
msgstr "ゴミ箱にデータはありません"
|
578 |
|
languages/mw-wp-form.pot
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
# Copyright (C)
|
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.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date:
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
@@ -62,8 +62,7 @@ msgid "Registed Date"
|
|
62 |
msgstr ""
|
63 |
|
64 |
#: classes/controllers/class.contact-data-list.php:118
|
65 |
-
#: classes/models/class.csv.php:122
|
66 |
-
#: templates/contact-data/detail.php:36
|
67 |
msgid "Response Status"
|
68 |
msgstr ""
|
69 |
|
@@ -117,9 +116,7 @@ msgstr ""
|
|
117 |
#: classes/form-fields/class.checkbox.php:130
|
118 |
#: classes/form-fields/class.radio.php:126
|
119 |
#: classes/form-fields/class.select.php:122
|
120 |
-
msgid ""
|
121 |
-
"You can split the post value and display value by \":\". But display value "
|
122 |
-
"is sent in e-mail."
|
123 |
msgstr ""
|
124 |
|
125 |
#: classes/form-fields/class.checkbox.php:131
|
@@ -137,13 +134,11 @@ msgstr ""
|
|
137 |
#: classes/form-fields/class.checkbox.php:138
|
138 |
#: classes/form-fields/class.radio.php:134
|
139 |
#: classes/form-fields/class.select.php:130
|
140 |
-
msgid ""
|
141 |
-
"Send post value when you split the post value and display value by \":\" in "
|
142 |
-
"choices."
|
143 |
msgstr ""
|
144 |
|
145 |
#: classes/form-fields/class.checkbox.php:141
|
146 |
-
#: classes/form-fields/class.datepicker.php:
|
147 |
#: classes/form-fields/class.email.php:127
|
148 |
#: classes/form-fields/class.hidden.php:84
|
149 |
#: classes/form-fields/class.password.php:119
|
@@ -170,7 +165,7 @@ msgid "Arranged vertically."
|
|
170 |
msgstr ""
|
171 |
|
172 |
#: classes/form-fields/class.checkbox.php:156
|
173 |
-
#: classes/form-fields/class.datepicker.php:
|
174 |
#: classes/form-fields/class.email.php:137
|
175 |
#: classes/form-fields/class.file.php:122
|
176 |
#: classes/form-fields/class.image.php:126
|
@@ -179,15 +174,14 @@ msgstr ""
|
|
179 |
#: classes/form-fields/class.radio.php:147
|
180 |
#: classes/form-fields/class.range.php:126
|
181 |
#: classes/form-fields/class.select.php:138
|
182 |
-
#: classes/form-fields/class.tel.php:109
|
183 |
-
#: classes/form-fields/class.text.php:137
|
184 |
#: classes/form-fields/class.textarea.php:131
|
185 |
#: classes/form-fields/class.url.php:137 classes/form-fields/class.zip.php:108
|
186 |
msgid "Dsiplay error"
|
187 |
msgstr ""
|
188 |
|
189 |
#: classes/form-fields/class.checkbox.php:158
|
190 |
-
#: classes/form-fields/class.datepicker.php:
|
191 |
#: classes/form-fields/class.email.php:139
|
192 |
#: classes/form-fields/class.file.php:124
|
193 |
#: classes/form-fields/class.image.php:128
|
@@ -196,8 +190,7 @@ msgstr ""
|
|
196 |
#: classes/form-fields/class.radio.php:149
|
197 |
#: classes/form-fields/class.range.php:128
|
198 |
#: classes/form-fields/class.select.php:140
|
199 |
-
#: classes/form-fields/class.tel.php:111
|
200 |
-
#: classes/form-fields/class.text.php:139
|
201 |
#: classes/form-fields/class.textarea.php:133
|
202 |
#: classes/form-fields/class.url.php:139 classes/form-fields/class.zip.php:110
|
203 |
msgid "Don't display error."
|
@@ -212,6 +205,10 @@ msgstr ""
|
|
212 |
msgid "Confirm"
|
213 |
msgstr ""
|
214 |
|
|
|
|
|
|
|
|
|
215 |
#: classes/form-fields/class.datepicker.php:30
|
216 |
msgid "Datepicker"
|
217 |
msgstr ""
|
@@ -221,8 +218,7 @@ msgid "Email"
|
|
221 |
msgstr ""
|
222 |
|
223 |
#: classes/form-fields/class.email.php:142
|
224 |
-
#: classes/form-fields/class.tel.php:114
|
225 |
-
#: classes/form-fields/class.text.php:142
|
226 |
#: classes/form-fields/class.url.php:142 classes/form-fields/class.zip.php:113
|
227 |
msgid "Convert half alphanumeric"
|
228 |
msgstr ""
|
@@ -333,11 +329,11 @@ msgstr ""
|
|
333 |
msgid "Zip Code"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: classes/functions.php:
|
337 |
msgid "Uploaded from "
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: classes/functions.php:
|
341 |
msgid "Tracking Number"
|
342 |
msgstr ""
|
343 |
|
@@ -353,8 +349,7 @@ msgstr ""
|
|
353 |
msgid "Supported"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: classes/models/class.csv.php:
|
357 |
-
#: templates/contact-data/detail.php:48
|
358 |
msgid "Memo"
|
359 |
msgstr ""
|
360 |
|
@@ -512,60 +507,60 @@ msgstr ""
|
|
512 |
msgid "This is not the format of a zip code."
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: mw-wp-form.php:
|
516 |
msgid "Chart"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: mw-wp-form.php:
|
520 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
521 |
msgid "Inquiry data"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: mw-wp-form.php:
|
525 |
msgid "Add New Form"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: mw-wp-form.php:
|
529 |
msgid "Edit Form"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: mw-wp-form.php:
|
533 |
msgid "New Form"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: mw-wp-form.php:
|
537 |
msgid "View Form"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: mw-wp-form.php:
|
541 |
msgid "Search Forms"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: mw-wp-form.php:
|
545 |
msgid "No Forms found"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: mw-wp-form.php:
|
549 |
msgid "No Forms found in Trash"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: mw-wp-form.php:
|
553 |
msgid "Edit "
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: mw-wp-form.php:
|
557 |
msgid "View"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: mw-wp-form.php:
|
561 |
msgid "Search"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: mw-wp-form.php:
|
565 |
msgid "No data found"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: mw-wp-form.php:
|
569 |
msgid "No data found in Trash"
|
570 |
msgstr ""
|
571 |
|
@@ -586,9 +581,7 @@ msgid "It is automatically converted to Tracking number when you input {%s}."
|
|
586 |
msgstr ""
|
587 |
|
588 |
#: templates/admin/admin-mail-options.php:9
|
589 |
-
msgid ""
|
590 |
-
"If Admin Email Options is a blank, Automatic Replay Email Options is used as "
|
591 |
-
"Admin Email Options."
|
592 |
msgstr ""
|
593 |
|
594 |
#: templates/admin/admin-mail-options.php:12
|
@@ -610,8 +603,7 @@ msgstr ""
|
|
610 |
msgid "BCC ( E-mail address )"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: templates/admin/admin-mail-options.php:25
|
614 |
-
#: templates/admin/mail-options.php:9
|
615 |
msgid "Subject"
|
616 |
msgstr ""
|
617 |
|
@@ -643,9 +635,7 @@ msgid "Automatic reply email"
|
|
643 |
msgstr ""
|
644 |
|
645 |
#: templates/admin/mail-options.php:29
|
646 |
-
msgid ""
|
647 |
-
"Input the key to use as transmission to automatic reply email. {} is "
|
648 |
-
"unnecessary."
|
649 |
msgstr ""
|
650 |
|
651 |
#: templates/admin/settings.php:2
|
@@ -653,9 +643,7 @@ msgid "Activate Query string of post"
|
|
653 |
msgstr ""
|
654 |
|
655 |
#: templates/admin/settings.php:3
|
656 |
-
msgid ""
|
657 |
-
"If this field is active, MW WP Form get query string. And get post data from "
|
658 |
-
"query string \"post_id\". You can use $post's property in editor."
|
659 |
msgstr ""
|
660 |
|
661 |
#: templates/admin/settings.php:4
|
@@ -735,9 +723,7 @@ msgid "Validation Error Page URL"
|
|
735 |
msgstr ""
|
736 |
|
737 |
#: templates/admin/url.php:29
|
738 |
-
msgid ""
|
739 |
-
"This urls are the redirection urls at the time of button press. When URL "
|
740 |
-
"setting is empty, The page redirect on the same page."
|
741 |
msgstr ""
|
742 |
|
743 |
#: templates/admin/url.php:30
|
@@ -773,9 +759,7 @@ msgid "Bar chart"
|
|
773 |
msgstr ""
|
774 |
|
775 |
#: templates/chart/index.php:49
|
776 |
-
msgid ""
|
777 |
-
"Separator string (If the check box. If the separator attribute is not set to "
|
778 |
-
"\",\")"
|
779 |
msgstr ""
|
780 |
|
781 |
#: templates/chart/index.php:71
|
@@ -792,9 +776,7 @@ msgid "CSV Download"
|
|
792 |
msgstr ""
|
793 |
|
794 |
#: templates/stores-inquiry-data-form-list/index.php:4
|
795 |
-
msgid ""
|
796 |
-
"You can see the inquiry data that are saved in the database by clicking on "
|
797 |
-
"the link below."
|
798 |
msgstr ""
|
799 |
|
800 |
#: templates/stores-inquiry-data-form-list/index.php:8
|
@@ -817,7 +799,6 @@ msgstr ""
|
|
817 |
#: templates/stores-inquiry-data-form-list/index.php:19
|
818 |
msgid "cases"
|
819 |
msgstr ""
|
820 |
-
|
821 |
#. Plugin Name of the plugin/theme
|
822 |
msgid "MW WP Form"
|
823 |
msgstr ""
|
@@ -827,10 +808,7 @@ msgid "http://plugins.2inc.org/mw-wp-form/"
|
|
827 |
msgstr ""
|
828 |
|
829 |
#. Description of the plugin/theme
|
830 |
-
msgid ""
|
831 |
-
"MW WP Form is shortcode base contact form plugin. This plugin have many "
|
832 |
-
"feature. For example you can use many validation rules, contact data saving, "
|
833 |
-
"and chart aggregation using saved contact data."
|
834 |
msgstr ""
|
835 |
|
836 |
#. Author of the plugin/theme
|
1 |
+
# Copyright (C) 2016 MW WP Form
|
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 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"
|
11 |
+
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
62 |
msgstr ""
|
63 |
|
64 |
#: classes/controllers/class.contact-data-list.php:118
|
65 |
+
#: classes/models/class.csv.php:122 templates/contact-data/detail.php:50
|
|
|
66 |
msgid "Response Status"
|
67 |
msgstr ""
|
68 |
|
116 |
#: classes/form-fields/class.checkbox.php:130
|
117 |
#: classes/form-fields/class.radio.php:126
|
118 |
#: classes/form-fields/class.select.php:122
|
119 |
+
msgid "You can split the post value and display value by \":\". But display value is sent in e-mail."
|
|
|
|
|
120 |
msgstr ""
|
121 |
|
122 |
#: classes/form-fields/class.checkbox.php:131
|
134 |
#: classes/form-fields/class.checkbox.php:138
|
135 |
#: classes/form-fields/class.radio.php:134
|
136 |
#: classes/form-fields/class.select.php:130
|
137 |
+
msgid "Send post value when you split the post value and display value by \":\" in choices."
|
|
|
|
|
138 |
msgstr ""
|
139 |
|
140 |
#: classes/form-fields/class.checkbox.php:141
|
141 |
+
#: classes/form-fields/class.datepicker.php:156
|
142 |
#: classes/form-fields/class.email.php:127
|
143 |
#: classes/form-fields/class.hidden.php:84
|
144 |
#: classes/form-fields/class.password.php:119
|
165 |
msgstr ""
|
166 |
|
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
|
174 |
#: classes/form-fields/class.radio.php:147
|
175 |
#: classes/form-fields/class.range.php:126
|
176 |
#: classes/form-fields/class.select.php:138
|
177 |
+
#: classes/form-fields/class.tel.php:109 classes/form-fields/class.text.php:137
|
|
|
178 |
#: classes/form-fields/class.textarea.php:131
|
179 |
#: classes/form-fields/class.url.php:137 classes/form-fields/class.zip.php:108
|
180 |
msgid "Dsiplay error"
|
181 |
msgstr ""
|
182 |
|
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
|
190 |
#: classes/form-fields/class.radio.php:149
|
191 |
#: classes/form-fields/class.range.php:128
|
192 |
#: classes/form-fields/class.select.php:140
|
193 |
+
#: classes/form-fields/class.tel.php:111 classes/form-fields/class.text.php:139
|
|
|
194 |
#: classes/form-fields/class.textarea.php:133
|
195 |
#: classes/form-fields/class.url.php:139 classes/form-fields/class.zip.php:110
|
196 |
msgid "Don't display error."
|
205 |
msgid "Confirm"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: classes/form-fields/class.custom-mail-tag.php:30
|
209 |
+
msgid "Custom Mail Tag"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
#: classes/form-fields/class.datepicker.php:30
|
213 |
msgid "Datepicker"
|
214 |
msgstr ""
|
218 |
msgstr ""
|
219 |
|
220 |
#: classes/form-fields/class.email.php:142
|
221 |
+
#: classes/form-fields/class.tel.php:114 classes/form-fields/class.text.php:142
|
|
|
222 |
#: classes/form-fields/class.url.php:142 classes/form-fields/class.zip.php:113
|
223 |
msgid "Convert half alphanumeric"
|
224 |
msgstr ""
|
329 |
msgid "Zip Code"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: classes/functions.php:226
|
333 |
msgid "Uploaded from "
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: classes/functions.php:342
|
337 |
msgid "Tracking Number"
|
338 |
msgstr ""
|
339 |
|
349 |
msgid "Supported"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: classes/models/class.csv.php:147 templates/contact-data/detail.php:62
|
|
|
353 |
msgid "Memo"
|
354 |
msgstr ""
|
355 |
|
507 |
msgid "This is not the format of a zip code."
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: mw-wp-form.php:168 mw-wp-form.php:169 templates/chart/index.php:4
|
511 |
msgid "Chart"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: mw-wp-form.php:197 mw-wp-form.php:198
|
515 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
516 |
msgid "Inquiry data"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: mw-wp-form.php:293
|
520 |
msgid "Add New Form"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: mw-wp-form.php:294
|
524 |
msgid "Edit Form"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: mw-wp-form.php:295
|
528 |
msgid "New Form"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: mw-wp-form.php:296
|
532 |
msgid "View Form"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: mw-wp-form.php:297
|
536 |
msgid "Search Forms"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: mw-wp-form.php:298
|
540 |
msgid "No Forms found"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: mw-wp-form.php:299
|
544 |
msgid "No Forms found in Trash"
|
545 |
msgstr ""
|
546 |
|
547 |
+
#: mw-wp-form.php:316
|
548 |
msgid "Edit "
|
549 |
msgstr ""
|
550 |
|
551 |
+
#: mw-wp-form.php:317
|
552 |
msgid "View"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: mw-wp-form.php:318
|
556 |
msgid "Search"
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: mw-wp-form.php:319
|
560 |
msgid "No data found"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: mw-wp-form.php:320
|
564 |
msgid "No data found in Trash"
|
565 |
msgstr ""
|
566 |
|
581 |
msgstr ""
|
582 |
|
583 |
#: templates/admin/admin-mail-options.php:9
|
584 |
+
msgid "If Admin Email Options is a blank, Automatic Replay Email Options is used as Admin Email Options."
|
|
|
|
|
585 |
msgstr ""
|
586 |
|
587 |
#: templates/admin/admin-mail-options.php:12
|
603 |
msgid "BCC ( E-mail address )"
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: templates/admin/admin-mail-options.php:25 templates/admin/mail-options.php:9
|
|
|
607 |
msgid "Subject"
|
608 |
msgstr ""
|
609 |
|
635 |
msgstr ""
|
636 |
|
637 |
#: templates/admin/mail-options.php:29
|
638 |
+
msgid "Input the key to use as transmission to automatic reply email. {} is unnecessary."
|
|
|
|
|
639 |
msgstr ""
|
640 |
|
641 |
#: templates/admin/settings.php:2
|
643 |
msgstr ""
|
644 |
|
645 |
#: templates/admin/settings.php:3
|
646 |
+
msgid "If this field is active, MW WP Form get query string. And get post data from query string \"post_id\". You can use $post's property in editor."
|
|
|
|
|
647 |
msgstr ""
|
648 |
|
649 |
#: templates/admin/settings.php:4
|
723 |
msgstr ""
|
724 |
|
725 |
#: templates/admin/url.php:29
|
726 |
+
msgid "This urls are the redirection urls at the time of button press. When URL setting is empty, The page redirect on the same page."
|
|
|
|
|
727 |
msgstr ""
|
728 |
|
729 |
#: templates/admin/url.php:30
|
759 |
msgstr ""
|
760 |
|
761 |
#: templates/chart/index.php:49
|
762 |
+
msgid "Separator string (If the check box. If the separator attribute is not set to \",\")"
|
|
|
|
|
763 |
msgstr ""
|
764 |
|
765 |
#: templates/chart/index.php:71
|
776 |
msgstr ""
|
777 |
|
778 |
#: templates/stores-inquiry-data-form-list/index.php:4
|
779 |
+
msgid "You can see the inquiry data that are saved in the database by clicking on the link below."
|
|
|
|
|
780 |
msgstr ""
|
781 |
|
782 |
#: templates/stores-inquiry-data-form-list/index.php:8
|
799 |
#: templates/stores-inquiry-data-form-list/index.php:19
|
800 |
msgid "cases"
|
801 |
msgstr ""
|
|
|
802 |
#. Plugin Name of the plugin/theme
|
803 |
msgid "MW WP Form"
|
804 |
msgstr ""
|
808 |
msgstr ""
|
809 |
|
810 |
#. Description of the plugin/theme
|
811 |
+
msgid "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."
|
|
|
|
|
|
|
812 |
msgstr ""
|
813 |
|
814 |
#. Author of the plugin/theme
|
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.
|
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
|
@@ -108,6 +108,7 @@ class MW_WP_Form {
|
|
108 |
include_once( $plugin_dir_path . 'classes/models/class.session.php' );
|
109 |
include_once( $plugin_dir_path . 'classes/models/class.setting.php' );
|
110 |
include_once( $plugin_dir_path . 'classes/models/class.validation.php' );
|
|
|
111 |
include_once( $plugin_dir_path . 'classes/services/class.mail-parser.php' );
|
112 |
include_once( $plugin_dir_path . 'classes/services/class.exec-shortcode.php' );
|
113 |
include_once( $plugin_dir_path . 'classes/services/class.mail.php' );
|
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
|
108 |
include_once( $plugin_dir_path . 'classes/models/class.session.php' );
|
109 |
include_once( $plugin_dir_path . 'classes/models/class.setting.php' );
|
110 |
include_once( $plugin_dir_path . 'classes/models/class.validation.php' );
|
111 |
+
include_once( $plugin_dir_path . 'classes/models/class.json-parser.php' );
|
112 |
include_once( $plugin_dir_path . 'classes/services/class.mail-parser.php' );
|
113 |
include_once( $plugin_dir_path . 'classes/services/class.exec-shortcode.php' );
|
114 |
include_once( $plugin_dir_path . 'classes/services/class.mail.php' );
|
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 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -54,6 +54,7 @@ Source: https://developers.google.com/chart/
|
|
54 |
* [Kazuki Tomiyasu](http://visualive.jp/) ( [KUCKLU](https://profiles.wordpress.org/kuck1u/) )
|
55 |
* [Kei Nomura](http://mypacecreator.net/) ( [mypacecreator](https://profiles.wordpress.org/mypacecreator/) )
|
56 |
* [mh35](https://profiles.wordpress.org/mh35)
|
|
|
57 |
|
58 |
== Installation ==
|
59 |
|
@@ -78,6 +79,18 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
= 2.7.0 =
|
82 |
* Added : Added Method MW_WP_Form_Mail_Parser::get_saved_mail_id()
|
83 |
* Added : Added Method MW_WP_Form_Mail::get_saved_mail_id()
|
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 |
|
54 |
* [Kazuki Tomiyasu](http://visualive.jp/) ( [KUCKLU](https://profiles.wordpress.org/kuck1u/) )
|
55 |
* [Kei Nomura](http://mypacecreator.net/) ( [mypacecreator](https://profiles.wordpress.org/mypacecreator/) )
|
56 |
* [mh35](https://profiles.wordpress.org/mh35)
|
57 |
+
* [Takashi Nojima](https://github.com/nojimage)
|
58 |
|
59 |
== Installation ==
|
60 |
|
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
|
85 |
+
* Added : Added filter hook mwform_upload_file_keys_mw-wp-form-xxx
|
86 |
+
* Added : Added args of filter hook mwform_upload_dir_mw-wp-form-xxx and mwform_upload_filename_mw-wp-form-xxx
|
87 |
+
* Added : Added the Custom Mail Tag field. This field display value of mwform_custom_mail_tag_mw-wp-form-xxx.
|
88 |
+
* Bugfix : docx, xlsx, pptx upload bug fixed.
|
89 |
+
* Bugfix : Fixed a bug that the extension isn't added when using filter hook mwform_upload_filename_mw-wp-form-xxx.
|
90 |
+
* Changed : Sending the file url when saving in database and input {file key} and {image key} in the mail.
|
91 |
+
* Changed : Check of the js attribute of datepicker is now strictly. Property MUST be enclosed in double quotes.
|
92 |
+
* Changed : Changed the form token name.
|
93 |
+
|
94 |
= 2.7.0 =
|
95 |
* Added : Added Method MW_WP_Form_Mail_Parser::get_saved_mail_id()
|
96 |
* Added : Added Method MW_WP_Form_Mail::get_saved_mail_id()
|
templates/contact-data/detail.php
CHANGED
@@ -1,19 +1,32 @@
|
|
1 |
<input type="hidden" name="<?php echo esc_attr( MWF_Config::NAME ); ?>_nonce" value="<?php echo wp_create_nonce( MWF_Config::NAME ); ?>" />
|
2 |
<table border="0" cellpadding="0" cellspacing="0">
|
3 |
<?php
|
4 |
-
$
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
if ( in_array( $key, $Contact_Data_Setting->get_permit_keys() ) ) {
|
7 |
continue;
|
8 |
}
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<tr>
|
11 |
<th>
|
12 |
<?php
|
13 |
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
14 |
echo MWF_Functions::get_tracking_number_title( $post_type );
|
15 |
} else {
|
16 |
-
echo esc_html( $
|
17 |
}
|
18 |
?>
|
19 |
</th>
|
@@ -21,16 +34,17 @@
|
|
21 |
<?php
|
22 |
if ( $Contact_Data_Setting->is_upload_file_key( $post, $key ) ) {
|
23 |
// 過去バージョンでの不具合でメタデータが空になっていることがあるのでその場合は代替処理
|
24 |
-
if ( $
|
25 |
-
$
|
26 |
}
|
27 |
-
echo MWF_Functions::get_multimedia_data( $
|
28 |
} else {
|
29 |
-
echo nl2br( esc_html( $
|
30 |
}
|
31 |
?>
|
32 |
</td>
|
33 |
</tr>
|
|
|
34 |
<?php endforeach; ?>
|
35 |
<tr>
|
36 |
<th><?php esc_html_e( 'Response Status', 'mw-wp-form' ); ?></th>
|
@@ -48,4 +62,4 @@
|
|
48 |
<th><?php esc_html_e( 'Memo', 'mw-wp-form' ); ?></th>
|
49 |
<td><textarea name="<?php echo esc_attr( MWF_Config::CONTACT_DATA_NAME ); ?>[memo]" cols="50" rows="5"><?php echo $Contact_Data_Setting->get( 'memo' ); ?></textarea></td>
|
50 |
</tr>
|
51 |
-
</table>
|
1 |
<input type="hidden" name="<?php echo esc_attr( MWF_Config::NAME ); ?>_nonce" value="<?php echo wp_create_nonce( MWF_Config::NAME ); ?>" />
|
2 |
<table border="0" cellpadding="0" cellspacing="0">
|
3 |
<?php
|
4 |
+
$columns = array();
|
5 |
+
$values = $Contact_Data_Setting->gets();
|
6 |
+
$_columns = array();
|
7 |
+
foreach ( $values as $key => $value ) {
|
8 |
+
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
9 |
+
$columns[$key] = MWF_Functions::get_tracking_number_title( $post_type );
|
10 |
+
continue;
|
11 |
+
}
|
12 |
if ( in_array( $key, $Contact_Data_Setting->get_permit_keys() ) ) {
|
13 |
continue;
|
14 |
}
|
15 |
+
$_columns[$key] = $key;
|
16 |
+
}
|
17 |
+
$_columns = apply_filters( 'mwform_inquiry_data_columns-' . $post_type, $_columns );
|
18 |
+
$columns = array_merge( $columns, $_columns );
|
19 |
+
?>
|
20 |
+
|
21 |
+
<?php foreach ( $columns as $key => $label ) : ?>
|
22 |
+
<?php if ( isset( $values[$key] ) ) : ?>
|
23 |
<tr>
|
24 |
<th>
|
25 |
<?php
|
26 |
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
27 |
echo MWF_Functions::get_tracking_number_title( $post_type );
|
28 |
} else {
|
29 |
+
echo esc_html( $label );
|
30 |
}
|
31 |
?>
|
32 |
</th>
|
34 |
<?php
|
35 |
if ( $Contact_Data_Setting->is_upload_file_key( $post, $key ) ) {
|
36 |
// 過去バージョンでの不具合でメタデータが空になっていることがあるのでその場合は代替処理
|
37 |
+
if ( $values[$key] === '' ) {
|
38 |
+
$values[$key] = MWF_Functions::get_multimedia_id__fallback( $post, $key );
|
39 |
}
|
40 |
+
echo MWF_Functions::get_multimedia_data( $values[$key] );
|
41 |
} else {
|
42 |
+
echo nl2br( esc_html( $values[$key] ) );
|
43 |
}
|
44 |
?>
|
45 |
</td>
|
46 |
</tr>
|
47 |
+
<?php endif; ?>
|
48 |
<?php endforeach; ?>
|
49 |
<tr>
|
50 |
<th><?php esc_html_e( 'Response Status', 'mw-wp-form' ); ?></th>
|
62 |
<th><?php esc_html_e( 'Memo', 'mw-wp-form' ); ?></th>
|
63 |
<td><textarea name="<?php echo esc_attr( MWF_Config::CONTACT_DATA_NAME ); ?>[memo]" cols="50" rows="5"><?php echo $Contact_Data_Setting->get( 'memo' ); ?></textarea></td>
|
64 |
</tr>
|
65 |
+
</table>
|