Version Description
- Refactoring MW_WP_Form_Data Class.
- Added : Add MW_WP_Form_Mail_Parse class.
- Added : Add Tracking Number setting field.
- Added : Sender and From are written to the debug log.
- Bugfix : Fixed a bug that sometimes icon is not displayed in contact data list.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 2.4.5 |
Comparing to | |
See all releases |
Code changes from version 2.4.4 to 2.4.5
- classes/controllers/class.admin.php +10 -3
- classes/controllers/class.main.php +5 -5
- classes/functions.php +48 -11
- classes/models/class.abstract-form-field.php +4 -5
- classes/models/class.admin.php +8 -2
- classes/models/class.contact-data-setting.php +6 -6
- classes/models/class.data.php +18 -9
- classes/models/class.form.php +10 -10
- classes/models/class.mail.php +170 -3
- classes/models/class.setting.php +16 -7
- classes/models/class.validation.php +5 -4
- classes/services/class.exec-shortcode.php +5 -6
- classes/services/class.mail-parser.php +155 -0
- classes/services/class.mail.php +18 -258
- js/admin.js +13 -0
- languages/mw-wp-form-ja.mo +0 -0
- languages/mw-wp-form-ja.po +37 -29
- languages/mw-wp-form.pot +34 -26
- mw-wp-form.php +6 -5
- readme.txt +8 -1
- templates/admin/settings.php +7 -1
classes/controllers/class.admin.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Admin Controller
|
4 |
-
* Version : 1.1.
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : December 31, 2014
|
8 |
-
* Modified :
|
9 |
* License : GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -223,6 +223,7 @@ class MW_WP_Form_Admin_Controller extends MW_WP_Form_Controller {
|
|
223 |
$this->assign( 'akismet_author' , $this->get_option( 'akismet_author' ) );
|
224 |
$this->assign( 'akismet_author_email', $this->get_option( 'akismet_author_email' ) );
|
225 |
$this->assign( 'akismet_author_url' , $this->get_option( 'akismet_author_url' ) );
|
|
|
226 |
$this->render( 'admin/settings' );
|
227 |
}
|
228 |
|
@@ -270,7 +271,13 @@ class MW_WP_Form_Admin_Controller extends MW_WP_Form_Controller {
|
|
270 |
protected function get_option( $key ) {
|
271 |
global $post;
|
272 |
$Setting = new MW_WP_Form_Setting( $post->ID );
|
273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
if ( !is_null( $value ) ) {
|
275 |
return $value;
|
276 |
} else {
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Admin Controller
|
4 |
+
* Version : 1.1.1
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : December 31, 2014
|
8 |
+
* Modified : April 15, 2015
|
9 |
* License : GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
223 |
$this->assign( 'akismet_author' , $this->get_option( 'akismet_author' ) );
|
224 |
$this->assign( 'akismet_author_email', $this->get_option( 'akismet_author_email' ) );
|
225 |
$this->assign( 'akismet_author_url' , $this->get_option( 'akismet_author_url' ) );
|
226 |
+
$this->assign( 'tracking_number' , $this->get_option( MWF_Config::TRACKINGNUMBER ) );
|
227 |
$this->render( 'admin/settings' );
|
228 |
}
|
229 |
|
271 |
protected function get_option( $key ) {
|
272 |
global $post;
|
273 |
$Setting = new MW_WP_Form_Setting( $post->ID );
|
274 |
+
|
275 |
+
if ( $key === MWF_Config::TRACKINGNUMBER ) {
|
276 |
+
$value = $Setting->get_tracking_number();
|
277 |
+
} else {
|
278 |
+
$value = $Setting->get( $key );
|
279 |
+
}
|
280 |
+
|
281 |
if ( !is_null( $value ) ) {
|
282 |
return $value;
|
283 |
} else {
|
classes/controllers/class.main.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Main Controller
|
4 |
* Description: フロントエンドにおいて、適切な画面にリダイレクトさせる
|
5 |
-
* Version : 1.0.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 23, 2014
|
9 |
-
* Modified :
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -116,7 +116,7 @@ class MW_WP_Form_Main_Controller {
|
|
116 |
$Error = new MW_WP_Form_Error();
|
117 |
$this->Validation = new MW_WP_Form_Validation( $Error );
|
118 |
$this->Validation->set_validation_rules( $this->validation_rules );
|
119 |
-
$this->Validation->set_rules( $this->Setting
|
120 |
$this->Validation = apply_filters(
|
121 |
'mwform_validation_' . $form_key,
|
122 |
$this->Validation,
|
@@ -174,7 +174,7 @@ class MW_WP_Form_Main_Controller {
|
|
174 |
);
|
175 |
|
176 |
$Form = new MW_WP_Form_Form();
|
177 |
-
$this->ExecShortcode->add_shortcode( $view_flg, $this->Setting, $Form
|
178 |
|
179 |
add_action( 'wp_footer' , array( $this->Data, 'clear_values' ) );
|
180 |
add_action( 'wp_enqueue_scripts', array( $this , 'wp_enqueue_scripts' ) );
|
@@ -252,7 +252,7 @@ class MW_WP_Form_Main_Controller {
|
|
252 |
$Mail = new MW_WP_Form_Mail();
|
253 |
$form_key = $this->ExecShortcode->get( 'key' );
|
254 |
$attachments = $this->get_attachments();
|
255 |
-
$Mail_Service = new MW_WP_Form_Mail_Service( $Mail, $
|
256 |
|
257 |
// 管理画面で作成した場合だけ自動で送信
|
258 |
if ( $this->ExecShortcode->is_generated_by_formkey() ) {
|
2 |
/**
|
3 |
* Name : MW WP Form Main Controller
|
4 |
* Description: フロントエンドにおいて、適切な画面にリダイレクトさせる
|
5 |
+
* Version : 1.0.5
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 23, 2014
|
9 |
+
* Modified : April 15, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
116 |
$Error = new MW_WP_Form_Error();
|
117 |
$this->Validation = new MW_WP_Form_Validation( $Error );
|
118 |
$this->Validation->set_validation_rules( $this->validation_rules );
|
119 |
+
$this->Validation->set_rules( $this->Setting );
|
120 |
$this->Validation = apply_filters(
|
121 |
'mwform_validation_' . $form_key,
|
122 |
$this->Validation,
|
174 |
);
|
175 |
|
176 |
$Form = new MW_WP_Form_Form();
|
177 |
+
$this->ExecShortcode->add_shortcode( $view_flg, $this->Setting, $Form );
|
178 |
|
179 |
add_action( 'wp_footer' , array( $this->Data, 'clear_values' ) );
|
180 |
add_action( 'wp_enqueue_scripts', array( $this , 'wp_enqueue_scripts' ) );
|
252 |
$Mail = new MW_WP_Form_Mail();
|
253 |
$form_key = $this->ExecShortcode->get( 'key' );
|
254 |
$attachments = $this->get_attachments();
|
255 |
+
$Mail_Service = new MW_WP_Form_Mail_Service( $Mail, $form_key, $this->Setting, $attachments );
|
256 |
|
257 |
// 管理画面で作成した場合だけ自動で送信
|
258 |
if ( $this->ExecShortcode->is_generated_by_formkey() ) {
|
classes/functions.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MWF Functions
|
4 |
* Description: 関数
|
5 |
-
* Version : 1.4.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : May 29, 2013
|
9 |
-
* Modified :
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -180,7 +180,7 @@ class MWF_Functions {
|
|
180 |
* @param array ( ファイルのname属性値 => ファイルパス, … )
|
181 |
* @param int 生成フォーム(usedb)の post_id
|
182 |
*/
|
183 |
-
public static function save_attachments_in_media( $post_id, $attachments, $
|
184 |
require_once( ABSPATH . 'wp-admin' . '/includes/media.php' );
|
185 |
require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
|
186 |
$save_attached_key = array();
|
@@ -190,7 +190,7 @@ class MWF_Functions {
|
|
190 |
}
|
191 |
|
192 |
$wp_check_filetype = wp_check_filetype( $filepath );
|
193 |
-
$post_type = get_post_type_object(
|
194 |
$attachment = array(
|
195 |
'post_mime_type' => $wp_check_filetype['type'],
|
196 |
'post_title' => $key,
|
@@ -306,12 +306,49 @@ class MWF_Functions {
|
|
306 |
* @return string|null フォーム識別子
|
307 |
*/
|
308 |
public static function contact_data_post_type_to_form_key( $post_type ) {
|
309 |
-
if (
|
310 |
-
|
311 |
-
|
|
|
|
|
312 |
}
|
313 |
}
|
314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
/**
|
316 |
* 添付データを適切なHTMLに変換して返す
|
317 |
*
|
@@ -322,7 +359,7 @@ class MWF_Functions {
|
|
322 |
$mimetype = get_post_mime_type( $value );
|
323 |
if ( $mimetype ) {
|
324 |
// 画像だったら
|
325 |
-
if (
|
326 |
$src = wp_get_attachment_image_src( $value, 'thumbnail' );
|
327 |
return sprintf(
|
328 |
'<img src="%s" alt="" style="width:50px;height:50px" />',
|
@@ -331,11 +368,11 @@ class MWF_Functions {
|
|
331 |
}
|
332 |
// 画像以外
|
333 |
else {
|
334 |
-
$src =
|
335 |
return sprintf(
|
336 |
-
'<a href="%s" target="_blank"><img src="%s" alt="" style="height:
|
337 |
esc_url( wp_get_attachment_url( $value ) ),
|
338 |
-
esc_url( $src
|
339 |
);
|
340 |
}
|
341 |
}
|
2 |
/**
|
3 |
* Name : MWF Functions
|
4 |
* Description: 関数
|
5 |
+
* Version : 1.4.2
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : May 29, 2013
|
9 |
+
* Modified : April 14, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
180 |
* @param array ( ファイルのname属性値 => ファイルパス, … )
|
181 |
* @param int 生成フォーム(usedb)の post_id
|
182 |
*/
|
183 |
+
public static function save_attachments_in_media( $post_id, $attachments, $form_id ) {
|
184 |
require_once( ABSPATH . 'wp-admin' . '/includes/media.php' );
|
185 |
require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
|
186 |
$save_attached_key = array();
|
190 |
}
|
191 |
|
192 |
$wp_check_filetype = wp_check_filetype( $filepath );
|
193 |
+
$post_type = get_post_type_object( self::get_contact_data_post_type_from_form_id( $form_id ) );
|
194 |
$attachment = array(
|
195 |
'post_mime_type' => $wp_check_filetype['type'],
|
196 |
'post_title' => $key,
|
306 |
* @return string|null フォーム識別子
|
307 |
*/
|
308 |
public static function contact_data_post_type_to_form_key( $post_type ) {
|
309 |
+
if ( self::is_contact_data_post_type( $post_type ) ) {
|
310 |
+
if ( preg_match( '/(\d+)$/', $post_type, $match ) ) {
|
311 |
+
$form_key = self::get_form_key_from_form_id( $match[1] );
|
312 |
+
return $form_key;
|
313 |
+
}
|
314 |
}
|
315 |
}
|
316 |
|
317 |
+
/**
|
318 |
+
* フォームの投稿 ID をフォーム識別子に変換
|
319 |
+
*
|
320 |
+
* @param int $form_id
|
321 |
+
* @return string フォーム識別子
|
322 |
+
*/
|
323 |
+
public static function get_form_key_from_form_id( $form_id ) {
|
324 |
+
$form_key = MWF_Config::NAME . '-' . $form_id;
|
325 |
+
return $form_key;
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* フォームの投稿 ID を問い合わせデータの投稿タイプに変換
|
330 |
+
*
|
331 |
+
* @param int $form_id
|
332 |
+
* @return string フォーム識別子
|
333 |
+
*/
|
334 |
+
public static function get_contact_data_post_type_from_form_id( $form_id ) {
|
335 |
+
$contact_data_post_type = MWF_Config::DBDATA . $form_id;
|
336 |
+
return $contact_data_post_type;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* 問い合わせデータ投稿タイプかどうか
|
341 |
+
*
|
342 |
+
* @param string $post_type
|
343 |
+
* @return bool
|
344 |
+
*/
|
345 |
+
public static function is_contact_data_post_type( $post_type ) {
|
346 |
+
if ( preg_match( '/^' . MWF_Config::DBDATA . '\d+$/', $post_type ) ) {
|
347 |
+
return true;
|
348 |
+
}
|
349 |
+
return false;
|
350 |
+
}
|
351 |
+
|
352 |
/**
|
353 |
* 添付データを適切なHTMLに変換して返す
|
354 |
*
|
359 |
$mimetype = get_post_mime_type( $value );
|
360 |
if ( $mimetype ) {
|
361 |
// 画像だったら
|
362 |
+
if ( in_array( $mimetype, array( 'image/jpeg', 'image/gif', 'image/png', 'image/bmp' ) ) ) {
|
363 |
$src = wp_get_attachment_image_src( $value, 'thumbnail' );
|
364 |
return sprintf(
|
365 |
'<img src="%s" alt="" style="width:50px;height:50px" />',
|
368 |
}
|
369 |
// 画像以外
|
370 |
else {
|
371 |
+
$src = wp_mime_type_icon( $mimetype );
|
372 |
return sprintf(
|
373 |
+
'<a href="%s" target="_blank"><img src="%s" alt="" style="height:32px" /></a>',
|
374 |
esc_url( wp_get_attachment_url( $value ) ),
|
375 |
+
esc_url( $src )
|
376 |
);
|
377 |
}
|
378 |
}
|
classes/models/class.abstract-form-field.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Abstract Form Field
|
4 |
* Description: フォームフィールドの抽象クラス
|
5 |
-
* Version : 1.7.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
-
* Modified :
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -190,14 +190,13 @@ abstract class MW_WP_Form_Abstract_Form_Field {
|
|
190 |
* @param string $view_flg
|
191 |
* @param MW_WP_Form_Error $Error
|
192 |
* @param string $form_key
|
193 |
-
* @param MW_WP_Form_Data $Data
|
194 |
*/
|
195 |
-
public function add_shortcode( MW_WP_Form_Form $Form, $view_flg, MW_WP_Form_Error $Error, $form_key
|
196 |
if ( !empty( $this->shortcode_name ) ) {
|
197 |
$this->Form = $Form;
|
198 |
$this->Error = $Error;
|
199 |
$this->form_key = $form_key;
|
200 |
-
$this->Data =
|
201 |
switch( $view_flg ) {
|
202 |
case 'input' :
|
203 |
add_shortcode( $this->shortcode_name, array( $this, '_input_page' ) );
|
2 |
/**
|
3 |
* Name : MW WP Form Abstract Form Field
|
4 |
* Description: フォームフィールドの抽象クラス
|
5 |
+
* Version : 1.7.3
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
+
* Modified : April 15, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
190 |
* @param string $view_flg
|
191 |
* @param MW_WP_Form_Error $Error
|
192 |
* @param string $form_key
|
|
|
193 |
*/
|
194 |
+
public function add_shortcode( MW_WP_Form_Form $Form, $view_flg, MW_WP_Form_Error $Error, $form_key ) {
|
195 |
if ( !empty( $this->shortcode_name ) ) {
|
196 |
$this->Form = $Form;
|
197 |
$this->Error = $Error;
|
198 |
$this->form_key = $form_key;
|
199 |
+
$this->Data = MW_WP_Form_Data::getInstance();
|
200 |
switch( $view_flg ) {
|
201 |
case 'input' :
|
202 |
add_shortcode( $this->shortcode_name, array( $this, '_input_page' ) );
|
classes/models/class.admin.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Admin
|
4 |
* Description: 管理画面クラス
|
5 |
-
* Version : 2.0.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : February 21, 2013
|
9 |
-
* Modified :
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -84,6 +84,12 @@ class MW_WP_Form_Admin {
|
|
84 |
|
85 |
$Setting = new MW_WP_Form_Setting( $post_id );
|
86 |
$Setting->sets( $data );
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
$Setting->save();
|
88 |
}
|
89 |
|
2 |
/**
|
3 |
* Name : MW WP Form Admin
|
4 |
* Description: 管理画面クラス
|
5 |
+
* Version : 2.0.2
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : February 21, 2013
|
9 |
+
* Modified : April 15, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
84 |
|
85 |
$Setting = new MW_WP_Form_Setting( $post_id );
|
86 |
$Setting->sets( $data );
|
87 |
+
|
88 |
+
if ( isset( $_POST[MWF_Config::TRACKINGNUMBER] ) ) {
|
89 |
+
$tracking_number = $_POST[MWF_Config::TRACKINGNUMBER];
|
90 |
+
$Setting->update_tracking_number( $tracking_number );
|
91 |
+
}
|
92 |
+
|
93 |
$Setting->save();
|
94 |
}
|
95 |
|
classes/models/class.contact-data-setting.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Contact Data Setting
|
4 |
* Description: 管理画面クラス
|
5 |
-
* Version : 1.0.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : January 1, 2015
|
9 |
-
* Modified :
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -19,7 +19,7 @@ class MW_WP_Form_Contact_Data_Setting {
|
|
19 |
protected static $contact_data_post_types;
|
20 |
|
21 |
/**
|
22 |
-
*
|
23 |
* @var int
|
24 |
*/
|
25 |
protected $post_id;
|
@@ -54,7 +54,7 @@ class MW_WP_Form_Contact_Data_Setting {
|
|
54 |
* @param int $post_id
|
55 |
*/
|
56 |
public function __construct( $post_id ) {
|
57 |
-
if (
|
58 |
$this->post_id = $post_id;
|
59 |
$this->response_statuses = array(
|
60 |
'not-supported' => esc_html__( 'Not supported', MWF_Config::DOMAIN ),
|
@@ -196,7 +196,7 @@ class MW_WP_Form_Contact_Data_Setting {
|
|
196 |
$Admin = new MW_WP_Form_Admin();
|
197 |
$forms = $Admin->get_forms_using_database();
|
198 |
foreach ( $forms as $form ) {
|
199 |
-
$post_type =
|
200 |
$contact_data_post_types[] = $post_type;
|
201 |
}
|
202 |
$raw_post_types = $contact_data_post_types;
|
@@ -246,4 +246,4 @@ class MW_WP_Form_Contact_Data_Setting {
|
|
246 |
}
|
247 |
return $upload_file_keys;
|
248 |
}
|
249 |
-
}
|
2 |
/**
|
3 |
* Name : MW WP Form Contact Data Setting
|
4 |
* Description: 管理画面クラス
|
5 |
+
* Version : 1.0.2
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : January 1, 2015
|
9 |
+
* Modified : April 15, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
19 |
protected static $contact_data_post_types;
|
20 |
|
21 |
/**
|
22 |
+
* 保存された問い合わせデータの Post ID
|
23 |
* @var int
|
24 |
*/
|
25 |
protected $post_id;
|
54 |
* @param int $post_id
|
55 |
*/
|
56 |
public function __construct( $post_id ) {
|
57 |
+
if ( MWF_Functions::is_contact_data_post_type( get_post_type( $post_id ) ) ) {
|
58 |
$this->post_id = $post_id;
|
59 |
$this->response_statuses = array(
|
60 |
'not-supported' => esc_html__( 'Not supported', MWF_Config::DOMAIN ),
|
196 |
$Admin = new MW_WP_Form_Admin();
|
197 |
$forms = $Admin->get_forms_using_database();
|
198 |
foreach ( $forms as $form ) {
|
199 |
+
$post_type = MWF_Functions::get_contact_data_post_type_from_form_id( $form->ID );
|
200 |
$contact_data_post_types[] = $post_type;
|
201 |
}
|
202 |
$raw_post_types = $contact_data_post_types;
|
246 |
}
|
247 |
return $upload_file_keys;
|
248 |
}
|
249 |
+
}
|
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.3.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
-
* Modified :
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -64,15 +64,25 @@ class MW_WP_Form_Data {
|
|
64 |
/**
|
65 |
* getInstance
|
66 |
*
|
67 |
-
* @param string $form_key フォーム識別子
|
68 |
-
* @param array $POST $_POSTを想定
|
69 |
-
* @param array $FILES $_FILESを想定
|
70 |
*/
|
71 |
-
public static function getInstance( $form_key,
|
72 |
-
if ( is_null(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
self::$Instance = new self( $form_key, $POST, $FILES );
|
|
|
74 |
}
|
75 |
-
|
76 |
}
|
77 |
|
78 |
/**
|
@@ -264,7 +274,6 @@ class MW_WP_Form_Data {
|
|
264 |
|
265 |
/**
|
266 |
* そのキーに紐づく送信データを取得(通常の value 以外に separator や data などが紐づく)
|
267 |
-
* todo: post されてないデータを取得するときも使うから名前変更する
|
268 |
*/
|
269 |
public function get_post_value_by_key( $key ) {
|
270 |
if ( isset( $this->data[$key] ) ) {
|
2 |
/**
|
3 |
* Name : MW WP Form Data
|
4 |
* Description: MW WP Form のデータ操作用
|
5 |
+
* Version : 1.3.8
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
+
* Modified : April 15, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
64 |
/**
|
65 |
* getInstance
|
66 |
*
|
67 |
+
* @param null|string $form_key フォーム識別子
|
68 |
+
* @param null|array $POST $_POSTを想定
|
69 |
+
* @param null|array $FILES $_FILESを想定
|
70 |
*/
|
71 |
+
public static function getInstance( $form_key = null, $POST = null, $FILES = null ) {
|
72 |
+
if ( is_null( $POST ) || !is_array( $POST ) ) {
|
73 |
+
$POST = array();
|
74 |
+
}
|
75 |
+
if ( is_null( $FILES ) || !is_array( $FILES ) ) {
|
76 |
+
$FILES = array();
|
77 |
+
}
|
78 |
+
if ( is_null( $form_key ) && !is_null( self::$Instance ) ) {
|
79 |
+
return self::$Instance;
|
80 |
+
}
|
81 |
+
if ( !is_null( $form_key ) ) {
|
82 |
self::$Instance = new self( $form_key, $POST, $FILES );
|
83 |
+
return self::$Instance;
|
84 |
}
|
85 |
+
exit( 'MW_WP_Form_Data instantiation error.' );
|
86 |
}
|
87 |
|
88 |
/**
|
274 |
|
275 |
/**
|
276 |
* そのキーに紐づく送信データを取得(通常の value 以外に separator や data などが紐づく)
|
|
|
277 |
*/
|
278 |
public function get_post_value_by_key( $key ) {
|
279 |
if ( isset( $this->data[$key] ) ) {
|
classes/models/class.form.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Form
|
4 |
* Description: フォームヘルパー
|
5 |
-
* Version : 1.6.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : September 25, 2012
|
9 |
-
* Modified : April
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -23,7 +23,7 @@ class MW_WP_Form_Form {
|
|
23 |
'MW_WP_Form_Form::get_raw()',
|
24 |
'MW_WP_Form_Data::get_raw()'
|
25 |
);
|
26 |
-
$Data = MW_WP_Form_Data::getInstance(
|
27 |
return $Data->get_raw( $key );
|
28 |
}
|
29 |
|
@@ -39,7 +39,7 @@ class MW_WP_Form_Form {
|
|
39 |
'MW_WP_Form_Form::get_raw_in_children()',
|
40 |
'MW_WP_Form_Data::get_raw_in_children()'
|
41 |
);
|
42 |
-
$Data = MW_WP_Form_Data::getInstance(
|
43 |
return $Data->get_raw_in_children( $key, $children );
|
44 |
}
|
45 |
|
@@ -54,7 +54,7 @@ class MW_WP_Form_Form {
|
|
54 |
'MW_WP_Form_Form::get_zip_value()',
|
55 |
'MW_WP_Form_Data::get_separated_value()'
|
56 |
);
|
57 |
-
$Data = MW_WP_Form_Data::getInstance(
|
58 |
return $Data->get_separated_value( $key );
|
59 |
}
|
60 |
|
@@ -69,7 +69,7 @@ class MW_WP_Form_Form {
|
|
69 |
'MW_WP_Form_Form::get_tel_value()',
|
70 |
'MW_WP_Form_Data::get_separated_value()'
|
71 |
);
|
72 |
-
$Data = MW_WP_Form_Data::getInstance(
|
73 |
return $Data->get_separated_value( $key );
|
74 |
}
|
75 |
|
@@ -85,7 +85,7 @@ class MW_WP_Form_Form {
|
|
85 |
'MW_WP_Form_Form::get_checked_value()',
|
86 |
'MW_WP_Form_Data::get_separated_value()'
|
87 |
);
|
88 |
-
$Data = MW_WP_Form_Data::getInstance(
|
89 |
return $Data->get_separated_value( $key, $data );
|
90 |
}
|
91 |
|
@@ -101,7 +101,7 @@ class MW_WP_Form_Form {
|
|
101 |
'MW_WP_Form_Form::get_radio_value()',
|
102 |
'MW_WP_Form_Data::get_in_children()'
|
103 |
);
|
104 |
-
$Data = MW_WP_Form_Data::getInstance(
|
105 |
return $Data->get_in_children( $key, $data );
|
106 |
}
|
107 |
|
@@ -117,7 +117,7 @@ class MW_WP_Form_Form {
|
|
117 |
'MW_WP_Form_Form::get_selected_value()',
|
118 |
'MW_WP_Form_Data::get_in_children()'
|
119 |
);
|
120 |
-
$Data = MW_WP_Form_Data::getInstance(
|
121 |
return $Data->get_in_children( $key, $data );
|
122 |
}
|
123 |
|
@@ -133,7 +133,7 @@ class MW_WP_Form_Form {
|
|
133 |
'MW_WP_Form_Form::get_separated_raw_value()',
|
134 |
'MW_WP_Form_Data::get_separated_raw_value()'
|
135 |
);
|
136 |
-
$Data = MW_WP_Form_Data::getInstance(
|
137 |
return $Data->get_separated_raw_value( $key, $children );
|
138 |
}
|
139 |
|
2 |
/**
|
3 |
* Name : MW WP Form Form
|
4 |
* Description: フォームヘルパー
|
5 |
+
* Version : 1.6.2
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : September 25, 2012
|
9 |
+
* Modified : April 15, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
23 |
'MW_WP_Form_Form::get_raw()',
|
24 |
'MW_WP_Form_Data::get_raw()'
|
25 |
);
|
26 |
+
$Data = MW_WP_Form_Data::getInstance();
|
27 |
return $Data->get_raw( $key );
|
28 |
}
|
29 |
|
39 |
'MW_WP_Form_Form::get_raw_in_children()',
|
40 |
'MW_WP_Form_Data::get_raw_in_children()'
|
41 |
);
|
42 |
+
$Data = MW_WP_Form_Data::getInstance();
|
43 |
return $Data->get_raw_in_children( $key, $children );
|
44 |
}
|
45 |
|
54 |
'MW_WP_Form_Form::get_zip_value()',
|
55 |
'MW_WP_Form_Data::get_separated_value()'
|
56 |
);
|
57 |
+
$Data = MW_WP_Form_Data::getInstance();
|
58 |
return $Data->get_separated_value( $key );
|
59 |
}
|
60 |
|
69 |
'MW_WP_Form_Form::get_tel_value()',
|
70 |
'MW_WP_Form_Data::get_separated_value()'
|
71 |
);
|
72 |
+
$Data = MW_WP_Form_Data::getInstance();
|
73 |
return $Data->get_separated_value( $key );
|
74 |
}
|
75 |
|
85 |
'MW_WP_Form_Form::get_checked_value()',
|
86 |
'MW_WP_Form_Data::get_separated_value()'
|
87 |
);
|
88 |
+
$Data = MW_WP_Form_Data::getInstance();
|
89 |
return $Data->get_separated_value( $key, $data );
|
90 |
}
|
91 |
|
101 |
'MW_WP_Form_Form::get_radio_value()',
|
102 |
'MW_WP_Form_Data::get_in_children()'
|
103 |
);
|
104 |
+
$Data = MW_WP_Form_Data::getInstance();
|
105 |
return $Data->get_in_children( $key, $data );
|
106 |
}
|
107 |
|
117 |
'MW_WP_Form_Form::get_selected_value()',
|
118 |
'MW_WP_Form_Data::get_in_children()'
|
119 |
);
|
120 |
+
$Data = MW_WP_Form_Data::getInstance();
|
121 |
return $Data->get_in_children( $key, $data );
|
122 |
}
|
123 |
|
133 |
'MW_WP_Form_Form::get_separated_raw_value()',
|
134 |
'MW_WP_Form_Data::get_separated_raw_value()'
|
135 |
);
|
136 |
+
$Data = MW_WP_Form_Data::getInstance();
|
137 |
return $Data->get_separated_raw_value( $key, $children );
|
138 |
}
|
139 |
|
classes/models/class.mail.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Mail
|
4 |
* Description: メールクラス
|
5 |
-
* Version : 1.5.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : July 20, 2012
|
9 |
-
* Modified :
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -68,6 +68,8 @@ class MW_WP_Form_Mail {
|
|
68 |
return;
|
69 |
}
|
70 |
|
|
|
|
|
71 |
$subject = $this->subject;
|
72 |
$body = $this->body;
|
73 |
|
@@ -77,6 +79,7 @@ class MW_WP_Form_Mail {
|
|
77 |
|
78 |
if ( defined( 'MWFORM_DEBUG' ) && MWFORM_DEBUG === true ) {
|
79 |
$File = new MW_WP_Form_File();
|
|
|
80 |
$temp_dir = $File->get_temp_dir();
|
81 |
$temp_dir = trailingslashit( $temp_dir['dir'] );
|
82 |
$temp_dir = apply_filters( 'mwform_log_directory', $temp_dir );
|
@@ -94,9 +97,11 @@ class MW_WP_Form_Mail {
|
|
94 |
$to = trim( $to );
|
95 |
if ( !empty( $File ) ) {
|
96 |
$contents = sprintf(
|
97 |
-
"====================\n\nSend Date: %s\nTo: %s\nSubject: %s\nheaders:%s\n-----\n%s\n-----\nattachments:\n%s\n\n",
|
98 |
date( 'M j Y, H:i:s' ),
|
99 |
$to,
|
|
|
|
|
100 |
$subject,
|
101 |
implode( "\n", $headers ),
|
102 |
$body,
|
@@ -178,4 +183,166 @@ class MW_WP_Form_Mail {
|
|
178 |
}
|
179 |
return $_ret;
|
180 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}
|
2 |
/**
|
3 |
* Name : MW WP Form Mail
|
4 |
* Description: メールクラス
|
5 |
+
* Version : 1.5.1
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : July 20, 2012
|
9 |
+
* Modified : April 14, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
68 |
return;
|
69 |
}
|
70 |
|
71 |
+
$sender = $this->sender;
|
72 |
+
$from = $this->from;
|
73 |
$subject = $this->subject;
|
74 |
$body = $this->body;
|
75 |
|
79 |
|
80 |
if ( defined( 'MWFORM_DEBUG' ) && MWFORM_DEBUG === true ) {
|
81 |
$File = new MW_WP_Form_File();
|
82 |
+
$File->create_temp_dir();
|
83 |
$temp_dir = $File->get_temp_dir();
|
84 |
$temp_dir = trailingslashit( $temp_dir['dir'] );
|
85 |
$temp_dir = apply_filters( 'mwform_log_directory', $temp_dir );
|
97 |
$to = trim( $to );
|
98 |
if ( !empty( $File ) ) {
|
99 |
$contents = sprintf(
|
100 |
+
"====================\n\nSend Date: %s\nTo: %s\nSender: %s\nFrom: %s\nSubject: %s\nheaders:%s\n-----\n%s\n-----\nattachments:\n%s\n\n",
|
101 |
date( 'M j Y, H:i:s' ),
|
102 |
$to,
|
103 |
+
$sender,
|
104 |
+
$from,
|
105 |
$subject,
|
106 |
implode( "\n", $headers ),
|
107 |
$body,
|
183 |
}
|
184 |
return $_ret;
|
185 |
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* 管理者メール用に初期値を設定
|
189 |
+
*
|
190 |
+
* @param MW_WP_Form_Setting $Setting
|
191 |
+
*/
|
192 |
+
public function set_admin_mail_raw_params( MW_WP_Form_Setting $Setting ) {
|
193 |
+
// タイトルを指定
|
194 |
+
$admin_mail_subject = $Setting->get( 'mail_subject' );
|
195 |
+
if ( $Setting->get( 'admin_mail_subject' ) ) {
|
196 |
+
$admin_mail_subject = $Setting->get( 'admin_mail_subject' );
|
197 |
+
}
|
198 |
+
$this->subject = $admin_mail_subject;
|
199 |
+
|
200 |
+
// 本文を指定
|
201 |
+
$admin_mail_content = $Setting->get( 'mail_content' );
|
202 |
+
if ( $Setting->get( 'admin_mail_content' ) ) {
|
203 |
+
$admin_mail_content = $Setting->get( 'admin_mail_content' );
|
204 |
+
}
|
205 |
+
$this->body = $admin_mail_content;
|
206 |
+
|
207 |
+
// 送信先を指定
|
208 |
+
$admin_mail_to = get_bloginfo( 'admin_email' );
|
209 |
+
if ( $Setting->get( 'mail_to' ) ) {
|
210 |
+
$admin_mail_to = $Setting->get( 'mail_to' );
|
211 |
+
}
|
212 |
+
$this->to = $admin_mail_to;
|
213 |
+
|
214 |
+
// CCを指定
|
215 |
+
$admin_mail_cc = '';
|
216 |
+
if ( $Setting->get( 'mail_cc' ) ) {
|
217 |
+
$admin_mail_cc = $Setting->get( 'mail_cc' );
|
218 |
+
}
|
219 |
+
$this->cc = $admin_mail_cc;
|
220 |
+
|
221 |
+
// BCCを指定
|
222 |
+
$admin_mail_bcc = '';
|
223 |
+
if ( $Setting->get( 'mail_bcc' ) ) {
|
224 |
+
$admin_mail_bcc = $Setting->get( 'mail_bcc' );
|
225 |
+
}
|
226 |
+
$this->bcc = $admin_mail_bcc;
|
227 |
+
|
228 |
+
// 送信元を指定
|
229 |
+
$admin_mail_from = get_bloginfo( 'admin_email' );
|
230 |
+
if ( $Setting->get( 'mail_from' ) ) {
|
231 |
+
$admin_mail_from = $Setting->get( 'mail_from' );
|
232 |
+
}
|
233 |
+
if ( $Setting->get( 'admin_mail_from' ) ) {
|
234 |
+
$admin_mail_from = $Setting->get( 'admin_mail_from' );
|
235 |
+
}
|
236 |
+
$this->from = $admin_mail_from;
|
237 |
+
|
238 |
+
// 送信者を指定
|
239 |
+
$admin_mail_sender = get_bloginfo( 'name' );
|
240 |
+
if ( $Setting->get( 'mail_sender' ) ) {
|
241 |
+
$admin_mail_sender = $Setting->get( 'mail_sender' );
|
242 |
+
}
|
243 |
+
if ( $Setting->get( 'admin_mail_sender' ) ) {
|
244 |
+
$admin_mail_sender = $Setting->get( 'admin_mail_sender' );
|
245 |
+
}
|
246 |
+
$this->sender = $admin_mail_sender;
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* 自動返信メール用に初期値を設定
|
251 |
+
*
|
252 |
+
* @param MW_WP_Form_Setting $Setting
|
253 |
+
*/
|
254 |
+
public function set_reply_mail_raw_params( MW_WP_Form_Setting $Setting ) {
|
255 |
+
$this->to = '';
|
256 |
+
$this->cc = '';
|
257 |
+
$this->bcc = '';
|
258 |
+
|
259 |
+
$Data = MW_WP_Form_Data::getInstance();
|
260 |
+
$automatic_reply_email = $Setting->get( 'automatic_reply_email' );
|
261 |
+
|
262 |
+
// 自動返信メールからは添付ファイルを削除
|
263 |
+
$this->attachments = array();
|
264 |
+
$form_id = $Setting->get( 'post_id' );
|
265 |
+
if ( $form_id ) {
|
266 |
+
$Validation = new MW_WP_Form_Validation_Rule_Mail();
|
267 |
+
$Validation->set_Data( $Data );
|
268 |
+
$is_invalid_mail_address = $Validation->rule(
|
269 |
+
$automatic_reply_email
|
270 |
+
);
|
271 |
+
|
272 |
+
// 送信先を指定
|
273 |
+
if ( $automatic_reply_email && !$is_invalid_mail_address ) {
|
274 |
+
$this->to = $Data->get_post_value_by_key( $automatic_reply_email );
|
275 |
+
}
|
276 |
+
|
277 |
+
// 送信元を指定
|
278 |
+
$reply_mail_from = get_bloginfo( 'admin_email' );
|
279 |
+
if ( $Setting->get( 'mail_from' ) ) {
|
280 |
+
$reply_mail_from = $Setting->get( 'mail_from' );
|
281 |
+
}
|
282 |
+
$this->from = $reply_mail_from;
|
283 |
+
|
284 |
+
// 送信者を指定
|
285 |
+
$reply_mail_sender = get_bloginfo( 'name' );
|
286 |
+
if ( $Setting->get( 'mail_sender' ) ) {
|
287 |
+
$reply_mail_sender = $Setting->get( 'mail_sender' );
|
288 |
+
}
|
289 |
+
$this->sender = $reply_mail_sender;
|
290 |
+
|
291 |
+
// タイトルを指定
|
292 |
+
$this->subject = $Setting->get( 'mail_subject' );
|
293 |
+
|
294 |
+
// 本文を指定
|
295 |
+
$this->body = $Setting->get( 'mail_content' );
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* 管理者メールに必須の項目を設定
|
301 |
+
*/
|
302 |
+
public function set_admin_mail_reaquire_params() {
|
303 |
+
$admin_mail_to = get_bloginfo( 'admin_email' );
|
304 |
+
$admin_mail_from = get_bloginfo( 'admin_email' );
|
305 |
+
$admin_mail_sender = get_bloginfo( 'name' );
|
306 |
+
|
307 |
+
if ( !$this->to ) {
|
308 |
+
$this->to = $admin_mail_to;
|
309 |
+
}
|
310 |
+
if ( !$this->from ) {
|
311 |
+
$this->from = $admin_mail_from;;
|
312 |
+
}
|
313 |
+
if ( !$this->sender ) {
|
314 |
+
$this->sender = $admin_mail_sender;;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* 自動返信メールに必須の項目を設定
|
320 |
+
*/
|
321 |
+
public function set_reply_mail_reaquire_params() {
|
322 |
+
$reply_mail_from = get_bloginfo( 'admin_email' );
|
323 |
+
$reply_mail_sender = get_bloginfo( 'name' );
|
324 |
+
|
325 |
+
if ( !$this->from ) {
|
326 |
+
$this->from = $reply_mail_from;;
|
327 |
+
}
|
328 |
+
if ( !$this->sender ) {
|
329 |
+
$this->sender = $reply_mail_sender;;
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* メールを送信内容に置換
|
335 |
+
*
|
336 |
+
* @param MW_WP_Form_Setting $Setting
|
337 |
+
* @param bool $do_update
|
338 |
+
*/
|
339 |
+
public function parse( $Setting, $do_update = false ) {
|
340 |
+
$Data = MW_WP_Form_Data::getInstance();
|
341 |
+
|
342 |
+
$Mail_Parser = new MW_WP_Form_Mail_Parser( $this, $Setting );
|
343 |
+
$Mail = $Mail_Parser->get_parsed_mail_object( $do_update );
|
344 |
+
foreach ( get_object_vars( $Mail ) as $key => $value ) {
|
345 |
+
$this->$key = $value;
|
346 |
+
}
|
347 |
+
}
|
348 |
}
|
classes/models/class.setting.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Setting
|
4 |
-
* Version : 1.0.
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : December 31, 2014
|
8 |
-
* Modified :
|
9 |
* License : GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -263,10 +263,19 @@ class MW_WP_Form_Setting {
|
|
263 |
|
264 |
/**
|
265 |
* 問い合わせ番号を更新
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Setting
|
4 |
+
* Version : 1.0.1
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : December 31, 2014
|
8 |
+
* Modified : April 15, 2015
|
9 |
* License : GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
263 |
|
264 |
/**
|
265 |
* 問い合わせ番号を更新
|
266 |
+
*
|
267 |
+
* @param null|int $count 指定があればそれに更新
|
268 |
+
*/
|
269 |
+
public function update_tracking_number( $count = null ) {
|
270 |
+
$new_tracking_number = null;
|
271 |
+
if ( is_null( $count ) ) {
|
272 |
+
$tracking_number = $this->get_tracking_number();
|
273 |
+
$new_tracking_number = $tracking_number + 1;
|
274 |
+
} elseif ( MWF_Functions::is_numeric( $count ) ) {
|
275 |
+
$new_tracking_number = $count;
|
276 |
+
}
|
277 |
+
if ( !is_null( $new_tracking_number ) ) {
|
278 |
+
update_post_meta( $this->post_id, MWF_Config::TRACKINGNUMBER, $new_tracking_number );
|
279 |
+
}
|
280 |
}
|
281 |
}
|
classes/models/class.validation.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name : MW WP Form Validation
|
4 |
* Description: 与えられたデータに対してバリデーションエラーがあるかチェックする
|
5 |
-
* Version : 1.8.
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : July 20, 2012
|
9 |
-
* Modified : April
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -78,9 +78,10 @@ class MW_WP_Form_Validation {
|
|
78 |
* set_rules
|
79 |
*
|
80 |
* @param MW_WP_Form_Setting $Setting
|
81 |
-
* @param MW_WP_Form_Data $Data
|
82 |
*/
|
83 |
-
public function set_rules( MW_WP_Form_Setting $Setting
|
|
|
|
|
84 |
$rules = array();
|
85 |
$validations = $Setting->get('validation' );
|
86 |
if ( $validations ) {
|
2 |
/**
|
3 |
* Name : MW WP Form Validation
|
4 |
* Description: 与えられたデータに対してバリデーションエラーがあるかチェックする
|
5 |
+
* Version : 1.8.5
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : July 20, 2012
|
9 |
+
* Modified : April 15, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
78 |
* set_rules
|
79 |
*
|
80 |
* @param MW_WP_Form_Setting $Setting
|
|
|
81 |
*/
|
82 |
+
public function set_rules( MW_WP_Form_Setting $Setting ) {
|
83 |
+
$Data = MW_WP_Form_Data::getInstance();
|
84 |
+
|
85 |
$rules = array();
|
86 |
$validations = $Setting->get('validation' );
|
87 |
if ( $validations ) {
|
classes/services/class.exec-shortcode.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Exec Shortcode
|
4 |
-
* Version : 1.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
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -192,7 +192,7 @@ class MW_WP_Form_Exec_Shortcode {
|
|
192 |
foreach ( $this->settings as $key => $value ) {
|
193 |
$settings[$key] = $Setting->get( $key );
|
194 |
}
|
195 |
-
$settings['key'] =
|
196 |
}
|
197 |
$this->set_settings( $settings );
|
198 |
}
|
@@ -267,13 +267,12 @@ class MW_WP_Form_Exec_Shortcode {
|
|
267 |
* @param string $view_flg
|
268 |
* @param MW_WP_Form_Setting $Setting
|
269 |
* @param MW_WP_Form_Form $Form
|
270 |
-
* @param MW_WP_Form_Data $Data
|
271 |
*/
|
272 |
-
public function add_shortcode( $view_flg, MW_WP_Form_Setting $Setting, MW_WP_Form_Form $Form
|
273 |
$this->view_flg = $view_flg;
|
274 |
$this->Setting = $Setting;
|
275 |
$this->Form = $Form;
|
276 |
-
$this->Data =
|
277 |
add_shortcode( 'mwform_formkey' , array( $this, 'mwform_formkey' ) );
|
278 |
add_shortcode( 'mwform' , array( $this, 'mwform' ) );
|
279 |
add_shortcode( 'mwform_complete_message', array( $this, 'mwform_complete_message' ) );
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Exec Shortcode
|
4 |
+
* Version : 1.1.1
|
5 |
* Description: ExecShortcode(mwform、mwform_formkey)の存在有無のチェックとそれらの抽象化レイヤー
|
6 |
* Author : Takashi Kitajima
|
7 |
* Author URI : http://2inc.org
|
8 |
* Created : December 31, 2014
|
9 |
+
* Modified : April 14, 2015
|
10 |
* License : GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
192 |
foreach ( $this->settings as $key => $value ) {
|
193 |
$settings[$key] = $Setting->get( $key );
|
194 |
}
|
195 |
+
$settings['key'] = MWF_Functions::get_form_key_from_form_id( $post_id );
|
196 |
}
|
197 |
$this->set_settings( $settings );
|
198 |
}
|
267 |
* @param string $view_flg
|
268 |
* @param MW_WP_Form_Setting $Setting
|
269 |
* @param MW_WP_Form_Form $Form
|
|
|
270 |
*/
|
271 |
+
public function add_shortcode( $view_flg, MW_WP_Form_Setting $Setting, MW_WP_Form_Form $Form ) {
|
272 |
$this->view_flg = $view_flg;
|
273 |
$this->Setting = $Setting;
|
274 |
$this->Form = $Form;
|
275 |
+
$this->Data = MW_WP_Form_Data::getInstance();
|
276 |
add_shortcode( 'mwform_formkey' , array( $this, 'mwform_formkey' ) );
|
277 |
add_shortcode( 'mwform' , array( $this, 'mwform' ) );
|
278 |
add_shortcode( 'mwform_complete_message', array( $this, 'mwform_complete_message' ) );
|
classes/services/class.mail-parser.php
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Name : MW WP Form Mail Parser
|
4 |
+
* Description: メールパーサー
|
5 |
+
* Version : 1.0.0
|
6 |
+
* Author : Takashi Kitajima
|
7 |
+
* Author URI : http://2inc.org
|
8 |
+
* Created : April 14, 2015
|
9 |
+
* Modified :
|
10 |
+
* License : GPLv2
|
11 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
+
*/
|
13 |
+
class MW_WP_Form_Mail_Parser {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* 保存した問い合わせデータの Post ID
|
17 |
+
* @var int
|
18 |
+
*/
|
19 |
+
protected $insert_contact_data_id;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var MW_WP_Form_Mail
|
23 |
+
*/
|
24 |
+
protected $Mail;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var MW_WP_Form_Data
|
28 |
+
*/
|
29 |
+
protected $Data;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var MW_WP_Form_Setting
|
33 |
+
*/
|
34 |
+
protected $Setting;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @param MW_WP_Form_Mail $Mail
|
38 |
+
* @param MW_WP_Form_Setting $Setting
|
39 |
+
*/
|
40 |
+
public function __construct( MW_WP_Form_Mail $Mail, MW_WP_Form_Setting $Setting ) {
|
41 |
+
$this->Mail = clone $Mail;
|
42 |
+
$this->Data = MW_WP_Form_Data::getInstance();
|
43 |
+
$this->Setting = $Setting;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* パースした Mail オブジェクトの取得とデータベースへの保存
|
48 |
+
*
|
49 |
+
* @param bool $do_update
|
50 |
+
* @return MW_WP_Form_Mail
|
51 |
+
*/
|
52 |
+
public function get_parsed_mail_object( $do_update = false ) {
|
53 |
+
if ( $do_update ) {
|
54 |
+
$form_id = $this->Setting->get( 'post_id' );
|
55 |
+
$insert_contact_data_id = wp_insert_post( array(
|
56 |
+
'post_title' => $this->parse_mail_content( $this->Mail->subject ),
|
57 |
+
'post_status' => 'publish',
|
58 |
+
'post_type' => MWF_Functions::get_contact_data_post_type_from_form_id( $form_id ),
|
59 |
+
) );
|
60 |
+
|
61 |
+
// 添付ファイルをメディアに保存
|
62 |
+
// save_mail_body 内のフックで添付ファイルの情報を使えるように、
|
63 |
+
// save_mail_body より前にこのブロックを実行する
|
64 |
+
if ( !empty( $insert_contact_data_id ) ) {
|
65 |
+
MWF_Functions::save_attachments_in_media(
|
66 |
+
$insert_contact_data_id,
|
67 |
+
$this->Mail->attachments,
|
68 |
+
$form_id
|
69 |
+
);
|
70 |
+
}
|
71 |
+
$this->insert_contact_data_id = $insert_contact_data_id;
|
72 |
+
}
|
73 |
+
return $this->parse_mail_object( $do_update );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* メールオブジェクトの各プロパティを変換
|
78 |
+
*
|
79 |
+
* @param bool $do_update
|
80 |
+
* @return MW_WP_Form_Mail $Mail
|
81 |
+
*/
|
82 |
+
protected function parse_mail_object( $do_update = false ) {
|
83 |
+
$parsed_Mail_vars = get_object_vars( $this->Mail );
|
84 |
+
foreach ( $parsed_Mail_vars as $key => $value ) {
|
85 |
+
if ( is_array( $value ) || $key == 'to' || $key == 'cc' || $key == 'bcc' ) {
|
86 |
+
continue;
|
87 |
+
}
|
88 |
+
if ( $key == 'body' && $do_update ) {
|
89 |
+
$value = $this->parse_mail_content( $value, true );
|
90 |
+
} else {
|
91 |
+
$value = $this->parse_mail_content( $value );
|
92 |
+
}
|
93 |
+
$this->Mail->$key = $value;
|
94 |
+
}
|
95 |
+
return $this->Mail;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* メール本文用に {name属性} を置換
|
100 |
+
*
|
101 |
+
* @param string $value
|
102 |
+
* @param bool $do_update
|
103 |
+
* @return string
|
104 |
+
*/
|
105 |
+
protected function parse_mail_content( $value, $do_update = false ) {
|
106 |
+
if ( $do_update ) {
|
107 |
+
$callback = '_save_mail_content';
|
108 |
+
} else {
|
109 |
+
$callback = '_parse_mail_content';
|
110 |
+
}
|
111 |
+
return preg_replace_callback(
|
112 |
+
'/{(.+?)}/',
|
113 |
+
array( $this, $callback ),
|
114 |
+
$value
|
115 |
+
);
|
116 |
+
}
|
117 |
+
protected function _parse_mail_content( $matches ) {
|
118 |
+
return $this->parse( $matches, false );
|
119 |
+
}
|
120 |
+
protected function _save_mail_content( $matches ) {
|
121 |
+
return $this->parse( $matches, true );
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* $this->_parse_mail_content(), $this->_save_mail_content の本体
|
126 |
+
* 第2引数でDB保存するか判定
|
127 |
+
*
|
128 |
+
* @param array $matches
|
129 |
+
* @param bool $do_update
|
130 |
+
* @return string $value
|
131 |
+
*/
|
132 |
+
protected function parse( $matches, $do_update = false ) {
|
133 |
+
$match = $matches[1];
|
134 |
+
$form_id = $this->Setting->get( 'post_id' );
|
135 |
+
// MWF_Config::TRACKINGNUMBER のときはお問い合せ番号を参照する
|
136 |
+
if ( $match === MWF_Config::TRACKINGNUMBER ) {
|
137 |
+
if ( $form_id ) {
|
138 |
+
$value = $this->Setting->get_tracking_number( $form_id );
|
139 |
+
}
|
140 |
+
} else {
|
141 |
+
$form_key = MWF_Functions::get_form_key_from_form_id( $form_id );
|
142 |
+
$value = $this->Data->get( $match );
|
143 |
+
$value = apply_filters(
|
144 |
+
'mwform_custom_mail_tag_' . $form_key,
|
145 |
+
$value,
|
146 |
+
$match,
|
147 |
+
$this->insert_contact_data_id
|
148 |
+
);
|
149 |
+
}
|
150 |
+
if ( $value !== null && $do_update ) {
|
151 |
+
update_post_meta( $this->insert_contact_data_id, $match, $value );
|
152 |
+
}
|
153 |
+
return $value;
|
154 |
+
}
|
155 |
+
}
|
classes/services/class.mail.php
CHANGED
@@ -1,22 +1,16 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Service
|
4 |
-
* Version : 1.1.
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
-
* Modified : April
|
9 |
* License : GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
12 |
class MW_WP_Form_Mail_Service {
|
13 |
|
14 |
-
/**
|
15 |
-
* 保存した問い合わせデータの Post ID
|
16 |
-
* @var int
|
17 |
-
*/
|
18 |
-
protected $insert_contact_data_id;
|
19 |
-
|
20 |
/**
|
21 |
* @var MW_WP_Form_Mail
|
22 |
*/
|
@@ -43,11 +37,6 @@ class MW_WP_Form_Mail_Service {
|
|
43 |
*/
|
44 |
protected $form_key;
|
45 |
|
46 |
-
/**
|
47 |
-
* @var array
|
48 |
-
*/
|
49 |
-
protected $validation_rules = array();
|
50 |
-
|
51 |
/**
|
52 |
* @var array
|
53 |
*/
|
@@ -62,21 +51,18 @@ class MW_WP_Form_Mail_Service {
|
|
62 |
* __construct
|
63 |
*
|
64 |
* @param MW_WP_Form_Mail $Mail
|
65 |
-
* @param MW_WP_Form_Data $Data
|
66 |
* @param strign $form_key
|
67 |
-
* @param array $validation_rules
|
68 |
* @param MW_WP_Form_Setting $Setting
|
69 |
* @param array $attachments
|
70 |
*/
|
71 |
-
public function __construct( MW_WP_Form_Mail $Mail,
|
72 |
-
$this->form_key
|
73 |
-
$this->Data
|
74 |
-
$this->
|
75 |
-
$this->
|
76 |
-
$this->
|
77 |
-
$this->
|
78 |
-
$this->
|
79 |
-
$this->Setting = $Setting;
|
80 |
|
81 |
if ( $this->Setting->get( 'post_id' ) ) {
|
82 |
$this->set_admin_mail_raw_params();
|
@@ -100,12 +86,12 @@ class MW_WP_Form_Mail_Service {
|
|
100 |
}
|
101 |
|
102 |
if ( $this->Setting->get( 'usedb' ) ) {
|
103 |
-
$
|
104 |
} else {
|
105 |
-
$
|
106 |
}
|
107 |
|
108 |
-
$Mail_admin
|
109 |
$Mail_admin = $this->apply_filters_mwform_mail( $Mail_admin );
|
110 |
$Mail_admin = $this->apply_filters_mwform_admin_mail( $Mail_admin );
|
111 |
$Mail_admin->send();
|
@@ -126,116 +112,16 @@ class MW_WP_Form_Mail_Service {
|
|
126 |
*/
|
127 |
protected function get_parsed_mail_object( MW_WP_Form_Mail $_Mail, $do_update = false ) {
|
128 |
$Mail = clone $_Mail;
|
129 |
-
|
130 |
-
$form_id = $this->Setting->get( 'post_id' );
|
131 |
-
$insert_contact_data_id = wp_insert_post( array(
|
132 |
-
'post_title' => $this->parse_mail_content( $Mail->subject ),
|
133 |
-
'post_status' => 'publish',
|
134 |
-
'post_type' => MWF_Config::DBDATA . $form_id,
|
135 |
-
) );
|
136 |
-
|
137 |
-
// 添付ファイルをメディアに保存
|
138 |
-
// save_mail_body 内のフックで添付ファイルの情報を使えるように、
|
139 |
-
// save_mail_body より前にこのブロックを実行する
|
140 |
-
if ( !empty( $insert_contact_data_id ) ) {
|
141 |
-
MWF_Functions::save_attachments_in_media(
|
142 |
-
$insert_contact_data_id,
|
143 |
-
$this->attachments,
|
144 |
-
$form_id
|
145 |
-
);
|
146 |
-
}
|
147 |
-
$this->insert_contact_data_id = $insert_contact_data_id;
|
148 |
-
}
|
149 |
-
return $this->parse_mail_object( $Mail, $do_update );
|
150 |
-
}
|
151 |
-
|
152 |
-
/**
|
153 |
-
* メールオブジェクトの各プロパティを変換
|
154 |
-
*
|
155 |
-
* @param MW_WP_Form_Mail $_Mail
|
156 |
-
* @param bool $do_update
|
157 |
-
* @return MW_WP_Form_Mail $Mail
|
158 |
-
*/
|
159 |
-
protected function parse_mail_object( MW_WP_Form_Mail $_Mail, $do_update = false ) {
|
160 |
-
$Mail = clone $_Mail;
|
161 |
-
$parsed_Mail_vars = get_object_vars( $Mail );
|
162 |
-
foreach ( $parsed_Mail_vars as $key => $value ) {
|
163 |
-
if ( is_array( $value ) || $key == 'to' || $key == 'cc' || $key == 'bcc' ) {
|
164 |
-
continue;
|
165 |
-
}
|
166 |
-
if ( $key == 'body' && $do_update ) {
|
167 |
-
$value = $this->parse_mail_content( $value, true );
|
168 |
-
} else {
|
169 |
-
$value = $this->parse_mail_content( $value );
|
170 |
-
}
|
171 |
-
$Mail->$key = $value;
|
172 |
-
}
|
173 |
return $Mail;
|
174 |
}
|
175 |
|
176 |
-
/**
|
177 |
-
* メール本文用に {name属性} を置換
|
178 |
-
*
|
179 |
-
* @param string $value
|
180 |
-
* @param bool $do_update
|
181 |
-
* @return string
|
182 |
-
*/
|
183 |
-
protected function parse_mail_content( $value, $do_update = false ) {
|
184 |
-
if ( $do_update ) {
|
185 |
-
$callback = '_save_mail_content';
|
186 |
-
} else {
|
187 |
-
$callback = '_parse_mail_content';
|
188 |
-
}
|
189 |
-
return preg_replace_callback(
|
190 |
-
'/{(.+?)}/',
|
191 |
-
array( $this, $callback ),
|
192 |
-
$value
|
193 |
-
);
|
194 |
-
}
|
195 |
-
protected function _parse_mail_content( $matches ) {
|
196 |
-
return $this->parse( $matches, false );
|
197 |
-
}
|
198 |
-
protected function _save_mail_content( $matches ) {
|
199 |
-
return $this->parse( $matches, true );
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* $this->_parse_mail_content(), $this->_save_mail_content の本体
|
204 |
-
* 第2引数でDB保存するか判定
|
205 |
-
*
|
206 |
-
* @param array $matches
|
207 |
-
* @param bool $do_update
|
208 |
-
* @return string $value
|
209 |
-
*/
|
210 |
-
protected function parse( $matches, $do_update = false ) {
|
211 |
-
$match = $matches[1];
|
212 |
-
// MWF_Config::TRACKINGNUMBER のときはお問い合せ番号を参照する
|
213 |
-
if ( $match === MWF_Config::TRACKINGNUMBER ) {
|
214 |
-
$form_id = $this->Setting->get( 'post_id' );
|
215 |
-
if ( $form_id ) {
|
216 |
-
$value = $this->Setting->get_tracking_number( $form_id );
|
217 |
-
}
|
218 |
-
} else {
|
219 |
-
$value = $this->Data->get( $match );
|
220 |
-
$value = apply_filters(
|
221 |
-
'mwform_custom_mail_tag_' . $this->form_key,
|
222 |
-
$value,
|
223 |
-
$match,
|
224 |
-
$this->insert_contact_data_id
|
225 |
-
);
|
226 |
-
}
|
227 |
-
if ( $value !== null && $do_update ) {
|
228 |
-
update_post_meta( $this->insert_contact_data_id, $match, $value );
|
229 |
-
}
|
230 |
-
return $value;
|
231 |
-
}
|
232 |
-
|
233 |
/**
|
234 |
* 自動返信メールの送信
|
235 |
*/
|
236 |
public function send_reply_mail() {
|
237 |
-
$Mail_auto = $this->
|
238 |
-
$Mail_auto
|
239 |
$Mail_auto = $this->apply_filters_mwform_auto_mail( $Mail_auto );
|
240 |
$Mail_auto->send();
|
241 |
}
|
@@ -253,140 +139,14 @@ class MW_WP_Form_Mail_Service {
|
|
253 |
* 管理者メールに項目を設定
|
254 |
*/
|
255 |
protected function set_admin_mail_raw_params() {
|
256 |
-
|
257 |
-
$admin_mail_subject = $this->Setting->get( 'mail_subject' );
|
258 |
-
if ( $this->Setting->get( 'admin_mail_subject' ) ) {
|
259 |
-
$admin_mail_subject = $this->Setting->get( 'admin_mail_subject' );
|
260 |
-
}
|
261 |
-
$this->Mail_admin_raw->subject = $admin_mail_subject;
|
262 |
-
|
263 |
-
// 本文を指定
|
264 |
-
$admin_mail_content = $this->Setting->get( 'mail_content' );
|
265 |
-
if ( $this->Setting->get( 'admin_mail_content' ) ) {
|
266 |
-
$admin_mail_content = $this->Setting->get( 'admin_mail_content' );
|
267 |
-
}
|
268 |
-
$this->Mail_admin_raw->body = $admin_mail_content;
|
269 |
-
|
270 |
-
// 送信先を指定
|
271 |
-
$admin_mail_to = get_bloginfo( 'admin_email' );
|
272 |
-
if ( $this->Setting->get( 'mail_to' ) ) {
|
273 |
-
$admin_mail_to = $this->Setting->get( 'mail_to' );
|
274 |
-
}
|
275 |
-
$this->Mail_admin_raw->to = $admin_mail_to;
|
276 |
-
|
277 |
-
// CCを指定
|
278 |
-
$admin_mail_cc = '';
|
279 |
-
if ( $this->Setting->get( 'mail_cc' ) ) {
|
280 |
-
$admin_mail_cc = $this->Setting->get( 'mail_cc' );
|
281 |
-
}
|
282 |
-
$this->Mail_admin_raw->cc = $admin_mail_cc;
|
283 |
-
|
284 |
-
// BCCを指定
|
285 |
-
$admin_mail_bcc = '';
|
286 |
-
if ( $this->Setting->get( 'mail_bcc' ) ) {
|
287 |
-
$admin_mail_bcc = $this->Setting->get( 'mail_bcc' );
|
288 |
-
}
|
289 |
-
$this->Mail_admin_raw->bcc = $admin_mail_bcc;
|
290 |
-
|
291 |
-
// 送信元を指定
|
292 |
-
$admin_mail_from = get_bloginfo( 'admin_email' );
|
293 |
-
if ( $this->Setting->get( 'admin_mail_from' ) ) {
|
294 |
-
$admin_mail_from = $this->Setting->get( 'admin_mail_from' );
|
295 |
-
}
|
296 |
-
$this->Mail_admin_raw->from = $admin_mail_from;
|
297 |
-
|
298 |
-
// 送信者を指定
|
299 |
-
$admin_mail_sender = get_bloginfo( 'name' );
|
300 |
-
if ( $this->Setting->get( 'admin_mail_sender' ) ) {
|
301 |
-
$admin_mail_sender = $this->Setting->get( 'admin_mail_sender' );
|
302 |
-
}
|
303 |
-
$this->Mail_admin_raw->sender = $admin_mail_sender;
|
304 |
}
|
305 |
|
306 |
/**
|
307 |
* 自動返信メールに項目を設定
|
308 |
*/
|
309 |
private function set_reply_mail_raw_params() {
|
310 |
-
$this->Mail_auto_raw->
|
311 |
-
$this->Mail_auto_raw->cc = '';
|
312 |
-
$this->Mail_auto_raw->bcc = '';
|
313 |
-
// 自動返信メールからは添付ファイルを削除
|
314 |
-
$this->Mail_auto_raw->attachments = array();
|
315 |
-
$form_id = $this->Setting->get( 'post_id' );
|
316 |
-
if ( $form_id ) {
|
317 |
-
$automatic_reply_email = $this->Setting->get( 'automatic_reply_email' );
|
318 |
-
$automatic_reply_email = $this->Data->get_post_value_by_key( $automatic_reply_email );
|
319 |
-
$is_invalid_mail_address = $this->validation_rules['mail']->rule(
|
320 |
-
$automatic_reply_email
|
321 |
-
);
|
322 |
-
|
323 |
-
// 送信先を指定
|
324 |
-
if ( $automatic_reply_email && !$is_invalid_mail_address ) {
|
325 |
-
$this->Mail_auto_raw->to = $automatic_reply_email;
|
326 |
-
}
|
327 |
-
|
328 |
-
// 送信元を指定
|
329 |
-
$reply_mail_from = get_bloginfo( 'admin_email' );
|
330 |
-
if ( $this->Setting->get( 'mail_from' ) ) {
|
331 |
-
$reply_mail_from = $this->Setting->get( 'mail_from' );
|
332 |
-
}
|
333 |
-
$this->Mail_auto_raw->from = $reply_mail_from;
|
334 |
-
|
335 |
-
// 送信者を指定
|
336 |
-
$reply_mail_sender = get_bloginfo( 'name' );
|
337 |
-
if ( $this->Setting->get( 'mail_sender' ) ) {
|
338 |
-
$reply_mail_sender = $this->Setting->get( 'mail_sender' );
|
339 |
-
}
|
340 |
-
$this->Mail_auto_raw->sender = $reply_mail_sender;
|
341 |
-
|
342 |
-
// タイトルを指定
|
343 |
-
$this->Mail_auto_raw->subject = $this->Setting->get( 'mail_subject' );
|
344 |
-
|
345 |
-
// 本文を指定
|
346 |
-
$this->Mail_auto_raw->body = $this->Setting->get( 'mail_content' );
|
347 |
-
}
|
348 |
-
}
|
349 |
-
|
350 |
-
/**
|
351 |
-
* 管理者メールに必須の項目を設定
|
352 |
-
*
|
353 |
-
* @param MW_WP_Form_Mail $Mail
|
354 |
-
* @return MW_WP_Form_Mail $Mail
|
355 |
-
*/
|
356 |
-
private function set_admin_mail_reaquire_params( MW_WP_Form_Mail $Mail ) {
|
357 |
-
$admin_mail_to = get_bloginfo( 'admin_email' );
|
358 |
-
$admin_mail_from = get_bloginfo( 'admin_email' );
|
359 |
-
$admin_mail_sender = get_bloginfo( 'name' );
|
360 |
-
|
361 |
-
if ( !$Mail->to ) {
|
362 |
-
$Mail->to = $admin_mail_to;
|
363 |
-
}
|
364 |
-
if ( !$Mail->from ) {
|
365 |
-
$Mail->from = $admin_mail_from;;
|
366 |
-
}
|
367 |
-
if ( !$Mail->sender ) {
|
368 |
-
$Mail->sender = $admin_mail_sender;;
|
369 |
-
}
|
370 |
-
return $Mail;
|
371 |
-
}
|
372 |
-
|
373 |
-
/**
|
374 |
-
* 自動返信メールに必須の項目を設定
|
375 |
-
*
|
376 |
-
* @param MW_WP_Form_Mail $Mail
|
377 |
-
* @return MW_WP_Form_Mail $Mail
|
378 |
-
*/
|
379 |
-
private function set_reply_mail_reaquire_params( MW_WP_Form_Mail $Mail ) {
|
380 |
-
$reply_mail_from = get_bloginfo( 'admin_email' );
|
381 |
-
$reply_mail_sender = get_bloginfo( 'name' );
|
382 |
-
|
383 |
-
if ( !$Mail->from ) {
|
384 |
-
$Mail->from = $reply_mail_from;;
|
385 |
-
}
|
386 |
-
if ( !$Mail->sender ) {
|
387 |
-
$Mail->sender = $reply_mail_sender;;
|
388 |
-
}
|
389 |
-
return $Mail;
|
390 |
}
|
391 |
|
392 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Mail Service
|
4 |
+
* Version : 1.1.3
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : http://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
+
* Modified : April 14, 2015
|
9 |
* License : GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
12 |
class MW_WP_Form_Mail_Service {
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* @var MW_WP_Form_Mail
|
16 |
*/
|
37 |
*/
|
38 |
protected $form_key;
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* @var array
|
42 |
*/
|
51 |
* __construct
|
52 |
*
|
53 |
* @param MW_WP_Form_Mail $Mail
|
|
|
54 |
* @param strign $form_key
|
|
|
55 |
* @param MW_WP_Form_Setting $Setting
|
56 |
* @param array $attachments
|
57 |
*/
|
58 |
+
public function __construct( MW_WP_Form_Mail $Mail, $form_key, MW_WP_Form_Setting $Setting, array $attachments = array() ) {
|
59 |
+
$this->form_key = $form_key;
|
60 |
+
$this->Data = MW_WP_Form_Data::getInstance();
|
61 |
+
$this->Mail_raw = $Mail;
|
62 |
+
$this->Mail_admin_raw = clone $Mail;
|
63 |
+
$this->Mail_auto_raw = clone $Mail;
|
64 |
+
$this->attachments = $attachments;
|
65 |
+
$this->Setting = $Setting;
|
|
|
66 |
|
67 |
if ( $this->Setting->get( 'post_id' ) ) {
|
68 |
$this->set_admin_mail_raw_params();
|
86 |
}
|
87 |
|
88 |
if ( $this->Setting->get( 'usedb' ) ) {
|
89 |
+
$Mail_admin = $this->get_parsed_mail_object( $this->Mail_admin_raw, true );
|
90 |
} else {
|
91 |
+
$Mail_admin = $this->get_parsed_mail_object( $this->Mail_admin_raw );
|
92 |
}
|
93 |
|
94 |
+
$Mail_admin->set_admin_mail_reaquire_params();
|
95 |
$Mail_admin = $this->apply_filters_mwform_mail( $Mail_admin );
|
96 |
$Mail_admin = $this->apply_filters_mwform_admin_mail( $Mail_admin );
|
97 |
$Mail_admin->send();
|
112 |
*/
|
113 |
protected function get_parsed_mail_object( MW_WP_Form_Mail $_Mail, $do_update = false ) {
|
114 |
$Mail = clone $_Mail;
|
115 |
+
$Mail->parse( $this->Setting, $do_update );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
return $Mail;
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
/**
|
120 |
* 自動返信メールの送信
|
121 |
*/
|
122 |
public function send_reply_mail() {
|
123 |
+
$Mail_auto = $this->get_parsed_mail_object( $this->Mail_auto_raw );
|
124 |
+
$Mail_auto->set_reply_mail_reaquire_params();
|
125 |
$Mail_auto = $this->apply_filters_mwform_auto_mail( $Mail_auto );
|
126 |
$Mail_auto->send();
|
127 |
}
|
139 |
* 管理者メールに項目を設定
|
140 |
*/
|
141 |
protected function set_admin_mail_raw_params() {
|
142 |
+
$this->Mail_admin_raw->set_admin_mail_raw_params( $this->Setting );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
|
145 |
/**
|
146 |
* 自動返信メールに項目を設定
|
147 |
*/
|
148 |
private function set_reply_mail_raw_params() {
|
149 |
+
$this->Mail_auto_raw->set_reply_mail_raw_params( $this->Setting );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
151 |
|
152 |
/**
|
js/admin.js
CHANGED
@@ -76,4 +76,17 @@ jQuery( function( $ ) {
|
|
76 |
items : '> .repeatable-box',
|
77 |
handle: '.sortable-icon-handle'
|
78 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
} );
|
76 |
items : '> .repeatable-box',
|
77 |
handle: '.sortable-icon-handle'
|
78 |
} );
|
79 |
+
|
80 |
+
/**
|
81 |
+
* 問い合わせ番号フィールド
|
82 |
+
*/
|
83 |
+
$( 'input[name="open_tracking_number_field"]' ).click( function() {
|
84 |
+
var tracking_number_field = $( '#tracking_number_field' );
|
85 |
+
var is_open = $( this ).prop( 'checked' );
|
86 |
+
if ( is_open ) {
|
87 |
+
tracking_number_field.removeAttr( 'disabled' );
|
88 |
+
} else {
|
89 |
+
tracking_number_field.attr( 'disabled', 'disabled' );
|
90 |
+
}
|
91 |
+
} );
|
92 |
} );
|
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.4.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date: 2015-04-
|
8 |
-
"PO-Revision-Date: 2015-04-
|
9 |
"Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
|
10 |
"Language-Team: Takashi Kitajima <inc@2inc.org>\n"
|
11 |
"Language: ja\n"
|
@@ -152,11 +152,11 @@ msgstr "選択肢を「:」で送信値と表示値に分割したとき、送
|
|
152 |
|
153 |
#: classes/form-fields/class.checkbox.php:132
|
154 |
#: classes/form-fields/class.datepicker.php:136
|
155 |
-
#: classes/form-fields/class.hidden.php:
|
156 |
#: classes/form-fields/class.password.php:112
|
157 |
#: classes/form-fields/class.radio.php:128
|
158 |
#: classes/form-fields/class.select.php:126
|
159 |
-
#: classes/form-fields/class.text.php:
|
160 |
#: classes/form-fields/class.textarea.php:114
|
161 |
msgid "Default value"
|
162 |
msgstr "初期値"
|
@@ -183,7 +183,7 @@ msgstr "垂直に配置する"
|
|
183 |
#: classes/form-fields/class.radio.php:138
|
184 |
#: classes/form-fields/class.select.php:131
|
185 |
#: classes/form-fields/class.tel.php:102
|
186 |
-
#: classes/form-fields/class.text.php:
|
187 |
#: classes/form-fields/class.textarea.php:124
|
188 |
#: classes/form-fields/class.zip.php:101
|
189 |
msgid "Dsiplay error"
|
@@ -197,7 +197,7 @@ msgstr "エラー表示"
|
|
197 |
#: classes/form-fields/class.radio.php:140
|
198 |
#: classes/form-fields/class.select.php:133
|
199 |
#: classes/form-fields/class.tel.php:104
|
200 |
-
#: classes/form-fields/class.text.php:
|
201 |
#: classes/form-fields/class.textarea.php:126
|
202 |
#: classes/form-fields/class.zip.php:103
|
203 |
msgid "Don't display error."
|
@@ -236,11 +236,11 @@ msgstr "アップロードしました。"
|
|
236 |
msgid "Hidden"
|
237 |
msgstr "hiddenフィールド"
|
238 |
|
239 |
-
#: classes/form-fields/class.hidden.php:
|
240 |
msgid "Display"
|
241 |
msgstr "表示する"
|
242 |
|
243 |
-
#: classes/form-fields/class.hidden.php:
|
244 |
msgid "Display hidden value."
|
245 |
msgstr "hiddenの値を表示"
|
246 |
|
@@ -287,7 +287,7 @@ msgid "Tel"
|
|
287 |
msgstr "電話番号"
|
288 |
|
289 |
#: classes/form-fields/class.tel.php:107
|
290 |
-
#: classes/form-fields/class.text.php:
|
291 |
#: classes/form-fields/class.zip.php:106
|
292 |
msgid "Convert half alphanumeric"
|
293 |
msgstr "半角英数字に変換"
|
@@ -300,7 +300,7 @@ msgstr "変換しない"
|
|
300 |
msgid "Text"
|
301 |
msgstr "テキストフィールド"
|
302 |
|
303 |
-
#: classes/form-fields/class.text.php:
|
304 |
msgid "Convert."
|
305 |
msgstr "変換する"
|
306 |
|
@@ -483,60 +483,60 @@ msgstr "URL"
|
|
483 |
msgid "This is not the format of a zip code."
|
484 |
msgstr "郵便番号の形式ではありません。"
|
485 |
|
486 |
-
#: mw-wp-form.php:
|
487 |
msgid "Chart"
|
488 |
msgstr "グラフ"
|
489 |
|
490 |
-
#: mw-wp-form.php:
|
491 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
492 |
msgid "Inquiry data"
|
493 |
msgstr "問い合わせデータ"
|
494 |
|
495 |
-
#: mw-wp-form.php:
|
496 |
msgid "Add New Form"
|
497 |
msgstr "フォームを追加"
|
498 |
|
499 |
-
#: mw-wp-form.php:
|
500 |
msgid "Edit Form"
|
501 |
msgstr "フォームを編集"
|
502 |
|
503 |
-
#: mw-wp-form.php:
|
504 |
msgid "New Form"
|
505 |
msgstr "新しいフォーム"
|
506 |
|
507 |
-
#: mw-wp-form.php:
|
508 |
msgid "View Form"
|
509 |
msgstr "フォームを表示"
|
510 |
|
511 |
-
#: mw-wp-form.php:
|
512 |
msgid "Search Forms"
|
513 |
msgstr "フォームを検索"
|
514 |
|
515 |
-
#: mw-wp-form.php:
|
516 |
msgid "No Forms found"
|
517 |
msgstr "フォームがありません"
|
518 |
|
519 |
-
#: mw-wp-form.php:
|
520 |
msgid "No Forms found in Trash"
|
521 |
msgstr "ゴミ箱にフォームはありません"
|
522 |
|
523 |
-
#: mw-wp-form.php:
|
524 |
msgid "Edit "
|
525 |
msgstr "編集"
|
526 |
|
527 |
-
#: mw-wp-form.php:
|
528 |
msgid "View"
|
529 |
msgstr "表示"
|
530 |
|
531 |
-
#: mw-wp-form.php:
|
532 |
msgid "Search"
|
533 |
msgstr "検索"
|
534 |
|
535 |
-
#: mw-wp-form.php:
|
536 |
msgid "No data found"
|
537 |
msgstr "データがありません"
|
538 |
|
539 |
-
#: mw-wp-form.php:
|
540 |
msgid "No data found in Trash"
|
541 |
msgstr "ゴミ箱にデータはありません"
|
542 |
|
@@ -561,8 +561,8 @@ msgid ""
|
|
561 |
"If Admin Email Options is a blank, Automatic Replay Email Options is used as "
|
562 |
"Admin Email Options."
|
563 |
msgstr ""
|
564 |
-
"
|
565 |
-
"
|
566 |
|
567 |
#: templates/admin/admin-mail-options.php:12
|
568 |
msgid "To ( E-mail address )"
|
@@ -646,11 +646,19 @@ msgstr "問い合わせデータをデータベースに保存"
|
|
646 |
msgid "Enable scrolling of screen transition."
|
647 |
msgstr "画面変遷時のスクロールを有効にする"
|
648 |
|
649 |
-
#: templates/admin/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
msgid "Akismet Setting"
|
651 |
msgstr "Akismet 設定"
|
652 |
|
653 |
-
#: templates/admin/settings.php:
|
654 |
msgid "Input the key to use Akismet."
|
655 |
msgstr "Akismetを使用する項目のキーを入力してください。"
|
656 |
|
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.4.5\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
+
"POT-Creation-Date: 2015-04-15 01:18:20+00:00\n"
|
8 |
+
"PO-Revision-Date: 2015-04-15 19:35+0900\n"
|
9 |
"Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
|
10 |
"Language-Team: Takashi Kitajima <inc@2inc.org>\n"
|
11 |
"Language: ja\n"
|
152 |
|
153 |
#: classes/form-fields/class.checkbox.php:132
|
154 |
#: classes/form-fields/class.datepicker.php:136
|
155 |
+
#: classes/form-fields/class.hidden.php:84
|
156 |
#: classes/form-fields/class.password.php:112
|
157 |
#: classes/form-fields/class.radio.php:128
|
158 |
#: classes/form-fields/class.select.php:126
|
159 |
+
#: classes/form-fields/class.text.php:120
|
160 |
#: classes/form-fields/class.textarea.php:114
|
161 |
msgid "Default value"
|
162 |
msgstr "初期値"
|
183 |
#: classes/form-fields/class.radio.php:138
|
184 |
#: classes/form-fields/class.select.php:131
|
185 |
#: classes/form-fields/class.tel.php:102
|
186 |
+
#: classes/form-fields/class.text.php:130
|
187 |
#: classes/form-fields/class.textarea.php:124
|
188 |
#: classes/form-fields/class.zip.php:101
|
189 |
msgid "Dsiplay error"
|
197 |
#: classes/form-fields/class.radio.php:140
|
198 |
#: classes/form-fields/class.select.php:133
|
199 |
#: classes/form-fields/class.tel.php:104
|
200 |
+
#: classes/form-fields/class.text.php:132
|
201 |
#: classes/form-fields/class.textarea.php:126
|
202 |
#: classes/form-fields/class.zip.php:103
|
203 |
msgid "Don't display error."
|
236 |
msgid "Hidden"
|
237 |
msgstr "hiddenフィールド"
|
238 |
|
239 |
+
#: classes/form-fields/class.hidden.php:89
|
240 |
msgid "Display"
|
241 |
msgstr "表示する"
|
242 |
|
243 |
+
#: classes/form-fields/class.hidden.php:91
|
244 |
msgid "Display hidden value."
|
245 |
msgstr "hiddenの値を表示"
|
246 |
|
287 |
msgstr "電話番号"
|
288 |
|
289 |
#: classes/form-fields/class.tel.php:107
|
290 |
+
#: classes/form-fields/class.text.php:135
|
291 |
#: classes/form-fields/class.zip.php:106
|
292 |
msgid "Convert half alphanumeric"
|
293 |
msgstr "半角英数字に変換"
|
300 |
msgid "Text"
|
301 |
msgstr "テキストフィールド"
|
302 |
|
303 |
+
#: classes/form-fields/class.text.php:137
|
304 |
msgid "Convert."
|
305 |
msgstr "変換する"
|
306 |
|
483 |
msgid "This is not the format of a zip code."
|
484 |
msgstr "郵便番号の形式ではありません。"
|
485 |
|
486 |
+
#: mw-wp-form.php:166 mw-wp-form.php:167 templates/chart/index.php:4
|
487 |
msgid "Chart"
|
488 |
msgstr "グラフ"
|
489 |
|
490 |
+
#: mw-wp-form.php:195 mw-wp-form.php:196
|
491 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
492 |
msgid "Inquiry data"
|
493 |
msgstr "問い合わせデータ"
|
494 |
|
495 |
+
#: mw-wp-form.php:291
|
496 |
msgid "Add New Form"
|
497 |
msgstr "フォームを追加"
|
498 |
|
499 |
+
#: mw-wp-form.php:292
|
500 |
msgid "Edit Form"
|
501 |
msgstr "フォームを編集"
|
502 |
|
503 |
+
#: mw-wp-form.php:293
|
504 |
msgid "New Form"
|
505 |
msgstr "新しいフォーム"
|
506 |
|
507 |
+
#: mw-wp-form.php:294
|
508 |
msgid "View Form"
|
509 |
msgstr "フォームを表示"
|
510 |
|
511 |
+
#: mw-wp-form.php:295
|
512 |
msgid "Search Forms"
|
513 |
msgstr "フォームを検索"
|
514 |
|
515 |
+
#: mw-wp-form.php:296
|
516 |
msgid "No Forms found"
|
517 |
msgstr "フォームがありません"
|
518 |
|
519 |
+
#: mw-wp-form.php:297
|
520 |
msgid "No Forms found in Trash"
|
521 |
msgstr "ゴミ箱にフォームはありません"
|
522 |
|
523 |
+
#: mw-wp-form.php:314
|
524 |
msgid "Edit "
|
525 |
msgstr "編集"
|
526 |
|
527 |
+
#: mw-wp-form.php:315
|
528 |
msgid "View"
|
529 |
msgstr "表示"
|
530 |
|
531 |
+
#: mw-wp-form.php:316
|
532 |
msgid "Search"
|
533 |
msgstr "検索"
|
534 |
|
535 |
+
#: mw-wp-form.php:317
|
536 |
msgid "No data found"
|
537 |
msgstr "データがありません"
|
538 |
|
539 |
+
#: mw-wp-form.php:318
|
540 |
msgid "No data found in Trash"
|
541 |
msgstr "ゴミ箱にデータはありません"
|
542 |
|
561 |
"If Admin Email Options is a blank, Automatic Replay Email Options is used as "
|
562 |
"Admin Email Options."
|
563 |
msgstr ""
|
564 |
+
"管理者宛メール設定が空のときは自動返信メール設定が管理者宛メール設定として使"
|
565 |
+
"用されます。"
|
566 |
|
567 |
#: templates/admin/admin-mail-options.php:12
|
568 |
msgid "To ( E-mail address )"
|
646 |
msgid "Enable scrolling of screen transition."
|
647 |
msgstr "画面変遷時のスクロールを有効にする"
|
648 |
|
649 |
+
#: templates/admin/settings.php:13
|
650 |
+
msgid "Next Tracking Number"
|
651 |
+
msgstr "次の問い合わせ番号"
|
652 |
+
|
653 |
+
#: templates/admin/settings.php:16
|
654 |
+
msgid "I want to change."
|
655 |
+
msgstr "変更する"
|
656 |
+
|
657 |
+
#: templates/admin/settings.php:20
|
658 |
msgid "Akismet Setting"
|
659 |
msgstr "Akismet 設定"
|
660 |
|
661 |
+
#: templates/admin/settings.php:35
|
662 |
msgid "Input the key to use Akismet."
|
663 |
msgstr "Akismetを使用する項目のキーを入力してください。"
|
664 |
|
languages/mw-wp-form.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
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.4.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date: 2015-04-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -146,11 +146,11 @@ msgstr ""
|
|
146 |
|
147 |
#: classes/form-fields/class.checkbox.php:132
|
148 |
#: classes/form-fields/class.datepicker.php:136
|
149 |
-
#: classes/form-fields/class.hidden.php:
|
150 |
#: classes/form-fields/class.password.php:112
|
151 |
#: classes/form-fields/class.radio.php:128
|
152 |
#: classes/form-fields/class.select.php:126
|
153 |
-
#: classes/form-fields/class.text.php:
|
154 |
#: classes/form-fields/class.textarea.php:114
|
155 |
msgid "Default value"
|
156 |
msgstr ""
|
@@ -176,7 +176,7 @@ msgstr ""
|
|
176 |
#: classes/form-fields/class.password.php:122
|
177 |
#: classes/form-fields/class.radio.php:138
|
178 |
#: classes/form-fields/class.select.php:131
|
179 |
-
#: classes/form-fields/class.tel.php:102 classes/form-fields/class.text.php:
|
180 |
#: classes/form-fields/class.textarea.php:124
|
181 |
#: classes/form-fields/class.zip.php:101
|
182 |
msgid "Dsiplay error"
|
@@ -189,7 +189,7 @@ msgstr ""
|
|
189 |
#: classes/form-fields/class.password.php:124
|
190 |
#: classes/form-fields/class.radio.php:140
|
191 |
#: classes/form-fields/class.select.php:133
|
192 |
-
#: classes/form-fields/class.tel.php:104 classes/form-fields/class.text.php:
|
193 |
#: classes/form-fields/class.textarea.php:126
|
194 |
#: classes/form-fields/class.zip.php:103
|
195 |
msgid "Don't display error."
|
@@ -228,11 +228,11 @@ msgstr ""
|
|
228 |
msgid "Hidden"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: classes/form-fields/class.hidden.php:
|
232 |
msgid "Display"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: classes/form-fields/class.hidden.php:
|
236 |
msgid "Display hidden value."
|
237 |
msgstr ""
|
238 |
|
@@ -278,7 +278,7 @@ msgstr ""
|
|
278 |
msgid "Tel"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: classes/form-fields/class.tel.php:107 classes/form-fields/class.text.php:
|
282 |
#: classes/form-fields/class.zip.php:106
|
283 |
msgid "Convert half alphanumeric"
|
284 |
msgstr ""
|
@@ -291,7 +291,7 @@ msgstr ""
|
|
291 |
msgid "Text"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: classes/form-fields/class.text.php:
|
295 |
msgid "Convert."
|
296 |
msgstr ""
|
297 |
|
@@ -474,60 +474,60 @@ msgstr ""
|
|
474 |
msgid "This is not the format of a zip code."
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: mw-wp-form.php:
|
478 |
msgid "Chart"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: mw-wp-form.php:
|
482 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
483 |
msgid "Inquiry data"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: mw-wp-form.php:
|
487 |
msgid "Add New Form"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: mw-wp-form.php:
|
491 |
msgid "Edit Form"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: mw-wp-form.php:
|
495 |
msgid "New Form"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: mw-wp-form.php:
|
499 |
msgid "View Form"
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: mw-wp-form.php:
|
503 |
msgid "Search Forms"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: mw-wp-form.php:
|
507 |
msgid "No Forms found"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: mw-wp-form.php:
|
511 |
msgid "No Forms found in Trash"
|
512 |
msgstr ""
|
513 |
|
514 |
-
#: mw-wp-form.php:
|
515 |
msgid "Edit "
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: mw-wp-form.php:
|
519 |
msgid "View"
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: mw-wp-form.php:
|
523 |
msgid "Search"
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: mw-wp-form.php:
|
527 |
msgid "No data found"
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: mw-wp-form.php:
|
531 |
msgid "No data found in Trash"
|
532 |
msgstr ""
|
533 |
|
@@ -625,11 +625,19 @@ msgstr ""
|
|
625 |
msgid "Enable scrolling of screen transition."
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: templates/admin/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
msgid "Akismet Setting"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: templates/admin/settings.php:
|
633 |
msgid "Input the key to use Akismet."
|
634 |
msgstr ""
|
635 |
|
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.4.5\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
+
"POT-Creation-Date: 2015-04-15 01:18:20+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
146 |
|
147 |
#: classes/form-fields/class.checkbox.php:132
|
148 |
#: classes/form-fields/class.datepicker.php:136
|
149 |
+
#: classes/form-fields/class.hidden.php:84
|
150 |
#: classes/form-fields/class.password.php:112
|
151 |
#: classes/form-fields/class.radio.php:128
|
152 |
#: classes/form-fields/class.select.php:126
|
153 |
+
#: classes/form-fields/class.text.php:120
|
154 |
#: classes/form-fields/class.textarea.php:114
|
155 |
msgid "Default value"
|
156 |
msgstr ""
|
176 |
#: classes/form-fields/class.password.php:122
|
177 |
#: classes/form-fields/class.radio.php:138
|
178 |
#: classes/form-fields/class.select.php:131
|
179 |
+
#: classes/form-fields/class.tel.php:102 classes/form-fields/class.text.php:130
|
180 |
#: classes/form-fields/class.textarea.php:124
|
181 |
#: classes/form-fields/class.zip.php:101
|
182 |
msgid "Dsiplay error"
|
189 |
#: classes/form-fields/class.password.php:124
|
190 |
#: classes/form-fields/class.radio.php:140
|
191 |
#: classes/form-fields/class.select.php:133
|
192 |
+
#: classes/form-fields/class.tel.php:104 classes/form-fields/class.text.php:132
|
193 |
#: classes/form-fields/class.textarea.php:126
|
194 |
#: classes/form-fields/class.zip.php:103
|
195 |
msgid "Don't display error."
|
228 |
msgid "Hidden"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: classes/form-fields/class.hidden.php:89
|
232 |
msgid "Display"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: classes/form-fields/class.hidden.php:91
|
236 |
msgid "Display hidden value."
|
237 |
msgstr ""
|
238 |
|
278 |
msgid "Tel"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: classes/form-fields/class.tel.php:107 classes/form-fields/class.text.php:135
|
282 |
#: classes/form-fields/class.zip.php:106
|
283 |
msgid "Convert half alphanumeric"
|
284 |
msgstr ""
|
291 |
msgid "Text"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: classes/form-fields/class.text.php:137
|
295 |
msgid "Convert."
|
296 |
msgstr ""
|
297 |
|
474 |
msgid "This is not the format of a zip code."
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: mw-wp-form.php:166 mw-wp-form.php:167 templates/chart/index.php:4
|
478 |
msgid "Chart"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: mw-wp-form.php:195 mw-wp-form.php:196
|
482 |
#: templates/stores-inquiry-data-form-list/index.php:2
|
483 |
msgid "Inquiry data"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: mw-wp-form.php:291
|
487 |
msgid "Add New Form"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: mw-wp-form.php:292
|
491 |
msgid "Edit Form"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: mw-wp-form.php:293
|
495 |
msgid "New Form"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: mw-wp-form.php:294
|
499 |
msgid "View Form"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: mw-wp-form.php:295
|
503 |
msgid "Search Forms"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: mw-wp-form.php:296
|
507 |
msgid "No Forms found"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: mw-wp-form.php:297
|
511 |
msgid "No Forms found in Trash"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: mw-wp-form.php:314
|
515 |
msgid "Edit "
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: mw-wp-form.php:315
|
519 |
msgid "View"
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: mw-wp-form.php:316
|
523 |
msgid "Search"
|
524 |
msgstr ""
|
525 |
|
526 |
+
#: mw-wp-form.php:317
|
527 |
msgid "No data found"
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: mw-wp-form.php:318
|
531 |
msgid "No data found in Trash"
|
532 |
msgstr ""
|
533 |
|
625 |
msgid "Enable scrolling of screen transition."
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: templates/admin/settings.php:13
|
629 |
+
msgid "Next Tracking Number"
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: templates/admin/settings.php:16
|
633 |
+
msgid "I want to change."
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: templates/admin/settings.php:20
|
637 |
msgid "Akismet Setting"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: templates/admin/settings.php:35
|
641 |
msgid "Input the key to use Akismet."
|
642 |
msgstr ""
|
643 |
|
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
|
@@ -107,6 +107,7 @@ class MW_WP_Form {
|
|
107 |
include_once( $plugin_dir_path . 'classes/models/class.session.php' );
|
108 |
include_once( $plugin_dir_path . 'classes/models/class.setting.php' );
|
109 |
include_once( $plugin_dir_path . 'classes/models/class.validation.php' );
|
|
|
110 |
include_once( $plugin_dir_path . 'classes/services/class.exec-shortcode.php' );
|
111 |
include_once( $plugin_dir_path . 'classes/services/class.mail.php' );
|
112 |
include_once( $plugin_dir_path . 'classes/services/class.redirected.php' );
|
@@ -259,7 +260,7 @@ class MW_WP_Form {
|
|
259 |
$Controller = new MW_WP_Form_Admin_List_Controller();
|
260 |
$Controller->initialize();
|
261 |
}
|
262 |
-
elseif (
|
263 |
$Controller = new MW_WP_Form_Contact_Data_Controller();
|
264 |
$Controller->initialize();
|
265 |
}
|
@@ -304,7 +305,7 @@ class MW_WP_Form {
|
|
304 |
$Admin = new MW_WP_Form_Admin();
|
305 |
$forms = $Admin->get_forms_using_database();
|
306 |
foreach ( $forms as $form ) {
|
307 |
-
$post_type =
|
308 |
register_post_type( $post_type, array(
|
309 |
'label' => $form->post_title,
|
310 |
'labels' => array(
|
@@ -349,7 +350,7 @@ class MW_WP_Form {
|
|
349 |
foreach ( $data_post_ids as $data_post_id ) {
|
350 |
delete_option( MWF_Config::NAME . '-chart-' . $data_post_id );
|
351 |
$data_posts = get_posts( array(
|
352 |
-
'post_type' =>
|
353 |
'posts_per_page' => -1,
|
354 |
) );
|
355 |
if ( empty( $data_posts ) ) continue;
|
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.5
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: April 14, 2015
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPLv2
|
107 |
include_once( $plugin_dir_path . 'classes/models/class.session.php' );
|
108 |
include_once( $plugin_dir_path . 'classes/models/class.setting.php' );
|
109 |
include_once( $plugin_dir_path . 'classes/models/class.validation.php' );
|
110 |
+
include_once( $plugin_dir_path . 'classes/services/class.mail-parser.php' );
|
111 |
include_once( $plugin_dir_path . 'classes/services/class.exec-shortcode.php' );
|
112 |
include_once( $plugin_dir_path . 'classes/services/class.mail.php' );
|
113 |
include_once( $plugin_dir_path . 'classes/services/class.redirected.php' );
|
260 |
$Controller = new MW_WP_Form_Admin_List_Controller();
|
261 |
$Controller->initialize();
|
262 |
}
|
263 |
+
elseif ( MWF_Functions::is_contact_data_post_type( $screen->id ) ) {
|
264 |
$Controller = new MW_WP_Form_Contact_Data_Controller();
|
265 |
$Controller->initialize();
|
266 |
}
|
305 |
$Admin = new MW_WP_Form_Admin();
|
306 |
$forms = $Admin->get_forms_using_database();
|
307 |
foreach ( $forms as $form ) {
|
308 |
+
$post_type = MWF_Functions::get_contact_data_post_type_from_form_id( $form->ID );
|
309 |
register_post_type( $post_type, array(
|
310 |
'label' => $form->post_title,
|
311 |
'labels' => array(
|
350 |
foreach ( $data_post_ids as $data_post_id ) {
|
351 |
delete_option( MWF_Config::NAME . '-chart-' . $data_post_id );
|
352 |
$data_posts = get_posts( array(
|
353 |
+
'post_type' => MWF_Functions::get_contact_data_post_type_from_form_id( $data_post_id ),
|
354 |
'posts_per_page' => -1,
|
355 |
) );
|
356 |
if ( empty( $data_posts ) ) continue;
|
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,13 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
= 2.4.4 =
|
75 |
* Bugfix : Fixed a conv_half_alphanumeric attribute bug.
|
76 |
|
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.5
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 2.4.5 =
|
75 |
+
* Refactoring MW_WP_Form_Data Class.
|
76 |
+
* Added : Add MW_WP_Form_Mail_Parse class.
|
77 |
+
* Added : Add Tracking Number setting field.
|
78 |
+
* Added : Sender and From are written to the debug log.
|
79 |
+
* Bugfix : Fixed a bug that sometimes icon is not displayed in contact data list.
|
80 |
+
|
81 |
= 2.4.4 =
|
82 |
* Bugfix : Fixed a conv_half_alphanumeric attribute bug.
|
83 |
|
templates/admin/settings.php
CHANGED
@@ -9,6 +9,12 @@
|
|
9 |
<p>
|
10 |
<label><input type="checkbox" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[scroll]" value="1" <?php checked( $scroll, 1 ); ?> /> <?php esc_html_e( 'Enable scrolling of screen transition.', MWF_Config::DOMAIN ); ?></label>
|
11 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<table border="0" cellpadding="0" cellspacing="0" class="akismet">
|
13 |
<tr>
|
14 |
<th colspan="2"><?php esc_html_e( 'Akismet Setting', MWF_Config::DOMAIN ); ?></th>
|
@@ -26,4 +32,4 @@
|
|
26 |
<td><input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[akismet_author_url]" value="<?php echo esc_attr( $akismet_author_url ); ?>" /></td>
|
27 |
</tr>
|
28 |
</table>
|
29 |
-
<span class="mwf_note"><?php esc_html_e( 'Input the key to use Akismet.', MWF_Config::DOMAIN ); ?></span>
|
9 |
<p>
|
10 |
<label><input type="checkbox" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[scroll]" value="1" <?php checked( $scroll, 1 ); ?> /> <?php esc_html_e( 'Enable scrolling of screen transition.', MWF_Config::DOMAIN ); ?></label>
|
11 |
</p>
|
12 |
+
<p>
|
13 |
+
<?php esc_html_e( 'Next Tracking Number', MWF_Config::DOMAIN ); ?><br />
|
14 |
+
<input type="number" name="<?php echo esc_attr( MWF_Config::TRACKINGNUMBER ); ?>" id="tracking_number_field" value="<?php echo esc_attr( $tracking_number ); ?>" step="1" min="1" disabled="disabled" /><br />
|
15 |
+
<input type="checkbox" name="open_tracking_number_field" />
|
16 |
+
<?php esc_html_e( 'I want to change.', MWF_Config::DOMAIN ); ?>
|
17 |
+
</p>
|
18 |
<table border="0" cellpadding="0" cellspacing="0" class="akismet">
|
19 |
<tr>
|
20 |
<th colspan="2"><?php esc_html_e( 'Akismet Setting', MWF_Config::DOMAIN ); ?></th>
|
32 |
<td><input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[akismet_author_url]" value="<?php echo esc_attr( $akismet_author_url ); ?>" /></td>
|
33 |
</tr>
|
34 |
</table>
|
35 |
+
<span class="mwf_note"><?php esc_html_e( 'Input the key to use Akismet.', MWF_Config::DOMAIN ); ?></span>
|