MW WP Form - Version 1.7.0

Version Description

  • Added : X-Accel-Expires param in header.
  • Added : Add CC setting in admin mail setting.
  • Added : Add BCC setting in admin mail setting.
  • Added : X-Accel-Expires param in header.
  • Changed : Data store has been changed to Transient API from PHP SESSION.
  • Changed : Nonce check system has been changed to WordPress nonce check system from original.
  • Changed : Accept space in katakana validation.
  • Changed : Accept space in hiragana validation.
  • Changed : The way of isplaying attached files has been changed to URL from ID in csv file.
  • Changed : Require WordPress Version 3.5
  • Bug fix : Fixed a bug that sender not set at email when {sender} and {e-mail} in mail settings were conversion blank.
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin MW WP Form
Version 1.7.0
Comparing to
See all releases

Code changes from version 1.6.1 to 1.7.0

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 1.6.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
- "POT-Creation-Date: 2014-04-24 05:39:59+00:00\n"
8
- "PO-Revision-Date: 2014-04-24 14:41+0900\n"
9
  "Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
10
  "Language-Team: Takashi Kitajima <inc@2inc.org>\n"
11
  "Language: ja\n"
@@ -15,7 +15,7 @@ msgstr ""
15
  "Plural-Forms: nplurals=1; plural=0;\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-Basepath: .\n"
18
- "X-Generator: Poedit 1.5.6\n"
19
  "X-Poedit-KeywordsList: __;_e;_x\n"
20
  "X-Poedit-SearchPath-0: ..\n"
21
 
@@ -211,7 +211,7 @@ msgstr "確認ボタンに表示する文字列"
211
  msgid "String on the submit button"
212
  msgstr "送信ボタンに表示する文字列"
213
 
214
- #: form_fields/mw_form_field_tel.php:38 system/mw_wp_form_admin_page.php:522
215
  msgid "Tel"
216
  msgstr "電話番号"
217
 
@@ -236,11 +236,11 @@ msgstr "変換する"
236
  msgid "Textarea"
237
  msgstr "テキストエリア"
238
 
239
- #: form_fields/mw_form_field_zip.php:38 system/mw_wp_form_admin_page.php:521
240
  msgid "Zip Code"
241
  msgstr "郵便番号"
242
 
243
- #: mw-wp-form.php:442
244
  msgid "Validation Object is not a MW Validation Class."
245
  msgstr ""
246
 
@@ -429,25 +429,25 @@ msgstr "Akismetを使用する項目のキーを入力してください。"
429
  msgid "{key} is converted form data."
430
  msgstr "{キー}でそのフォーム項目に変換されます。"
431
 
432
- #: system/mw_wp_form_admin_page.php:368 system/mw_wp_form_admin_page.php:412
433
  msgid "Subject"
434
  msgstr "件名"
435
 
436
- #: system/mw_wp_form_admin_page.php:372 system/mw_wp_form_admin_page.php:416
437
  msgid "Sender"
438
  msgstr "送信者"
439
 
440
  #: system/mw_wp_form_admin_page.php:374 system/mw_wp_form_admin_page.php:379
441
- #: system/mw_wp_form_admin_page.php:409 system/mw_wp_form_admin_page.php:418
442
- #: system/mw_wp_form_admin_page.php:423
443
  msgid "If empty:"
444
  msgstr "未入力の場合:"
445
 
446
- #: system/mw_wp_form_admin_page.php:377 system/mw_wp_form_admin_page.php:421
447
  msgid "From ( E-mail address )"
448
  msgstr "送信元(E-mailアドレス)"
449
 
450
- #: system/mw_wp_form_admin_page.php:382 system/mw_wp_form_admin_page.php:426
451
  msgid "Content"
452
  msgstr "本文"
453
 
@@ -473,23 +473,31 @@ msgstr ""
473
  msgid "To ( E-mail address )"
474
  msgstr "送信先(E-mailアドレス)"
475
 
476
- #: system/mw_wp_form_admin_page.php:442
 
 
 
 
 
 
 
 
477
  msgid "Input Page URL"
478
  msgstr "入力画面URL"
479
 
480
- #: system/mw_wp_form_admin_page.php:448
481
  msgid "Confirmation Page URL"
482
  msgstr "確認画面URL"
483
 
484
- #: system/mw_wp_form_admin_page.php:454
485
  msgid "Complete Page URL"
486
  msgstr "完了画面URL"
487
 
488
- #: system/mw_wp_form_admin_page.php:460
489
  msgid "Validation Error Page URL"
490
  msgstr "エラー画面URL"
491
 
492
- #: system/mw_wp_form_admin_page.php:467
493
  msgid ""
494
  "This urls are the redirection urls at the time of button press. When URL "
495
  "setting is empty, The page redirect on the same page."
@@ -497,91 +505,91 @@ msgstr ""
497
  "上記URLはボタン押下時のリダイレクトURLです。URLの設定が空のときは、同一ページ"
498
  "上でリダイレクトします。"
499
 
500
- #: system/mw_wp_form_admin_page.php:468
501
  msgid "When a URL doesn't begin http or https, %s is complemented."
502
  msgstr "URLが http または https で始まっていない場合は %s が補完されます。"
503
 
504
- #: system/mw_wp_form_admin_page.php:504
505
  msgid "Add Validation rule"
506
  msgstr "バリデーションルールを追加"
507
 
508
- #: system/mw_wp_form_admin_page.php:510
509
  msgid "The key which applies validation"
510
  msgstr "バリデーションを適用する項目"
511
 
512
- #: system/mw_wp_form_admin_page.php:514
513
  msgid "No empty"
514
  msgstr "必須項目"
515
 
516
- #: system/mw_wp_form_admin_page.php:515
517
  msgid "No empty( with checkbox )"
518
  msgstr "必須項目(チェックボックス)"
519
 
520
- #: system/mw_wp_form_admin_page.php:516
521
  msgid "Numeric"
522
  msgstr "半角数字"
523
 
524
- #: system/mw_wp_form_admin_page.php:517
525
  msgid "Alphabet"
526
  msgstr "半角英字"
527
 
528
- #: system/mw_wp_form_admin_page.php:518
529
  msgid "Alphabet and Numeric"
530
  msgstr "半角英数字"
531
 
532
- #: system/mw_wp_form_admin_page.php:519
533
  msgid "Japanese Katakana"
534
  msgstr "カタカナ"
535
 
536
- #: system/mw_wp_form_admin_page.php:520
537
  msgid "Japanese Hiragana"
538
  msgstr "ひらがな"
539
 
540
- #: system/mw_wp_form_admin_page.php:523
541
  msgid "E-mail"
542
  msgstr "メールアドレス"
543
 
544
- #: system/mw_wp_form_admin_page.php:524
545
  msgid "URL"
546
  msgstr "URL"
547
 
548
- #: system/mw_wp_form_admin_page.php:525
549
  msgid "Date"
550
  msgstr "日付"
551
 
552
- #: system/mw_wp_form_admin_page.php:529
553
  msgid "The key at same value"
554
  msgstr "一致する項目"
555
 
556
- #: system/mw_wp_form_admin_page.php:533
557
  msgid "The range of the number of characters"
558
  msgstr "文字数の範囲"
559
 
560
- #: system/mw_wp_form_admin_page.php:541
561
  msgid "The number of the minimum characters"
562
  msgstr "最小文字数"
563
 
564
- #: system/mw_wp_form_admin_page.php:545
565
  msgid "Permitted Extension"
566
  msgstr "拡張子制限"
567
 
568
- #: system/mw_wp_form_admin_page.php:546
569
  msgid "Example:jpg or jpg,txt,…"
570
  msgstr "例:jpg もしくは jpg,txt…"
571
 
572
- #: system/mw_wp_form_admin_page.php:549
573
  msgid "Permitted file size"
574
  msgstr "サイズ制限"
575
 
576
- #: system/mw_wp_form_admin_page.php:550
577
  msgid "bytes"
578
  msgstr "バイト"
579
 
580
- #: system/mw_wp_form_admin_page.php:566
581
  msgid "Select Style"
582
  msgstr "スタイルを選択"
583
 
584
- #: system/mw_wp_form_admin_page.php:602
585
  msgid "Add form tag"
586
  msgstr "フォームタグを追加"
587
 
@@ -605,29 +613,29 @@ msgstr "データがありません"
605
  msgid "No data found in Trash"
606
  msgstr "ゴミ箱にデータはありません"
607
 
608
- #: system/mw_wp_form_contact_data_page.php:138
609
  msgid "CSV Download"
610
  msgstr "CSVダウンロード"
611
 
612
- #: system/mw_wp_form_contact_data_page.php:226
613
  msgid "Custom Fields"
614
  msgstr "カスタムフィールド"
615
 
616
- #: system/mw_wp_form_contact_data_page.php:250
617
  msgid "Registed Date"
618
  msgstr "登録日時"
619
 
620
- #: system/mw_wp_form_contact_data_page.php:341
621
  msgid "Memo"
622
  msgstr "メモ"
623
 
624
- #: system/mw_wp_form_contact_data_page.php:381
625
- #: system/mw_wp_form_contact_data_page.php:382
626
- #: system/mw_wp_form_contact_data_page.php:396
627
  msgid "Inquiry data"
628
  msgstr "問い合わせデータ"
629
 
630
- #: system/mw_wp_form_contact_data_page.php:398
631
  msgid ""
632
  "You can see the inquiry data that are saved in the database by clicking on "
633
  "the link below."
@@ -635,27 +643,27 @@ msgstr ""
635
  "リンクをクリックすることでデータベースに保存された問い合わせデータを見ること"
636
  "ができます。"
637
 
638
- #: system/mw_wp_form_contact_data_page.php:402
639
  msgid "Form title"
640
  msgstr "フォーム名"
641
 
642
- #: system/mw_wp_form_contact_data_page.php:403
643
  msgid "The number of inquiries"
644
  msgstr "問い合わせ件数"
645
 
646
- #: system/mw_wp_form_contact_data_page.php:404
647
  msgid "Updated date"
648
  msgstr "更新日"
649
 
650
- #: system/mw_wp_form_contact_data_page.php:405
651
  msgid "Created date"
652
  msgstr "作成日"
653
 
654
- #: system/mw_wp_form_contact_data_page.php:412
655
  msgid "cases"
656
  msgstr "件"
657
 
658
- #: system/mw_wp_form_file.php:152
659
  msgid "Uploaded from "
660
  msgstr "Uploaded from "
661
 
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 1.7.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
+ "POT-Creation-Date: 2014-06-14 09:43:39+00:00\n"
8
+ "PO-Revision-Date: 2014-06-14 18:45+0900\n"
9
  "Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
10
  "Language-Team: Takashi Kitajima <inc@2inc.org>\n"
11
  "Language: ja\n"
15
  "Plural-Forms: nplurals=1; plural=0;\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-Basepath: .\n"
18
+ "X-Generator: Poedit 1.6.5\n"
19
  "X-Poedit-KeywordsList: __;_e;_x\n"
20
  "X-Poedit-SearchPath-0: ..\n"
21
 
211
  msgid "String on the submit button"
212
  msgstr "送信ボタンに表示する文字列"
213
 
214
+ #: form_fields/mw_form_field_tel.php:38 system/mw_wp_form_admin_page.php:530
215
  msgid "Tel"
216
  msgstr "電話番号"
217
 
236
  msgid "Textarea"
237
  msgstr "テキストエリア"
238
 
239
+ #: form_fields/mw_form_field_zip.php:38 system/mw_wp_form_admin_page.php:529
240
  msgid "Zip Code"
241
  msgstr "郵便番号"
242
 
243
+ #: mw-wp-form.php:468
244
  msgid "Validation Object is not a MW Validation Class."
245
  msgstr ""
246
 
429
  msgid "{key} is converted form data."
430
  msgstr "{キー}でそのフォーム項目に変換されます。"
431
 
432
+ #: system/mw_wp_form_admin_page.php:368 system/mw_wp_form_admin_page.php:420
433
  msgid "Subject"
434
  msgstr "件名"
435
 
436
+ #: system/mw_wp_form_admin_page.php:372 system/mw_wp_form_admin_page.php:424
437
  msgid "Sender"
438
  msgstr "送信者"
439
 
440
  #: system/mw_wp_form_admin_page.php:374 system/mw_wp_form_admin_page.php:379
441
+ #: system/mw_wp_form_admin_page.php:409 system/mw_wp_form_admin_page.php:426
442
+ #: system/mw_wp_form_admin_page.php:431
443
  msgid "If empty:"
444
  msgstr "未入力の場合:"
445
 
446
+ #: system/mw_wp_form_admin_page.php:377 system/mw_wp_form_admin_page.php:429
447
  msgid "From ( E-mail address )"
448
  msgstr "送信元(E-mailアドレス)"
449
 
450
+ #: system/mw_wp_form_admin_page.php:382 system/mw_wp_form_admin_page.php:434
451
  msgid "Content"
452
  msgstr "本文"
453
 
473
  msgid "To ( E-mail address )"
474
  msgstr "送信先(E-mailアドレス)"
475
 
476
+ #: system/mw_wp_form_admin_page.php:412
477
+ msgid "CC ( E-mail address )"
478
+ msgstr "CC(E-mailアドレス)"
479
+
480
+ #: system/mw_wp_form_admin_page.php:416
481
+ msgid "BCC ( E-mail address )"
482
+ msgstr "BCC(E-mailアドレス)"
483
+
484
+ #: system/mw_wp_form_admin_page.php:450
485
  msgid "Input Page URL"
486
  msgstr "入力画面URL"
487
 
488
+ #: system/mw_wp_form_admin_page.php:456
489
  msgid "Confirmation Page URL"
490
  msgstr "確認画面URL"
491
 
492
+ #: system/mw_wp_form_admin_page.php:462
493
  msgid "Complete Page URL"
494
  msgstr "完了画面URL"
495
 
496
+ #: system/mw_wp_form_admin_page.php:468
497
  msgid "Validation Error Page URL"
498
  msgstr "エラー画面URL"
499
 
500
+ #: system/mw_wp_form_admin_page.php:475
501
  msgid ""
502
  "This urls are the redirection urls at the time of button press. When URL "
503
  "setting is empty, The page redirect on the same page."
505
  "上記URLはボタン押下時のリダイレクトURLです。URLの設定が空のときは、同一ページ"
506
  "上でリダイレクトします。"
507
 
508
+ #: system/mw_wp_form_admin_page.php:476
509
  msgid "When a URL doesn't begin http or https, %s is complemented."
510
  msgstr "URLが http または https で始まっていない場合は %s が補完されます。"
511
 
512
+ #: system/mw_wp_form_admin_page.php:512
513
  msgid "Add Validation rule"
514
  msgstr "バリデーションルールを追加"
515
 
516
+ #: system/mw_wp_form_admin_page.php:518
517
  msgid "The key which applies validation"
518
  msgstr "バリデーションを適用する項目"
519
 
520
+ #: system/mw_wp_form_admin_page.php:522
521
  msgid "No empty"
522
  msgstr "必須項目"
523
 
524
+ #: system/mw_wp_form_admin_page.php:523
525
  msgid "No empty( with checkbox )"
526
  msgstr "必須項目(チェックボックス)"
527
 
528
+ #: system/mw_wp_form_admin_page.php:524
529
  msgid "Numeric"
530
  msgstr "半角数字"
531
 
532
+ #: system/mw_wp_form_admin_page.php:525
533
  msgid "Alphabet"
534
  msgstr "半角英字"
535
 
536
+ #: system/mw_wp_form_admin_page.php:526
537
  msgid "Alphabet and Numeric"
538
  msgstr "半角英数字"
539
 
540
+ #: system/mw_wp_form_admin_page.php:527
541
  msgid "Japanese Katakana"
542
  msgstr "カタカナ"
543
 
544
+ #: system/mw_wp_form_admin_page.php:528
545
  msgid "Japanese Hiragana"
546
  msgstr "ひらがな"
547
 
548
+ #: system/mw_wp_form_admin_page.php:531
549
  msgid "E-mail"
550
  msgstr "メールアドレス"
551
 
552
+ #: system/mw_wp_form_admin_page.php:532
553
  msgid "URL"
554
  msgstr "URL"
555
 
556
+ #: system/mw_wp_form_admin_page.php:533
557
  msgid "Date"
558
  msgstr "日付"
559
 
560
+ #: system/mw_wp_form_admin_page.php:537
561
  msgid "The key at same value"
562
  msgstr "一致する項目"
563
 
564
+ #: system/mw_wp_form_admin_page.php:541
565
  msgid "The range of the number of characters"
566
  msgstr "文字数の範囲"
567
 
568
+ #: system/mw_wp_form_admin_page.php:549
569
  msgid "The number of the minimum characters"
570
  msgstr "最小文字数"
571
 
572
+ #: system/mw_wp_form_admin_page.php:553
573
  msgid "Permitted Extension"
574
  msgstr "拡張子制限"
575
 
576
+ #: system/mw_wp_form_admin_page.php:554
577
  msgid "Example:jpg or jpg,txt,…"
578
  msgstr "例:jpg もしくは jpg,txt…"
579
 
580
+ #: system/mw_wp_form_admin_page.php:557
581
  msgid "Permitted file size"
582
  msgstr "サイズ制限"
583
 
584
+ #: system/mw_wp_form_admin_page.php:558
585
  msgid "bytes"
586
  msgstr "バイト"
587
 
588
+ #: system/mw_wp_form_admin_page.php:574
589
  msgid "Select Style"
590
  msgstr "スタイルを選択"
591
 
592
+ #: system/mw_wp_form_admin_page.php:610
593
  msgid "Add form tag"
594
  msgstr "フォームタグを追加"
595
 
613
  msgid "No data found in Trash"
614
  msgstr "ゴミ箱にデータはありません"
615
 
616
+ #: system/mw_wp_form_contact_data_page.php:137
617
  msgid "CSV Download"
618
  msgstr "CSVダウンロード"
619
 
620
+ #: system/mw_wp_form_contact_data_page.php:228
621
  msgid "Custom Fields"
622
  msgstr "カスタムフィールド"
623
 
624
+ #: system/mw_wp_form_contact_data_page.php:252
625
  msgid "Registed Date"
626
  msgstr "登録日時"
627
 
628
+ #: system/mw_wp_form_contact_data_page.php:346
629
  msgid "Memo"
630
  msgstr "メモ"
631
 
632
+ #: system/mw_wp_form_contact_data_page.php:386
633
+ #: system/mw_wp_form_contact_data_page.php:387
634
+ #: system/mw_wp_form_contact_data_page.php:401
635
  msgid "Inquiry data"
636
  msgstr "問い合わせデータ"
637
 
638
+ #: system/mw_wp_form_contact_data_page.php:403
639
  msgid ""
640
  "You can see the inquiry data that are saved in the database by clicking on "
641
  "the link below."
643
  "リンクをクリックすることでデータベースに保存された問い合わせデータを見ること"
644
  "ができます。"
645
 
646
+ #: system/mw_wp_form_contact_data_page.php:407
647
  msgid "Form title"
648
  msgstr "フォーム名"
649
 
650
+ #: system/mw_wp_form_contact_data_page.php:408
651
  msgid "The number of inquiries"
652
  msgstr "問い合わせ件数"
653
 
654
+ #: system/mw_wp_form_contact_data_page.php:409
655
  msgid "Updated date"
656
  msgstr "更新日"
657
 
658
+ #: system/mw_wp_form_contact_data_page.php:410
659
  msgid "Created date"
660
  msgstr "作成日"
661
 
662
+ #: system/mw_wp_form_contact_data_page.php:417
663
  msgid "cases"
664
  msgstr "件"
665
 
666
+ #: system/mw_wp_form_file.php:163
667
  msgid "Uploaded from "
668
  msgstr "Uploaded from "
669
 
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 1.6.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
- "POT-Creation-Date: 2014-04-24 05:39:59+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -210,7 +210,7 @@ msgstr ""
210
  msgid "String on the submit button"
211
  msgstr ""
212
 
213
- #: form_fields/mw_form_field_tel.php:38 system/mw_wp_form_admin_page.php:522
214
  msgid "Tel"
215
  msgstr ""
216
 
@@ -235,11 +235,11 @@ msgstr ""
235
  msgid "Textarea"
236
  msgstr ""
237
 
238
- #: form_fields/mw_form_field_zip.php:38 system/mw_wp_form_admin_page.php:521
239
  msgid "Zip Code"
240
  msgstr ""
241
 
242
- #: mw-wp-form.php:442
243
  msgid "Validation Object is not a MW Validation Class."
244
  msgstr ""
245
 
@@ -423,25 +423,25 @@ msgstr ""
423
  msgid "{key} is converted form data."
424
  msgstr ""
425
 
426
- #: system/mw_wp_form_admin_page.php:368 system/mw_wp_form_admin_page.php:412
427
  msgid "Subject"
428
  msgstr ""
429
 
430
- #: system/mw_wp_form_admin_page.php:372 system/mw_wp_form_admin_page.php:416
431
  msgid "Sender"
432
  msgstr ""
433
 
434
  #: system/mw_wp_form_admin_page.php:374 system/mw_wp_form_admin_page.php:379
435
- #: system/mw_wp_form_admin_page.php:409 system/mw_wp_form_admin_page.php:418
436
- #: system/mw_wp_form_admin_page.php:423
437
  msgid "If empty:"
438
  msgstr ""
439
 
440
- #: system/mw_wp_form_admin_page.php:377 system/mw_wp_form_admin_page.php:421
441
  msgid "From ( E-mail address )"
442
  msgstr ""
443
 
444
- #: system/mw_wp_form_admin_page.php:382 system/mw_wp_form_admin_page.php:426
445
  msgid "Content"
446
  msgstr ""
447
 
@@ -461,111 +461,119 @@ msgstr ""
461
  msgid "To ( E-mail address )"
462
  msgstr ""
463
 
464
- #: system/mw_wp_form_admin_page.php:442
 
 
 
 
 
 
 
 
465
  msgid "Input Page URL"
466
  msgstr ""
467
 
468
- #: system/mw_wp_form_admin_page.php:448
469
  msgid "Confirmation Page URL"
470
  msgstr ""
471
 
472
- #: system/mw_wp_form_admin_page.php:454
473
  msgid "Complete Page URL"
474
  msgstr ""
475
 
476
- #: system/mw_wp_form_admin_page.php:460
477
  msgid "Validation Error Page URL"
478
  msgstr ""
479
 
480
- #: system/mw_wp_form_admin_page.php:467
481
  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."
482
  msgstr ""
483
 
484
- #: system/mw_wp_form_admin_page.php:468
485
  msgid "When a URL doesn't begin http or https, %s is complemented."
486
  msgstr ""
487
 
488
- #: system/mw_wp_form_admin_page.php:504
489
  msgid "Add Validation rule"
490
  msgstr ""
491
 
492
- #: system/mw_wp_form_admin_page.php:510
493
  msgid "The key which applies validation"
494
  msgstr ""
495
 
496
- #: system/mw_wp_form_admin_page.php:514
497
  msgid "No empty"
498
  msgstr ""
499
 
500
- #: system/mw_wp_form_admin_page.php:515
501
  msgid "No empty( with checkbox )"
502
  msgstr ""
503
 
504
- #: system/mw_wp_form_admin_page.php:516
505
  msgid "Numeric"
506
  msgstr ""
507
 
508
- #: system/mw_wp_form_admin_page.php:517
509
  msgid "Alphabet"
510
  msgstr ""
511
 
512
- #: system/mw_wp_form_admin_page.php:518
513
  msgid "Alphabet and Numeric"
514
  msgstr ""
515
 
516
- #: system/mw_wp_form_admin_page.php:519
517
  msgid "Japanese Katakana"
518
  msgstr ""
519
 
520
- #: system/mw_wp_form_admin_page.php:520
521
  msgid "Japanese Hiragana"
522
  msgstr ""
523
 
524
- #: system/mw_wp_form_admin_page.php:523
525
  msgid "E-mail"
526
  msgstr ""
527
 
528
- #: system/mw_wp_form_admin_page.php:524
529
  msgid "URL"
530
  msgstr ""
531
 
532
- #: system/mw_wp_form_admin_page.php:525
533
  msgid "Date"
534
  msgstr ""
535
 
536
- #: system/mw_wp_form_admin_page.php:529
537
  msgid "The key at same value"
538
  msgstr ""
539
 
540
- #: system/mw_wp_form_admin_page.php:533
541
  msgid "The range of the number of characters"
542
  msgstr ""
543
 
544
- #: system/mw_wp_form_admin_page.php:541
545
  msgid "The number of the minimum characters"
546
  msgstr ""
547
 
548
- #: system/mw_wp_form_admin_page.php:545
549
  msgid "Permitted Extension"
550
  msgstr ""
551
 
552
- #: system/mw_wp_form_admin_page.php:546
553
  msgid "Example:jpg or jpg,txt,…"
554
  msgstr ""
555
 
556
- #: system/mw_wp_form_admin_page.php:549
557
  msgid "Permitted file size"
558
  msgstr ""
559
 
560
- #: system/mw_wp_form_admin_page.php:550
561
  msgid "bytes"
562
  msgstr ""
563
 
564
- #: system/mw_wp_form_admin_page.php:566
565
  msgid "Select Style"
566
  msgstr ""
567
 
568
- #: system/mw_wp_form_admin_page.php:602
569
  msgid "Add form tag"
570
  msgstr ""
571
 
@@ -589,53 +597,53 @@ msgstr ""
589
  msgid "No data found in Trash"
590
  msgstr ""
591
 
592
- #: system/mw_wp_form_contact_data_page.php:138
593
  msgid "CSV Download"
594
  msgstr ""
595
 
596
- #: system/mw_wp_form_contact_data_page.php:226
597
  msgid "Custom Fields"
598
  msgstr ""
599
 
600
- #: system/mw_wp_form_contact_data_page.php:250
601
  msgid "Registed Date"
602
  msgstr ""
603
 
604
- #: system/mw_wp_form_contact_data_page.php:341
605
  msgid "Memo"
606
  msgstr ""
607
 
608
- #: system/mw_wp_form_contact_data_page.php:381
609
- #: system/mw_wp_form_contact_data_page.php:382
610
- #: system/mw_wp_form_contact_data_page.php:396
611
  msgid "Inquiry data"
612
  msgstr ""
613
 
614
- #: system/mw_wp_form_contact_data_page.php:398
615
  msgid "You can see the inquiry data that are saved in the database by clicking on the link below."
616
  msgstr ""
617
 
618
- #: system/mw_wp_form_contact_data_page.php:402
619
  msgid "Form title"
620
  msgstr ""
621
 
622
- #: system/mw_wp_form_contact_data_page.php:403
623
  msgid "The number of inquiries"
624
  msgstr ""
625
 
626
- #: system/mw_wp_form_contact_data_page.php:404
627
  msgid "Updated date"
628
  msgstr ""
629
 
630
- #: system/mw_wp_form_contact_data_page.php:405
631
  msgid "Created date"
632
  msgstr ""
633
 
634
- #: system/mw_wp_form_contact_data_page.php:412
635
  msgid "cases"
636
  msgstr ""
637
 
638
- #: system/mw_wp_form_file.php:152
639
  msgid "Uploaded from "
640
  msgstr ""
641
  #. Plugin Name of the plugin/theme
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 1.7.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
+ "POT-Creation-Date: 2014-06-14 09:43:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
210
  msgid "String on the submit button"
211
  msgstr ""
212
 
213
+ #: form_fields/mw_form_field_tel.php:38 system/mw_wp_form_admin_page.php:530
214
  msgid "Tel"
215
  msgstr ""
216
 
235
  msgid "Textarea"
236
  msgstr ""
237
 
238
+ #: form_fields/mw_form_field_zip.php:38 system/mw_wp_form_admin_page.php:529
239
  msgid "Zip Code"
240
  msgstr ""
241
 
242
+ #: mw-wp-form.php:468
243
  msgid "Validation Object is not a MW Validation Class."
244
  msgstr ""
245
 
423
  msgid "{key} is converted form data."
424
  msgstr ""
425
 
426
+ #: system/mw_wp_form_admin_page.php:368 system/mw_wp_form_admin_page.php:420
427
  msgid "Subject"
428
  msgstr ""
429
 
430
+ #: system/mw_wp_form_admin_page.php:372 system/mw_wp_form_admin_page.php:424
431
  msgid "Sender"
432
  msgstr ""
433
 
434
  #: system/mw_wp_form_admin_page.php:374 system/mw_wp_form_admin_page.php:379
435
+ #: system/mw_wp_form_admin_page.php:409 system/mw_wp_form_admin_page.php:426
436
+ #: system/mw_wp_form_admin_page.php:431
437
  msgid "If empty:"
438
  msgstr ""
439
 
440
+ #: system/mw_wp_form_admin_page.php:377 system/mw_wp_form_admin_page.php:429
441
  msgid "From ( E-mail address )"
442
  msgstr ""
443
 
444
+ #: system/mw_wp_form_admin_page.php:382 system/mw_wp_form_admin_page.php:434
445
  msgid "Content"
446
  msgstr ""
447
 
461
  msgid "To ( E-mail address )"
462
  msgstr ""
463
 
464
+ #: system/mw_wp_form_admin_page.php:412
465
+ msgid "CC ( E-mail address )"
466
+ msgstr ""
467
+
468
+ #: system/mw_wp_form_admin_page.php:416
469
+ msgid "BCC ( E-mail address )"
470
+ msgstr ""
471
+
472
+ #: system/mw_wp_form_admin_page.php:450
473
  msgid "Input Page URL"
474
  msgstr ""
475
 
476
+ #: system/mw_wp_form_admin_page.php:456
477
  msgid "Confirmation Page URL"
478
  msgstr ""
479
 
480
+ #: system/mw_wp_form_admin_page.php:462
481
  msgid "Complete Page URL"
482
  msgstr ""
483
 
484
+ #: system/mw_wp_form_admin_page.php:468
485
  msgid "Validation Error Page URL"
486
  msgstr ""
487
 
488
+ #: system/mw_wp_form_admin_page.php:475
489
  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."
490
  msgstr ""
491
 
492
+ #: system/mw_wp_form_admin_page.php:476
493
  msgid "When a URL doesn't begin http or https, %s is complemented."
494
  msgstr ""
495
 
496
+ #: system/mw_wp_form_admin_page.php:512
497
  msgid "Add Validation rule"
498
  msgstr ""
499
 
500
+ #: system/mw_wp_form_admin_page.php:518
501
  msgid "The key which applies validation"
502
  msgstr ""
503
 
504
+ #: system/mw_wp_form_admin_page.php:522
505
  msgid "No empty"
506
  msgstr ""
507
 
508
+ #: system/mw_wp_form_admin_page.php:523
509
  msgid "No empty( with checkbox )"
510
  msgstr ""
511
 
512
+ #: system/mw_wp_form_admin_page.php:524
513
  msgid "Numeric"
514
  msgstr ""
515
 
516
+ #: system/mw_wp_form_admin_page.php:525
517
  msgid "Alphabet"
518
  msgstr ""
519
 
520
+ #: system/mw_wp_form_admin_page.php:526
521
  msgid "Alphabet and Numeric"
522
  msgstr ""
523
 
524
+ #: system/mw_wp_form_admin_page.php:527
525
  msgid "Japanese Katakana"
526
  msgstr ""
527
 
528
+ #: system/mw_wp_form_admin_page.php:528
529
  msgid "Japanese Hiragana"
530
  msgstr ""
531
 
532
+ #: system/mw_wp_form_admin_page.php:531
533
  msgid "E-mail"
534
  msgstr ""
535
 
536
+ #: system/mw_wp_form_admin_page.php:532
537
  msgid "URL"
538
  msgstr ""
539
 
540
+ #: system/mw_wp_form_admin_page.php:533
541
  msgid "Date"
542
  msgstr ""
543
 
544
+ #: system/mw_wp_form_admin_page.php:537
545
  msgid "The key at same value"
546
  msgstr ""
547
 
548
+ #: system/mw_wp_form_admin_page.php:541
549
  msgid "The range of the number of characters"
550
  msgstr ""
551
 
552
+ #: system/mw_wp_form_admin_page.php:549
553
  msgid "The number of the minimum characters"
554
  msgstr ""
555
 
556
+ #: system/mw_wp_form_admin_page.php:553
557
  msgid "Permitted Extension"
558
  msgstr ""
559
 
560
+ #: system/mw_wp_form_admin_page.php:554
561
  msgid "Example:jpg or jpg,txt,…"
562
  msgstr ""
563
 
564
+ #: system/mw_wp_form_admin_page.php:557
565
  msgid "Permitted file size"
566
  msgstr ""
567
 
568
+ #: system/mw_wp_form_admin_page.php:558
569
  msgid "bytes"
570
  msgstr ""
571
 
572
+ #: system/mw_wp_form_admin_page.php:574
573
  msgid "Select Style"
574
  msgstr ""
575
 
576
+ #: system/mw_wp_form_admin_page.php:610
577
  msgid "Add form tag"
578
  msgstr ""
579
 
597
  msgid "No data found in Trash"
598
  msgstr ""
599
 
600
+ #: system/mw_wp_form_contact_data_page.php:137
601
  msgid "CSV Download"
602
  msgstr ""
603
 
604
+ #: system/mw_wp_form_contact_data_page.php:228
605
  msgid "Custom Fields"
606
  msgstr ""
607
 
608
+ #: system/mw_wp_form_contact_data_page.php:252
609
  msgid "Registed Date"
610
  msgstr ""
611
 
612
+ #: system/mw_wp_form_contact_data_page.php:346
613
  msgid "Memo"
614
  msgstr ""
615
 
616
+ #: system/mw_wp_form_contact_data_page.php:386
617
+ #: system/mw_wp_form_contact_data_page.php:387
618
+ #: system/mw_wp_form_contact_data_page.php:401
619
  msgid "Inquiry data"
620
  msgstr ""
621
 
622
+ #: system/mw_wp_form_contact_data_page.php:403
623
  msgid "You can see the inquiry data that are saved in the database by clicking on the link below."
624
  msgstr ""
625
 
626
+ #: system/mw_wp_form_contact_data_page.php:407
627
  msgid "Form title"
628
  msgstr ""
629
 
630
+ #: system/mw_wp_form_contact_data_page.php:408
631
  msgid "The number of inquiries"
632
  msgstr ""
633
 
634
+ #: system/mw_wp_form_contact_data_page.php:409
635
  msgid "Updated date"
636
  msgstr ""
637
 
638
+ #: system/mw_wp_form_contact_data_page.php:410
639
  msgid "Created date"
640
  msgstr ""
641
 
642
+ #: system/mw_wp_form_contact_data_page.php:417
643
  msgid "cases"
644
  msgstr ""
645
 
646
+ #: system/mw_wp_form_file.php:163
647
  msgid "Uploaded from "
648
  msgstr ""
649
  #. Plugin Name of the plugin/theme
mw-wp-form.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form can create mail form with a confirmation screen.
6
- * Version: 1.6.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
@@ -54,6 +54,8 @@ class mw_wp_form {
54
  'mail_content' => '',
55
  'automatic_reply_email' => '',
56
  'mail_to' => '',
 
 
57
  'admin_mail_subject' => '',
58
  'admin_mail_from' => '',
59
  'admin_mail_sender' => '',
@@ -117,10 +119,22 @@ class mw_wp_form {
117
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_validation.php' );
118
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_data.php' );
119
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_file.php' );
 
120
  add_filter( 'template_include', array( $this, 'main' ), 10000 );
121
  add_action( 'parse_request', array( $this, 'remove_query_vars_from_post' ) );
122
  }
123
 
 
 
 
 
 
 
 
 
 
 
 
124
  /**
125
  * remove_query_vars_from_post
126
  * WordPressへのリクエストに含まれている、$_POSTの値を削除
@@ -464,58 +478,27 @@ class mw_wp_form {
464
  $Mail_raw = clone $Mail;
465
 
466
  if ( $this->options_by_formkey ) {
467
- $admin_mail_subject = $this->options_by_formkey['mail_subject'];
468
- if ( !empty( $this->options_by_formkey['admin_mail_subject'] ) )
469
- $admin_mail_subject = $this->options_by_formkey['admin_mail_subject'];
470
-
471
- $admin_mail_content = $this->options_by_formkey['mail_content'];
472
- if ( !empty( $this->options_by_formkey['admin_mail_content'] ) )
473
- $admin_mail_content = $this->options_by_formkey['admin_mail_content'];
474
-
475
- $admin_mail_to = get_bloginfo( 'admin_email' );
476
- if ( !empty( $this->options_by_formkey['mail_to'] ) )
477
- $admin_mail_to = $this->options_by_formkey['mail_to'];
478
-
479
- $admin_mail_from = get_bloginfo( 'admin_email' );
480
- if ( !empty( $this->options_by_formkey['admin_mail_from'] ) )
481
- $admin_mail_from = $this->options_by_formkey['admin_mail_from'];
482
-
483
- $admin_mail_sender = get_bloginfo( 'name' );
484
- if ( !empty( $this->options_by_formkey['admin_mail_sender'] ) )
485
- $admin_mail_sender = $this->options_by_formkey['admin_mail_sender'];
486
-
487
- // 送信先を指定
488
- $Mail_raw->to = $admin_mail_to;
489
- // 送信元を指定
490
- $Mail_raw->from = $admin_mail_from;
491
- // 送信者を指定
492
- $Mail_raw->sender = $admin_mail_sender;
493
- // タイトルを指定
494
- $Mail_raw->subject = $admin_mail_subject;
495
- // 本文を指定
496
- $Mail_raw->body = $admin_mail_content;
497
 
498
  // 添付ファイルのデータをためた配列を作成
499
  $attachments = array();
500
  // $Mail->attachments を設定(メールにファイルを添付)
501
  $upload_file_keys = $this->Data->getValue( MWF_Config::UPLOAD_FILE_KEYS );
502
- if ( $upload_file_keys !== null ) {
503
- if ( is_array( $upload_file_keys ) ) {
504
- $wp_upload_dir = wp_upload_dir();
505
- foreach ( $upload_file_keys as $key ) {
506
- $upload_file_url = $this->Data->getValue( $key );
507
- if ( !$upload_file_url )
508
- continue;
509
- $filepath = MWF_Functions::fileurl_to_path( $upload_file_url );
510
- if ( file_exists( $filepath ) ) {
511
- $filepath = $this->File->moveTempFileToUploadDir( $filepath );
512
- $new_upload_file_url = MWF_Functions::filepath_to_url( $filepath );
513
- $attachments[$key] = $filepath;
514
- $this->Data->setValue( $key, $new_upload_file_url );
515
- }
516
  }
517
- $Mail_raw->attachments = $attachments;
518
  }
 
519
  }
520
 
521
  $filter_name = 'mwform_admin_mail_raw_' . $this->key;
@@ -524,6 +507,7 @@ class mw_wp_form {
524
  return;
525
 
526
  $Mail = $this->parse_mail_object( $Mail_raw );
 
527
  }
528
 
529
  $filter_name = 'mwform_mail_' . $this->key;
@@ -574,29 +558,8 @@ class mw_wp_form {
574
  if ( isset( $this->options_by_formkey['automatic_reply_email'] ) ) {
575
  $automatic_reply_email = $this->Data->getValue( $this->options_by_formkey['automatic_reply_email'] );
576
  if ( $automatic_reply_email && !$this->Validation->mail( $automatic_reply_email ) ) {
 
577
 
578
- $reply_mail_from = get_bloginfo( 'admin_email' );
579
- if ( !empty( $this->options_by_formkey['mail_from'] ) )
580
- $reply_mail_from = $this->options_by_formkey['mail_from'];
581
-
582
- $reply_mail_sender = get_bloginfo( 'name' );
583
- if ( !empty( $this->options_by_formkey['mail_sender'] ) )
584
- $reply_mail_sender = $this->options_by_formkey['mail_sender'];
585
-
586
- $reply_mail_subject = $this->options_by_formkey['mail_subject'];
587
-
588
- $reply_mail_content = $this->options_by_formkey['mail_content'];
589
-
590
- // 送信先を指定
591
- $Mail_raw->to = $automatic_reply_email;
592
- // 送信元を指定
593
- $Mail_raw->from = $reply_mail_from;
594
- // 送信者を指定
595
- $Mail_raw->sender = $reply_mail_sender;
596
- // タイトルを指定
597
- $Mail_raw->subject = $reply_mail_subject;
598
- // 本文を指定
599
- $Mail_raw->body = $reply_mail_content;
600
  // 自動返信メールからは添付ファイルを削除
601
  $Mail_raw->attachments = array();
602
 
@@ -606,6 +569,7 @@ class mw_wp_form {
606
  return;
607
 
608
  $Mail = $this->parse_mail_object( $Mail_raw );
 
609
 
610
  $filter_name = 'mwform_auto_mail_' . $this->key;
611
  $Mail = apply_filters( $filter_name, $Mail, $this->Data->getValues() );
@@ -626,7 +590,7 @@ class mw_wp_form {
626
  $parsed_obj = clone $obj;
627
  $parsed_obj_vars = get_object_vars( $parsed_obj );
628
  foreach ( $parsed_obj_vars as $key => $value ) {
629
- if ( is_array( $value ) || $key == 'to' )
630
  continue;
631
  $value = $this->parse_mail_content( $value );
632
  $parsed_obj->$key = $value;
@@ -979,4 +943,139 @@ class mw_wp_form {
979
  }
980
  }
981
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
982
  }
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form can create mail form with a confirmation screen.
6
+ * Version: 1.7.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
54
  'mail_content' => '',
55
  'automatic_reply_email' => '',
56
  'mail_to' => '',
57
+ 'mail_cc' => '',
58
+ 'mail_bcc' => '',
59
  'admin_mail_subject' => '',
60
  'admin_mail_from' => '',
61
  'admin_mail_sender' => '',
119
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_validation.php' );
120
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_data.php' );
121
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_file.php' );
122
+ add_action( 'nocache_headers' , array( $this, 'nocache_headers' ) , 1 );
123
  add_filter( 'template_include', array( $this, 'main' ), 10000 );
124
  add_action( 'parse_request', array( $this, 'remove_query_vars_from_post' ) );
125
  }
126
 
127
+ /**
128
+ * nocache_headers
129
+ * Nginx Cache Controller用
130
+ * @param array $headers
131
+ * @return array $headers
132
+ */
133
+ public function nocache_headers( $headers ) {
134
+ $headers['X-Accel-Expires'] = 0;
135
+ return $headers;
136
+ }
137
+
138
  /**
139
  * remove_query_vars_from_post
140
  * WordPressへのリクエストに含まれている、$_POSTの値を削除
478
  $Mail_raw = clone $Mail;
479
 
480
  if ( $this->options_by_formkey ) {
481
+ $Mail_raw = $this->set_admin_mail_raw_params( $Mail_raw );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
 
483
  // 添付ファイルのデータをためた配列を作成
484
  $attachments = array();
485
  // $Mail->attachments を設定(メールにファイルを添付)
486
  $upload_file_keys = $this->Data->getValue( MWF_Config::UPLOAD_FILE_KEYS );
487
+ if ( $upload_file_keys !== null && is_array( $upload_file_keys ) ) {
488
+ $wp_upload_dir = wp_upload_dir();
489
+ foreach ( $upload_file_keys as $key ) {
490
+ $upload_file_url = $this->Data->getValue( $key );
491
+ if ( !$upload_file_url )
492
+ continue;
493
+ $filepath = MWF_Functions::fileurl_to_path( $upload_file_url );
494
+ if ( file_exists( $filepath ) ) {
495
+ $filepath = $this->File->moveTempFileToUploadDir( $filepath );
496
+ $new_upload_file_url = MWF_Functions::filepath_to_url( $filepath );
497
+ $attachments[$key] = $filepath;
498
+ $this->Data->setValue( $key, $new_upload_file_url );
 
 
499
  }
 
500
  }
501
+ $Mail_raw->attachments = $attachments;
502
  }
503
 
504
  $filter_name = 'mwform_admin_mail_raw_' . $this->key;
507
  return;
508
 
509
  $Mail = $this->parse_mail_object( $Mail_raw );
510
+ $Mail = $this->set_admin_mail_reaquire_params( $Mail );
511
  }
512
 
513
  $filter_name = 'mwform_mail_' . $this->key;
558
  if ( isset( $this->options_by_formkey['automatic_reply_email'] ) ) {
559
  $automatic_reply_email = $this->Data->getValue( $this->options_by_formkey['automatic_reply_email'] );
560
  if ( $automatic_reply_email && !$this->Validation->mail( $automatic_reply_email ) ) {
561
+ $Mail_raw = $this->set_reply_mail_raw_params( $Mail_raw );
562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  // 自動返信メールからは添付ファイルを削除
564
  $Mail_raw->attachments = array();
565
 
569
  return;
570
 
571
  $Mail = $this->parse_mail_object( $Mail_raw );
572
+ $Mail = $this->set_reply_mail_reaquire_params( $Mail );
573
 
574
  $filter_name = 'mwform_auto_mail_' . $this->key;
575
  $Mail = apply_filters( $filter_name, $Mail, $this->Data->getValues() );
590
  $parsed_obj = clone $obj;
591
  $parsed_obj_vars = get_object_vars( $parsed_obj );
592
  foreach ( $parsed_obj_vars as $key => $value ) {
593
+ if ( is_array( $value ) || $key == 'to' || $key == 'cc' || $key == 'bcc' )
594
  continue;
595
  $value = $this->parse_mail_content( $value );
596
  $parsed_obj->$key = $value;
943
  }
944
  }
945
  }
946
+
947
+ /**
948
+ * set_admin_mail_reaquire_params
949
+ * 管理者メールに必須の項目を設定
950
+ * @param MW_Mail $Mail
951
+ * @return MW_Mail $Mail
952
+ */
953
+ private function set_admin_mail_reaquire_params( MW_Mail $Mail ) {
954
+ $admin_mail_to = get_bloginfo( 'admin_email' );
955
+ $admin_mail_from = get_bloginfo( 'admin_email' );
956
+ $admin_mail_sender = get_bloginfo( 'name' );
957
+
958
+ if ( !$Mail->to ) {
959
+ $Mail->to = $admin_mail_to;;
960
+ }
961
+ if ( !$Mail->from ) {
962
+ $Mail->from = $admin_mail_from;;
963
+ }
964
+ if ( !$Mail->sender ) {
965
+ $Mail->sender = $admin_mail_sender;;
966
+ }
967
+ return $Mail;
968
+ }
969
+
970
+ /**
971
+ * set_reply_mail_reaquire_params
972
+ * 自動返信メールに必須の項目を設定
973
+ * @param MW_Mail $Mail
974
+ * @return MW_Mail $Mail
975
+ */
976
+ private function set_reply_mail_reaquire_params( MW_Mail $Mail ) {
977
+ $reply_mail_from = get_bloginfo( 'admin_email' );
978
+ $reply_mail_sender = get_bloginfo( 'name' );
979
+
980
+ if ( !$Mail->from ) {
981
+ $Mail->from = $reply_mail_from;;
982
+ }
983
+ if ( !$Mail->sender ) {
984
+ $Mail->sender = $reply_mail_sender;;
985
+ }
986
+ return $Mail;
987
+ }
988
+
989
+ /**
990
+ * set_admin_mail_raw_params
991
+ * 管理者メールに項目を設定
992
+ * @param MW_Mail $Mail
993
+ * @return MW_Mail $Mail
994
+ */
995
+ private function set_admin_mail_raw_params( MW_Mail $Mail ) {
996
+ if ( $this->options_by_formkey ) {
997
+ // タイトルを指定
998
+ $admin_mail_subject = $this->options_by_formkey['mail_subject'];
999
+ if ( !empty( $this->options_by_formkey['admin_mail_subject'] ) )
1000
+ $admin_mail_subject = $this->options_by_formkey['admin_mail_subject'];
1001
+ $Mail->subject = $admin_mail_subject;
1002
+
1003
+ // 本文を指定
1004
+ $admin_mail_content = $this->options_by_formkey['mail_content'];
1005
+ if ( !empty( $this->options_by_formkey['admin_mail_content'] ) )
1006
+ $admin_mail_content = $this->options_by_formkey['admin_mail_content'];
1007
+ $Mail->body = $admin_mail_content;
1008
+
1009
+ // 送信先を指定
1010
+ $admin_mail_to = get_bloginfo( 'admin_email' );
1011
+ if ( !empty( $this->options_by_formkey['mail_to'] ) )
1012
+ $admin_mail_to = $this->options_by_formkey['mail_to'];
1013
+ $Mail->to = $admin_mail_to;
1014
+
1015
+ // CCを指定
1016
+ $admin_mail_cc = $this->defaults['mail_cc'];
1017
+ if ( !empty( $this->options_by_formkey['mail_cc'] ) )
1018
+ $admin_mail_cc = $this->options_by_formkey['mail_cc'];
1019
+ $Mail->cc = $admin_mail_cc;
1020
+
1021
+ // BCCを指定
1022
+ $admin_mail_bcc = $this->defaults['mail_bcc'];
1023
+ if ( !empty( $this->options_by_formkey['mail_bcc'] ) )
1024
+ $admin_mail_bcc = $this->options_by_formkey['mail_bcc'];
1025
+ $Mail->bcc = $admin_mail_bcc;
1026
+
1027
+ // 送信元を指定
1028
+ $admin_mail_from = get_bloginfo( 'admin_email' );
1029
+ if ( !empty( $this->options_by_formkey['admin_mail_from'] ) )
1030
+ $admin_mail_from = $this->options_by_formkey['admin_mail_from'];
1031
+ $Mail->from = $admin_mail_from;
1032
+
1033
+ // 送信者を指定
1034
+ $admin_mail_sender = get_bloginfo( 'name' );
1035
+ if ( !empty( $this->options_by_formkey['admin_mail_sender'] ) )
1036
+ $admin_mail_sender = $this->options_by_formkey['admin_mail_sender'];
1037
+ $Mail->sender = $admin_mail_sender;
1038
+ }
1039
+ return $Mail;
1040
+ }
1041
+
1042
+ /**
1043
+ * set_reply_mail_raw_params
1044
+ * 自動返信メールに項目を設定
1045
+ * @param MW_Mail $Mail
1046
+ * @return MW_Mail $Mail
1047
+ */
1048
+ private function set_reply_mail_raw_params( MW_Mail $Mail ) {
1049
+ $Mail->to = '';
1050
+ $Mail->cc = '';
1051
+ $Mail->bcc = '';
1052
+ if ( $this->options_by_formkey ) {
1053
+ $automatic_reply_email = $this->Data->getValue( $this->options_by_formkey['automatic_reply_email'] );
1054
+ if ( $automatic_reply_email && !$this->Validation->mail( $automatic_reply_email ) ) {
1055
+ // 送信先を指定
1056
+ $Mail->to = $automatic_reply_email;
1057
+
1058
+ // 送信元を指定
1059
+ $reply_mail_from = get_bloginfo( 'admin_email' );
1060
+ if ( !empty( $this->options_by_formkey['mail_from'] ) )
1061
+ $reply_mail_from = $this->options_by_formkey['mail_from'];
1062
+ $Mail->from = $reply_mail_from;
1063
+
1064
+ // 送信者を指定
1065
+ $reply_mail_sender = get_bloginfo( 'name' );
1066
+ if ( !empty( $this->options_by_formkey['mail_sender'] ) )
1067
+ $reply_mail_sender = $this->options_by_formkey['mail_sender'];
1068
+ $Mail->sender = $reply_mail_sender;
1069
+
1070
+ // タイトルを指定
1071
+ $reply_mail_subject = $this->options_by_formkey['mail_subject'];
1072
+ $Mail->subject = $reply_mail_subject;
1073
+
1074
+ // 本文を指定
1075
+ $reply_mail_content = $this->options_by_formkey['mail_content'];
1076
+ $Mail->body = $reply_mail_content;
1077
+ }
1078
+ }
1079
+ return $Mail;
1080
+ }
1081
  }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === MW WP Form ===
2
- Contributors: inc2734
3
  Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode, mail
5
- Requires at least: 3.4
6
  Tested up to: 3.9.0
7
- Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -54,6 +54,19 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  = 1.6.1 =
58
  * Bug fix : Support Akismet 3.0.0
59
  * Changed : Support psd, ai, eps file upload.
1
  === MW WP Form ===
2
+ Contributors: inc2734, ryu263
3
  Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode, mail
5
+ Requires at least: 3.5
6
  Tested up to: 3.9.0
7
+ Stable tag: 1.7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
54
 
55
  == Changelog ==
56
 
57
+ = 1.7.0 =
58
+ * Added : X-Accel-Expires param in header.
59
+ * Added : Add CC setting in admin mail setting.
60
+ * Added : Add BCC setting in admin mail setting.
61
+ * Added : X-Accel-Expires param in header.
62
+ * Changed : Data store has been changed to Transient API from PHP SESSION.
63
+ * Changed : Nonce check system has been changed to WordPress nonce check system from original.
64
+ * Changed : Accept space in katakana validation.
65
+ * Changed : Accept space in hiragana validation.
66
+ * Changed : The way of isplaying attached files has been changed to URL from ID in csv file.
67
+ * Changed : Require WordPress Version 3.5
68
+ * Bug fix : Fixed a bug that sender not set at email when {sender} and {e-mail} in mail settings were conversion blank.
69
+
70
  = 1.6.1 =
71
  * Bug fix : Support Akismet 3.0.0
72
  * Changed : Support psd, ai, eps file upload.
system/mw_form.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Form
4
  * URI: http://2inc.org
5
  * Description: フォームクラス
6
- * Version: 1.3.14
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: April 22, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
@@ -66,9 +66,11 @@ class MW_Form {
66
  protected $method = 'post';
67
  private $ENCODE = 'utf-8';
68
 
 
 
69
  /**
70
  * __construct
71
- * 取得データを保存、識別子とセッションIDののhash値をトークンとして利用
72
  * @param string $key 識別子
73
  */
74
  public function __construct( $key = '' ) {
@@ -78,20 +80,13 @@ class MW_Form {
78
  }
79
  $this->Session = MW_Session::start( $this->key );
80
  $this->modeCheck = $this->modeCheck();
81
- $this->token = sha1( $this->key . session_id() );
82
- if ( $this->isInput() && empty( $_POST ) && !$this->Session->getValue( $this->tokenName ) ) {
83
- $this->Session->save( array( $this->tokenName => $this->token ) );
84
- }
85
  }
86
 
87
  /**
88
- * clearToken
89
- * トークン用のセッションを破棄
 
90
  */
91
- private function clearToken() {
92
- $this->Session->clearValue( $this->tokenName );
93
- }
94
-
95
  public function getTokenName() {
96
  return $this->tokenName;
97
  }
@@ -169,14 +164,12 @@ class MW_Form {
169
  protected function check() {
170
  if ( isset( $_POST[$this->tokenName] ) )
171
  $requestToken = $_POST[$this->tokenName];
172
- $s_token = $this->Session->getValue( $this->tokenName );
173
 
174
  $data = $this->Data->getValues();
175
- if ( isset( $requestToken ) && !empty( $s_token ) && $requestToken === $s_token ) {
176
- $this->clearToken();
177
  return true;
178
- } elseif ( empty( $_POST ) && $data ) {
179
- $this->clearToken();
180
  return true;
181
  }
182
  return false;
@@ -342,7 +335,7 @@ class MW_Form {
342
  public function end() {
343
  $html = '';
344
  if ( $this->method === 'post' ) {
345
- $html .= $this->hidden( $this->tokenName, $this->token );
346
  }
347
  $html .= '</form>';
348
  return $html;
3
  * Name: MW Form
4
  * URI: http://2inc.org
5
  * Description: フォームクラス
6
+ * Version: 1.4.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: June 13, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
66
  protected $method = 'post';
67
  private $ENCODE = 'utf-8';
68
 
69
+ const COMPLETE_TWICE = '__complete_twice_flg';
70
+
71
  /**
72
  * __construct
73
+ * 取得データを保存
74
  * @param string $key 識別子
75
  */
76
  public function __construct( $key = '' ) {
80
  }
81
  $this->Session = MW_Session::start( $this->key );
82
  $this->modeCheck = $this->modeCheck();
 
 
 
 
83
  }
84
 
85
  /**
86
+ * getTokenName
87
+ * nonce用のキーを返す
88
+ * @return string
89
  */
 
 
 
 
90
  public function getTokenName() {
91
  return $this->tokenName;
92
  }
164
  protected function check() {
165
  if ( isset( $_POST[$this->tokenName] ) )
166
  $requestToken = $_POST[$this->tokenName];
 
167
 
168
  $data = $this->Data->getValues();
169
+ if ( isset( $requestToken ) && wp_verify_nonce( $requestToken, $this->key ) ) {
170
+ $this->Data->setValue( self::COMPLETE_TWICE, true );
171
  return true;
172
+ } elseif ( empty( $_POST ) && !empty( $data ) && $this->Data->getValue( self::COMPLETE_TWICE ) ) {
 
173
  return true;
174
  }
175
  return false;
335
  public function end() {
336
  $html = '';
337
  if ( $this->method === 'post' ) {
338
+ $html .= wp_nonce_field( $this->key, $this->tokenName, true, false );
339
  }
340
  $html .= '</form>';
341
  return $html;
system/mw_form_field.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Form Field
4
  * URI: http://2inc.org
5
  * Description: フォームフィールドの抽象クラス
6
- * Version: 1.6.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : December 14, 2012
10
- * Modified: April 4, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
@@ -141,7 +141,8 @@ abstract class mw_form_field {
141
  $_ret .= $error_html;
142
  }
143
  }
144
- return apply_filters( 'mwform_error_message_wrapper', $_ret, $this->key );
 
145
  }
146
 
147
  /**
3
  * Name: MW Form Field
4
  * URI: http://2inc.org
5
  * Description: フォームフィールドの抽象クラス
6
+ * Version: 1.6.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : December 14, 2012
10
+ * Modified: June 14, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
141
  $_ret .= $error_html;
142
  }
143
  }
144
+ if ( $_ret )
145
+ return apply_filters( 'mwform_error_message_wrapper', $_ret, $this->key );
146
  }
147
 
148
  /**
system/mw_mail.php CHANGED
@@ -3,14 +3,14 @@
3
  * Name: MW Mail
4
  * URI: http://2inc.org
5
  * Description: メールクラス
6
- * Version: 1.3.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: July 20, 2012
10
- * Modified: December 24, 2013
11
  * License: GPL2
12
  *
13
- * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
14
  *
15
  * This program is free software; you can redistribute it and/or modify
16
  * it under the terms of the GNU General Public License, version 2, as
@@ -28,6 +28,8 @@
28
  class MW_Mail {
29
 
30
  public $to; // 宛先
 
 
31
  public $from; // 送信元
32
  public $sender; // 送信者
33
  public $subject; // 題名
@@ -47,13 +49,17 @@ class MW_Mail {
47
  add_action( 'phpmailer_init', array( $this, 'set_return_path' ) );
48
  add_filter( 'wp_mail_from', array( $this, 'set_mail_from' ) );
49
  add_filter( 'wp_mail_from_name', array( $this, 'set_mail_from_name' ) );
50
- $to = explode( ',', $this->to );
51
- if ( isset( $to[0] ) ) {
52
- foreach ( $to as $value ) {
53
- $value = trim( $value );
54
- $header = '';
55
- wp_mail( $value, $subject, $body, $header, $this->attachments );
56
  }
 
 
 
 
 
57
  }
58
  remove_action( 'phpmailer_init', array( $this, 'set_return_path' ) );
59
  remove_filter( 'wp_mail_from', array( $this, 'set_mail_from' ) );
3
  * Name: MW Mail
4
  * URI: http://2inc.org
5
  * Description: メールクラス
6
+ * Version: 1.4.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: July 20, 2012
10
+ * Modified: June 13, 2014
11
  * License: GPL2
12
  *
13
+ * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
14
  *
15
  * This program is free software; you can redistribute it and/or modify
16
  * it under the terms of the GNU General Public License, version 2, as
28
  class MW_Mail {
29
 
30
  public $to; // 宛先
31
+ public $cc; // CC
32
+ public $bcc; // BCC
33
  public $from; // 送信元
34
  public $sender; // 送信者
35
  public $subject; // 題名
49
  add_action( 'phpmailer_init', array( $this, 'set_return_path' ) );
50
  add_filter( 'wp_mail_from', array( $this, 'set_mail_from' ) );
51
  add_filter( 'wp_mail_from_name', array( $this, 'set_mail_from_name' ) );
52
+ $tos = explode( ',', $this->to );
53
+ foreach ( $tos as $to ) {
54
+ $headers = array();
55
+ if ( $this->cc ) {
56
+ $headers[] = 'Cc: ' . $this->cc;
 
57
  }
58
+ if ( $this->bcc ) {
59
+ $headers[] = 'Bcc: ' . $this->bcc;
60
+ }
61
+ $to = trim( $to );
62
+ wp_mail( $to, $subject, $body, $headers, $this->attachments );
63
  }
64
  remove_action( 'phpmailer_init', array( $this, 'set_return_path' ) );
65
  remove_filter( 'wp_mail_from', array( $this, 'set_mail_from' ) );
system/mw_session.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Session
4
  * URI: http://2inc.org
5
  * Description: セッションクラス
6
- * Version: 1.2.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : July 17, 2012
10
- * Modified: January 29, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
@@ -27,9 +27,9 @@
27
  */
28
  class MW_Session {
29
 
30
- private static $session; // セッションフラグ
31
- private static $sessionName = 'nw_session'; // セッション名
32
- private $name; // 擬似セッション名
33
 
34
  private function __construct( $name ) {
35
  $this->setSessionName( $name );
@@ -38,95 +38,117 @@ class MW_Session {
38
  /**
39
  * start
40
  * インスタンス化
41
- * @param string 擬似セッション名
42
  * @return Session Sessionオブジェクト
43
  */
44
  public static function start( $name ) {
45
- if ( self::$session == null && !isset( $_SESSION ) ){
46
- session_name( self::$sessionName );
47
- session_set_cookie_params( 0, '/' );
48
- session_start();
49
- self::$session = 1;
 
 
50
  }
51
- $Session = new MW_Session( $name );
52
  return $Session;
53
  }
54
 
55
  /**
56
  * setSessionName
57
- * 疑似セッション名を設定
58
- * @param String 擬似セッション名
59
  */
60
- private function setSessionName( $name ) {
61
- $this->name = $name;
62
  }
63
 
64
  /**
65
  * save
66
  * セッション変数にセット
67
- * @param Array ( キー => 値, … )
68
  */
69
  public function save( Array $data ) {
70
- foreach ( $data as $key => $value ) {
71
- $_SESSION[$this->name][$key] = $value;
 
 
 
 
 
72
  }
 
73
  }
74
 
75
  /**
76
  * setValue
77
  * セッション変数にセット
78
- * @param String キー
79
- * Mixed
80
  */
81
  public function setValue( $key, $value ) {
82
- $_SESSION[$this->name][$key] = $value;
 
 
 
 
 
 
83
  }
84
 
85
  /**
86
  * pushValue
87
  * セッション変数にセット
88
- * @param String キー
89
- * Mixed
90
  */
91
  public function pushValue( $key, $value ) {
92
- $_SESSION[$this->name][$key][] = $value;
 
 
 
 
 
 
93
  }
94
 
95
  /**
96
  * getValue
97
  * セッション変数から取得
98
- * @param String キー
99
- * @return Mixed セッション値
100
  */
101
  public function getValue( $key ) {
102
- $_ret = null;
103
- if ( isset( $_SESSION[$this->name][$key] ) ) {
104
- $_ret = $_SESSION[$this->name][$key];
105
  }
106
- return $_ret;
107
  }
108
 
109
  /**
110
  * getValues
111
  * セッション変数から取得
112
- * @param Array ( キー => 値, … )
113
  */
114
  public function getValues() {
115
- $_ret = array();
116
- if ( isset( $_SESSION[$this->name] ) ) {
117
- $_ret = $_SESSION[$this->name];
118
  }
119
- return $_ret;
120
  }
121
 
122
  /**
123
  * clearValue
124
  * セッション変数を空に
125
- * @param String キー
126
  */
127
  public function clearValue( $key ) {
128
- if ( isset( $_SESSION[$this->name][$key] ) ) {
129
- unset( $_SESSION[$this->name][$key] );
 
 
130
  }
131
  }
132
 
@@ -135,28 +157,6 @@ class MW_Session {
135
  * セッション変数を空に
136
  */
137
  public function clearValues() {
138
- if ( isset( $_SESSION[$this->name] ) ) {
139
- unset( $_SESSION[$this->name] );
140
- }
141
- }
142
-
143
- /**
144
- * destroy
145
- * $_SESSIONを破壊
146
- */
147
- public function destroy(){
148
- $_SESSION = array();
149
- if ( isset( $_COOKIE[ session_name() ] ) ) {
150
- setcookie( session_name(), '', time()-42000, '/' );
151
- }
152
- session_destroy();
153
- }
154
-
155
- /**
156
- * session_regenerate_id
157
- * 現在のセッションIDを新しく生成したものと置き換える
158
- */
159
- public function session_regenerate_id(){
160
- session_regenerate_id( TRUE );
161
  }
162
  }
3
  * Name: MW Session
4
  * URI: http://2inc.org
5
  * Description: セッションクラス
6
+ * Version: 2.0.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : July 17, 2012
10
+ * Modified: June 13, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
27
  */
28
  class MW_Session {
29
 
30
+ private static $name; // セッション名
31
+ private $session_id; // セッションID
32
+ private $expiration = 1440; // Transient の生存時間
33
 
34
  private function __construct( $name ) {
35
  $this->setSessionName( $name );
38
  /**
39
  * start
40
  * インスタンス化
41
+ * @param string $name 識別子
42
  * @return Session Sessionオブジェクト
43
  */
44
  public static function start( $name ) {
45
+ self::$name = MWF_Config::NAME . '_session_' . $name;
46
+ if ( isset( $_COOKIE[self::$name] ) ) {
47
+ $session_id = $_COOKIE[self::$name];
48
+ } else {
49
+ $session_id = sha1( wp_create_nonce( self::$name ) . ip2long( $_SERVER['REMOTE_ADDR'] ) . uniqid() );
50
+ $secure = apply_filters( 'mwform_secure_cookie', is_ssl() );
51
+ setcookie( self::$name, $session_id, 0, COOKIEPATH, COOKIE_DOMAIN, $secure, true );
52
  }
53
+ $Session = new MW_Session( $session_id );
54
  return $Session;
55
  }
56
 
57
  /**
58
  * setSessionName
59
+ * セッション名を設定
60
+ * @param string $session_id
61
  */
62
+ private function setSessionName( $session_id ) {
63
+ $this->session_id = $session_id;
64
  }
65
 
66
  /**
67
  * save
68
  * セッション変数にセット
69
+ * @param array $data
70
  */
71
  public function save( Array $data ) {
72
+ $transient_data = get_transient( $this->session_id );
73
+ if ( is_array( $transient_data ) ) {
74
+ foreach ( $data as $key => $value ) {
75
+ $transient_data[$key] = $value;
76
+ }
77
+ } else {
78
+ $transient_data = $data;
79
  }
80
+ set_transient( $this->session_id, $transient_data, $this->expiration );
81
  }
82
 
83
  /**
84
  * setValue
85
  * セッション変数にセット
86
+ * @param string $key キー
87
+ * @param mixed $value
88
  */
89
  public function setValue( $key, $value ) {
90
+ $transient_data = get_transient( $this->session_id );
91
+ if ( is_array( $transient_data ) ) {
92
+ $transient_data[$key] = $value;
93
+ } else {
94
+ $transient_data = array( $key => $value );
95
+ }
96
+ set_transient( $this->session_id, $transient_data, $this->expiration );
97
  }
98
 
99
  /**
100
  * pushValue
101
  * セッション変数にセット
102
+ * @param string $key キー
103
+ * @param mixed $value
104
  */
105
  public function pushValue( $key, $value ) {
106
+ $transient_data = get_transient( $this->session_id );
107
+ if ( is_array( $transient_data ) ) {
108
+ $transient_data[$key][] = $value;
109
+ } else {
110
+ $transient_data = array( $key => array( $value ) );
111
+ }
112
+ set_transient( $this->session_id, $transient_data, $this->expiration );
113
  }
114
 
115
  /**
116
  * getValue
117
  * セッション変数から取得
118
+ * @param string $key キー
119
+ * @return mixed セッション値
120
  */
121
  public function getValue( $key ) {
122
+ $transient_data = get_transient( $this->session_id );
123
+ if ( is_array( $transient_data ) && isset( $transient_data[$key] ) ) {
124
+ return $transient_data[$key];
125
  }
126
+ return null;
127
  }
128
 
129
  /**
130
  * getValues
131
  * セッション変数から取得
132
+ * @return array セッション値
133
  */
134
  public function getValues() {
135
+ $transient_data = get_transient( $this->session_id );
136
+ if ( is_array( $transient_data ) ) {
137
+ return $transient_data;
138
  }
139
+ return array();
140
  }
141
 
142
  /**
143
  * clearValue
144
  * セッション変数を空に
145
+ * @param string $key キー
146
  */
147
  public function clearValue( $key ) {
148
+ $transient_data = get_transient( $this->session_id );
149
+ if ( is_array( $transient_data ) && isset( $transient_data[$key] ) ) {
150
+ unset( $transient_data[$key] );
151
+ set_transient( $this->session_id, $transient_data, $this->expiration );
152
  }
153
  }
154
 
157
  * セッション変数を空に
158
  */
159
  public function clearValues() {
160
+ delete_transient( $this->session_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  }
162
  }
system/mw_validation.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Validation
4
  * URI: http://2inc.org
5
  * Description: バリデーションクラス
6
- * Version: 1.6.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : July 20, 2012
10
- * Modified: April 23, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
@@ -202,7 +202,7 @@ class MW_Validation {
202
  if ( is_array( $value ) ) {
203
  $value = implode( $this->getSeparatorValue( $key ), $value );
204
  }
205
- if ( !preg_match( '/^[ァ-ヾ]+$/u', $value ) ) {
206
  $defaults = array(
207
  'message' => __( 'Please enter with a Japanese Katakana.', MWF_Config::DOMAIN )
208
  );
@@ -225,7 +225,7 @@ class MW_Validation {
225
  if ( is_array( $value ) ) {
226
  $value = implode( $this->getSeparatorValue( $key ), $value );
227
  }
228
- if ( !preg_match( '/^[ぁ-ゞ]+$/u', $value ) ) {
229
  $defaults = array(
230
  'message' => __( 'Please enter with a Japanese Hiragana.', MWF_Config::DOMAIN )
231
  );
3
  * Name: MW Validation
4
  * URI: http://2inc.org
5
  * Description: バリデーションクラス
6
+ * Version: 1.6.5
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : July 20, 2012
10
+ * Modified: June 13, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
202
  if ( is_array( $value ) ) {
203
  $value = implode( $this->getSeparatorValue( $key ), $value );
204
  }
205
+ if ( !preg_match( '/^[ァ-ヾ  ]*?[ァ-ヾ]+?[ァ-ヾ  ]*?$/u', $value ) ) {
206
  $defaults = array(
207
  'message' => __( 'Please enter with a Japanese Katakana.', MWF_Config::DOMAIN )
208
  );
225
  if ( is_array( $value ) ) {
226
  $value = implode( $this->getSeparatorValue( $key ), $value );
227
  }
228
+ if ( !preg_match( '/^[ぁ-ゞ  ]*?[ぁ-ゞ]+?[ぁ-ゞ  ]*?$/u', $value ) ) {
229
  $defaults = array(
230
  'message' => __( 'Please enter with a Japanese Hiragana.', MWF_Config::DOMAIN )
231
  );
system/mw_wp_form_admin_page.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW WP Form Admin Page
4
  * URI: http://2inc.org
5
  * Description: 管理画面クラス
6
- * Version: 1.9.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : February 21, 2013
10
- * Modified: April 17, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
@@ -408,6 +408,14 @@ class MW_WP_Form_Admin_Page {
408
  <input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[mail_to]" value="<?php echo esc_attr( $this->get_post_data( 'mail_to' ) ); ?>" /><br />
409
  <span class="mwf_note"><?php esc_html_e( 'If empty:', MWF_Config::DOMAIN ); ?> <?php bloginfo( 'admin_email' ); ?></span>
410
  </p>
 
 
 
 
 
 
 
 
411
  <p>
412
  <b><?php esc_html_e( 'Subject', MWF_Config::DOMAIN ); ?></b><br />
413
  <input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[admin_mail_subject]" value="<?php echo esc_attr( $this->get_post_data( 'admin_mail_subject' ) ); ?>" />
3
  * Name: MW WP Form Admin Page
4
  * URI: http://2inc.org
5
  * Description: 管理画面クラス
6
+ * Version: 1.9.2
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : February 21, 2013
10
+ * Modified: June 14, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
408
  <input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[mail_to]" value="<?php echo esc_attr( $this->get_post_data( 'mail_to' ) ); ?>" /><br />
409
  <span class="mwf_note"><?php esc_html_e( 'If empty:', MWF_Config::DOMAIN ); ?> <?php bloginfo( 'admin_email' ); ?></span>
410
  </p>
411
+ <p>
412
+ <b><?php esc_html_e( 'CC ( E-mail address )', MWF_Config::DOMAIN ); ?></b><br />
413
+ <input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[mail_cc]" value="<?php echo esc_attr( $this->get_post_data( 'mail_cc' ) ); ?>" />
414
+ </p>
415
+ <p>
416
+ <b><?php esc_html_e( 'BCC ( E-mail address )', MWF_Config::DOMAIN ); ?></b><br />
417
+ <input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[mail_bcc]" value="<?php echo esc_attr( $this->get_post_data( 'mail_bcc' ) ); ?>" />
418
+ </p>
419
  <p>
420
  <b><?php esc_html_e( 'Subject', MWF_Config::DOMAIN ); ?></b><br />
421
  <input type="text" name="<?php echo esc_attr( MWF_Config::NAME ); ?>[admin_mail_subject]" value="<?php echo esc_attr( $this->get_post_data( 'admin_mail_subject' ) ); ?>" />
system/mw_wp_form_contact_data_page.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW WP Form Contact Data Page
4
  * URI: http://2inc.org
5
  * Description: DB保存データを扱うクラス
6
- * Version: 1.0.6
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : October 10, 2013
10
- * Modified: April 2, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
@@ -134,7 +134,6 @@ class MW_WP_Form_Contact_Data_Page {
134
  $action = $_SERVER['REQUEST_URI'];
135
  ?>
136
  <form id="mw-wp-form_csv" method="post" action="<?php echo esc_url( $action ); ?>">
137
- <input type="hidden" name="test" value="hoge" />
138
  <input type="submit" value="<?php esc_attr_e( 'CSV Download', MWF_Config::DOMAIN ); ?>" class="button-primary" />
139
  <?php wp_nonce_field( MWF_Config::NAME ); ?>
140
  </form>
@@ -183,11 +182,14 @@ class MW_WP_Form_Contact_Data_Page {
183
  setup_postdata( $post );
184
  $column = array();
185
  foreach ( $rows[0] as $key => $value ) {
 
186
  if ( isset( $post->$value ) ) {
187
- $column[$key] = $this->escape_double_quote( $post->$value );
188
- } else {
189
- $post_meta = get_post_meta( $post->ID, $value, true );
190
- $column[$key] = ( $post_meta ) ? $this->escape_double_quote( $post_meta ) : '';
 
 
191
  }
192
  }
193
  $rows[] = $column;
@@ -261,24 +263,33 @@ class MW_WP_Form_Contact_Data_Page {
261
  return $columns;
262
  }
263
  public function add_form_columns( $column, $post_id ) {
 
264
  $post_custom_keys = get_post_custom_keys( $post_id );
265
 
266
- // 前のバージョンでは MWF_Config::UPLOAD_FILE_KEYS を配列で保持していなかったので分岐させる
267
- $_upload_file_keys = get_post_meta( $post_id, '_' . MWF_Config::UPLOAD_FILE_KEYS, true );
268
- if ( is_array( $_upload_file_keys ) ) {
269
- $upload_file_keys = $_upload_file_keys;
270
- } else {
271
- $upload_file_keys = get_post_custom_values( '_' . MWF_Config::UPLOAD_FILE_KEYS, $post_id );
272
- }
273
-
274
  if ( $column == 'post_date' ) {
275
  $post = get_post( $post_id );
276
  echo esc_html( $post->post_date );
277
  }
278
  elseif ( !empty( $post_custom_keys ) && is_array( $post_custom_keys ) && in_array( $column, $post_custom_keys ) ) {
279
  $post_meta = get_post_meta( $post_id, $column, true );
280
- if ( is_array( $upload_file_keys ) && in_array( $column, $upload_file_keys ) ) {
281
- echo '<a href="' . admin_url( '/post.php?post=' ) . $post_meta . '&action=edit">' . $post_meta . '</a>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  } elseif ( $post_meta ) {
283
  echo esc_html( $post_meta );
284
  } else {
@@ -296,13 +307,7 @@ class MW_WP_Form_Contact_Data_Page {
296
  public function custom_fields() {
297
  global $post;
298
  $post_custom = get_post_custom( $post->ID );
299
- // 前のバージョンでは MWF_Config::UPLOAD_FILE_KEYS を配列で保持していなかったので分岐させる
300
- $_upload_file_keys = get_post_meta( $post->ID, '_' . MWF_Config::UPLOAD_FILE_KEYS, true );
301
- if ( is_array( $_upload_file_keys ) ) {
302
- $upload_file_keys = $_upload_file_keys;
303
- } else {
304
- $upload_file_keys = get_post_custom_values( '_' . MWF_Config::UPLOAD_FILE_KEYS, $post->ID );
305
- }
306
  if ( ! empty( $post_custom ) && is_array( $post_custom ) ) {
307
  ?>
308
  <table border="0" cellpadding="0" cellspacing="0">
@@ -314,7 +319,7 @@ class MW_WP_Form_Contact_Data_Page {
314
  <th><?php echo esc_html( $key ); ?></th>
315
  <td>
316
  <?php
317
- if ( is_array( $upload_file_keys ) && in_array( $key, $upload_file_keys ) ) {
318
  $mimetype = get_post_mime_type( $value[0] );
319
  if ( $mimetype ) {
320
  // 画像だったら
@@ -472,4 +477,36 @@ class MW_WP_Form_Contact_Data_Page {
472
  wp_reset_postdata();
473
  return $modified_datetime;
474
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  }
3
  * Name: MW WP Form Contact Data Page
4
  * URI: http://2inc.org
5
  * Description: DB保存データを扱うクラス
6
+ * Version: 1.1.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : October 10, 2013
10
+ * Modified: June 13, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
134
  $action = $_SERVER['REQUEST_URI'];
135
  ?>
136
  <form id="mw-wp-form_csv" method="post" action="<?php echo esc_url( $action ); ?>">
 
137
  <input type="submit" value="<?php esc_attr_e( 'CSV Download', MWF_Config::DOMAIN ); ?>" class="button-primary" />
138
  <?php wp_nonce_field( MWF_Config::NAME ); ?>
139
  </form>
182
  setup_postdata( $post );
183
  $column = array();
184
  foreach ( $rows[0] as $key => $value ) {
185
+ $column[$key] = '';
186
  if ( isset( $post->$value ) ) {
187
+ $post_meta = $post->$value;
188
+ if ( $this->is_upload_file_key( $post, $value ) ) {
189
+ $column[$key] = wp_get_attachment_url( $post_meta );
190
+ } else {
191
+ $column[$key] = ( $post_meta ) ? $this->escape_double_quote( $post_meta ) : '';
192
+ }
193
  }
194
  }
195
  $rows[] = $column;
263
  return $columns;
264
  }
265
  public function add_form_columns( $column, $post_id ) {
266
+ global $post;
267
  $post_custom_keys = get_post_custom_keys( $post_id );
268
 
 
 
 
 
 
 
 
 
269
  if ( $column == 'post_date' ) {
270
  $post = get_post( $post_id );
271
  echo esc_html( $post->post_date );
272
  }
273
  elseif ( !empty( $post_custom_keys ) && is_array( $post_custom_keys ) && in_array( $column, $post_custom_keys ) ) {
274
  $post_meta = get_post_meta( $post_id, $column, true );
275
+ if ( $this->is_upload_file_key( $post, $column ) ) {
276
+
277
+ $mimetype = get_post_mime_type( $post_meta );
278
+ if ( $mimetype ) {
279
+ // 画像だったら
280
+ if ( preg_match( '/^image\/.+?$/', $mimetype ) ) {
281
+ $src = wp_get_attachment_image_src( $post_meta, 'thumbnail' );
282
+ echo '<img src="' . esc_url( $src[0] ) .'" alt="" style="width:50px;height:50px" />';
283
+ }
284
+ // 画像以外
285
+ else {
286
+ $src = wp_get_attachment_image_src( $post_meta, 'none', true );
287
+ echo '<a href="' . esc_url( wp_get_attachment_url( $post_meta ) ) .'" target="_blank">';
288
+ echo '<img src="' . esc_url( $src[0] ) .'" alt="" style="height:50px" />';
289
+ echo '</a>';
290
+ }
291
+ }
292
+
293
  } elseif ( $post_meta ) {
294
  echo esc_html( $post_meta );
295
  } else {
307
  public function custom_fields() {
308
  global $post;
309
  $post_custom = get_post_custom( $post->ID );
310
+
 
 
 
 
 
 
311
  if ( ! empty( $post_custom ) && is_array( $post_custom ) ) {
312
  ?>
313
  <table border="0" cellpadding="0" cellspacing="0">
319
  <th><?php echo esc_html( $key ); ?></th>
320
  <td>
321
  <?php
322
+ if ( $this->is_upload_file_key( $post, $key ) ) {
323
  $mimetype = get_post_mime_type( $value[0] );
324
  if ( $mimetype ) {
325
  // 画像だったら
477
  wp_reset_postdata();
478
  return $modified_datetime;
479
  }
480
+
481
+ /**
482
+ * get_upload_file_keys
483
+ * その投稿がもつ upload_file_key を取得
484
+ * @param object $post
485
+ * @return array $upload_file_keys
486
+ */
487
+ private function get_upload_file_keys( $_post ) {
488
+ // 前のバージョンでは MWF_Config::UPLOAD_FILE_KEYS を配列で保持していなかったので分岐させる
489
+ $_upload_file_keys = get_post_meta( $_post->ID, '_' . MWF_Config::UPLOAD_FILE_KEYS, true );
490
+ if ( is_array( $_upload_file_keys ) ) {
491
+ $upload_file_keys = $_upload_file_keys;
492
+ } else {
493
+ $upload_file_keys = get_post_custom_values( '_' . MWF_Config::UPLOAD_FILE_KEYS, $_post->ID );
494
+ }
495
+ return $upload_file_keys;
496
+ }
497
+
498
+ /**
499
+ * is_upload_file_key
500
+ * $meta_key が $post の upload_file_key かどうか
501
+ * @param object $post
502
+ * @param string $meta_key
503
+ * @return bool
504
+ */
505
+ private function is_upload_file_key( $_post, $meta_key ) {
506
+ $upload_file_keys = $this->get_upload_file_keys( $_post );
507
+ if ( is_array( $upload_file_keys ) && in_array( $meta_key, $upload_file_keys ) ) {
508
+ return true;
509
+ }
510
+ return false;
511
+ }
512
  }
system/mw_wp_form_data.php CHANGED
@@ -3,14 +3,14 @@
3
  * Name: MW WP Form Data
4
  * URI: http://2inc.org
5
  * Description: mw_wp_form のデータ操作用
6
- * Version: 1.0.2
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : October 10, 2013
10
- * Modified: December 19, 2013
11
  * License: GPL2
12
  *
13
- * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
14
  *
15
  * This program is free software; you can redistribute it and/or modify
16
  * it under the terms of the GNU General Public License, version 2, as
@@ -27,7 +27,7 @@
27
  */
28
  class mw_wp_form_data {
29
  private static $Instance;
30
- private $data;
31
  private $Session;
32
 
33
  /**
@@ -48,8 +48,8 @@ class mw_wp_form_data {
48
  /**
49
  * getValue
50
  * データを取得
51
- * @param String $key データのキー
52
- * @return String データ
53
  */
54
  public function getValue( $key ) {
55
  if ( isset( $this->data[$key] ) )
@@ -59,10 +59,10 @@ class mw_wp_form_data {
59
  /**
60
  * getValues
61
  * 全てのデータを取得
62
- * @return Array データ
63
  */
64
  public function getValues() {
65
- if ( $this->data === null)
66
  return array();
67
  return $this->data;
68
  }
@@ -70,8 +70,8 @@ class mw_wp_form_data {
70
  /**
71
  * setValue
72
  * データを追加
73
- * @param String $key データのキー
74
- * @param String $value
75
  */
76
  public function setValue( $key, $value ){
77
  $this->data[$key] = $value;
@@ -81,7 +81,7 @@ class mw_wp_form_data {
81
  /**
82
  * setValue
83
  * 複数のデータを一括で追加
84
- * @param Array
85
  */
86
  public function setValues( Array $array ) {
87
  foreach ( $array as $key => $value ) {
@@ -93,7 +93,7 @@ class mw_wp_form_data {
93
  /**
94
  * clearValue
95
  * データを消す
96
- * @param String $key データのキー
97
  */
98
  public function clearValue( $key ) {
99
  unset( $this->data[$key] );
@@ -103,18 +103,18 @@ class mw_wp_form_data {
103
  /**
104
  * clearValues
105
  * データを消す
106
- * @param String $key データのキー
107
  */
108
  public function clearValues() {
109
- unset( $this->data );
110
  $this->Session->clearValues();
111
  }
112
 
113
  /**
114
  * pushValue
115
  * 指定した $key をキーと配列にデータを追加
116
- * @param String $key データのキー
117
- * @param String $value
118
  */
119
  public function pushValue( $key, $value ) {
120
  $this->data[$key][] = $value;
3
  * Name: MW WP Form Data
4
  * URI: http://2inc.org
5
  * Description: mw_wp_form のデータ操作用
6
+ * Version: 1.0.3
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : October 10, 2013
10
+ * Modified: June 13, 2014
11
  * License: GPL2
12
  *
13
+ * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
14
  *
15
  * This program is free software; you can redistribute it and/or modify
16
  * it under the terms of the GNU General Public License, version 2, as
27
  */
28
  class mw_wp_form_data {
29
  private static $Instance;
30
+ private $data = array();
31
  private $Session;
32
 
33
  /**
48
  /**
49
  * getValue
50
  * データを取得
51
+ * @param string $key データのキー
52
+ * @return string データ
53
  */
54
  public function getValue( $key ) {
55
  if ( isset( $this->data[$key] ) )
59
  /**
60
  * getValues
61
  * 全てのデータを取得
62
+ * @return array データ
63
  */
64
  public function getValues() {
65
+ if ( $this->data === null )
66
  return array();
67
  return $this->data;
68
  }
70
  /**
71
  * setValue
72
  * データを追加
73
+ * @param string $key データのキー
74
+ * @param string $value
75
  */
76
  public function setValue( $key, $value ){
77
  $this->data[$key] = $value;
81
  /**
82
  * setValue
83
  * 複数のデータを一括で追加
84
+ * @param array
85
  */
86
  public function setValues( Array $array ) {
87
  foreach ( $array as $key => $value ) {
93
  /**
94
  * clearValue
95
  * データを消す
96
+ * @param string $key データのキー
97
  */
98
  public function clearValue( $key ) {
99
  unset( $this->data[$key] );
103
  /**
104
  * clearValues
105
  * データを消す
106
+ * @param string $key データのキー
107
  */
108
  public function clearValues() {
109
+ $this->data = array();
110
  $this->Session->clearValues();
111
  }
112
 
113
  /**
114
  * pushValue
115
  * 指定した $key をキーと配列にデータを追加
116
+ * @param string $key データのキー
117
+ * @param string $value
118
  */
119
  public function pushValue( $key, $value ) {
120
  $this->data[$key][] = $value;