MW WP Form - Version 0.7

Version Description

  • Added :
  • Added :
  • Bug fix: QTags JS
Download this release

Release Info

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

Code changes from version 0.6.4 to 0.7

css/admin.css CHANGED
@@ -3,7 +3,29 @@
3
  /**
4
  * 投稿ステータス等
5
  */
6
- #minor-publishing-actions {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  display: none;
8
  }
9
 
@@ -120,3 +142,26 @@ span#formkey_field {
120
  cursor: pointer;
121
  display: block;
122
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
  * 投稿ステータス等
5
  */
6
+ #minor-publishing-actions,
7
+ #misc-publishing-actions {
8
+ display: none;
9
+ }
10
+
11
+ /**
12
+ * 更新時の記事リンク
13
+ */
14
+ .post-php #message a {
15
+ display: none;
16
+ }
17
+
18
+ /**
19
+ * クイック編集リンク
20
+ */
21
+ .wp-list-table .post-title span.hide-if-no-js {
22
+ display: none;
23
+ }
24
+
25
+ /**
26
+ * 抜粋表示の続きを読む
27
+ */
28
+ .wp-list-table .post-title span.more-link {
29
  display: none;
30
  }
31
 
142
  cursor: pointer;
143
  display: block;
144
  }
145
+
146
+ /**
147
+ * DB保存データのカスタムフィールド
148
+ */
149
+ #mw-wp-form_custom_fields table {
150
+ border-top: #dfdfdf solid 1px;
151
+ border-right: #dfdfdf solid 1px;
152
+ width: 100%;
153
+ }
154
+ #mw-wp-form_custom_fields table th,
155
+ #mw-wp-form_custom_fields table td {
156
+ border-bottom: #dfdfdf solid 1px;
157
+ border-left: #dfdfdf solid 1px;
158
+ padding: 5px 10px;
159
+ text-align: left;
160
+ vertical-align: top;
161
+ width: 30%;
162
+ }
163
+ #mw-wp-form_custom_fields table td {
164
+ background-color: #fff;
165
+ width: 70%;
166
+ }
167
+
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 0.6\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
- "POT-Creation-Date: 2013-04-01 07:59:46+00:00\n"
8
- "PO-Revision-Date: 2013-04-01 17:00+0900\n"
9
  "Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
10
  "Language-Team: Takashi Kitajima <inc@2inc.org>\n"
11
  "MIME-Version: 1.0\n"
@@ -18,198 +18,223 @@ msgstr ""
18
  "X-Poedit-KeywordsList: __;_e;_x\n"
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
- #: form_fields/mw_form_field_back_button.php:36
22
- #: system/mw_wp_form_admin_page.php:214
 
 
 
 
23
  msgid "Back"
24
  msgstr "戻る"
25
 
26
- #: form_fields/mw_form_field_preview_button.php:36
27
- #: form_fields/mw_form_field_submit.php:37
28
  msgid "Confirm"
29
  msgstr "確認画面へ"
30
 
31
- #: form_fields/mw_form_field_submit.php:38
32
- #: form_fields/mw_form_field_submit_button.php:37
33
  msgid "Send"
34
  msgstr "送信する"
35
 
36
- #: mw-wp-form.php:275
37
- msgid "Validation Object is not a MW Validation Class."
38
- msgstr ""
39
-
40
- #: system/mw_validation.php:75
41
  msgid "This is required."
42
  msgstr "必須項目です。"
43
 
44
- #: system/mw_validation.php:95 system/mw_validation.php:117
45
  msgid "Please enter."
46
  msgstr "未入力です。"
47
 
48
- #: system/mw_validation.php:139
49
  msgid "Please enter with a half-width alphabetic character."
50
  msgstr "半角英字で入力してください。"
51
 
52
- #: system/mw_validation.php:161
53
  msgid "Please enter with a half-width number."
54
  msgstr "半角数字で入力してください。"
55
 
56
- #: system/mw_validation.php:183
57
  msgid "Please enter with a half-width alphanumeric character."
58
  msgstr "半角英数字で入力してください。"
59
 
60
- #: system/mw_validation.php:205
61
  msgid "This is not the format of a zip code."
62
  msgstr "郵便番号の形式ではありません。"
63
 
64
- #: system/mw_validation.php:232
65
  msgid "This is not the format of a tel number."
66
  msgstr "電話番号の形式ではありません。"
67
 
68
- #: system/mw_validation.php:259
69
  msgid "This is not the format of a mail address."
70
  msgstr "メールアドレスの形式ではありません。"
71
 
72
- #: system/mw_validation.php:281
73
  msgid "This is not the format of a url."
74
  msgstr "URLの形式ではありません。"
75
 
76
- #: system/mw_validation.php:304
77
  msgid "This is not in agreement."
78
  msgstr "一致しません。"
79
 
80
- #: system/mw_validation.php:328
81
  msgid "The number of characters is invalid."
82
  msgstr "文字数が正しくありません。"
83
 
84
- #: system/mw_validation.php:352
85
  msgid "The number of characters is a few."
86
  msgstr "文字数が足りません。"
87
 
88
- #: system/mw_validation.php:376
89
  msgid "This value is invalid."
90
  msgstr "値が不正です。"
91
 
92
- #: system/mw_validation.php:398
93
  msgid "This is not the format of a date."
94
  msgstr "日付の形式ではありません。"
95
 
96
- #: system/mw_wp_form_admin_page.php:65
97
  msgid "Add New Form"
98
  msgstr "フォームを追加"
99
 
100
- #: system/mw_wp_form_admin_page.php:66
101
  msgid "Edit Form"
102
  msgstr "フォームを編集"
103
 
104
- #: system/mw_wp_form_admin_page.php:67
105
  msgid "New Form"
106
  msgstr "新しいフォーム"
107
 
108
- #: system/mw_wp_form_admin_page.php:68
109
  msgid "View Form"
110
  msgstr "フォームを表示"
111
 
112
- #: system/mw_wp_form_admin_page.php:69
113
  msgid "Search Forms"
114
  msgstr "フォームを検索"
115
 
116
- #: system/mw_wp_form_admin_page.php:70
117
  msgid "No Forms found"
118
  msgstr "フォームがありません"
119
 
120
- #: system/mw_wp_form_admin_page.php:71
121
  msgid "No Forms found in Trash"
122
  msgstr "ゴミ箱にフォームはありません"
123
 
124
- #: system/mw_wp_form_admin_page.php:109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  msgid "Complete Message"
126
  msgstr "完了画面メッセージ"
127
 
128
- #: system/mw_wp_form_admin_page.php:116
129
  msgid "URL Options"
130
  msgstr "URL設定"
131
 
132
- #: system/mw_wp_form_admin_page.php:123
133
  msgid "Validation Rule"
134
  msgstr "バリデーションルール"
135
 
136
- #: system/mw_wp_form_admin_page.php:130
137
  msgid "Form Key"
138
  msgstr "フォーム識別子"
139
 
140
- #: system/mw_wp_form_admin_page.php:137
141
- msgid "Activate Query string of post"
142
- msgstr "URL引数を有効にする"
143
-
144
- #: system/mw_wp_form_admin_page.php:144
145
  msgid "Mail Options"
146
  msgstr "メール設定"
147
 
148
- #: system/mw_wp_form_admin_page.php:160
 
 
 
 
 
 
 
 
149
  msgid "Text"
150
  msgstr "テキストフィールド"
151
 
152
- #: system/mw_wp_form_admin_page.php:166
153
  msgid "Textarea"
154
  msgstr "テキストエリア"
155
 
156
- #: system/mw_wp_form_admin_page.php:172
157
  msgid "Zip Code"
158
  msgstr "郵便番号"
159
 
160
- #: system/mw_wp_form_admin_page.php:178 system/mw_wp_form_admin_page.php:458
 
161
  msgid "Tel"
162
  msgstr "電話番号"
163
 
164
- #: system/mw_wp_form_admin_page.php:184
165
  msgid "Select"
166
  msgstr "セレクトボックス"
167
 
168
- #: system/mw_wp_form_admin_page.php:190
169
  msgid "Radio"
170
  msgstr "ラジオボタン"
171
 
172
- #: system/mw_wp_form_admin_page.php:196
173
  msgid "Checkbox"
174
  msgstr "チェックボックス"
175
 
176
- #: system/mw_wp_form_admin_page.php:202
177
  msgid "Datepicker"
178
  msgstr "日付"
179
 
180
- #: system/mw_wp_form_admin_page.php:208
181
  msgid "Password"
182
  msgstr "パスワードフィールド"
183
 
184
- #: system/mw_wp_form_admin_page.php:220
185
  msgid "Confirm &amp; Submit"
186
  msgstr "確認・送信"
187
 
188
- #: system/mw_wp_form_admin_page.php:226
189
  msgid "Submit"
190
  msgstr "送信"
191
 
192
- #: system/mw_wp_form_admin_page.php:232
193
  msgid "Button"
194
  msgstr "ボタン"
195
 
196
- #: system/mw_wp_form_admin_page.php:238
197
  msgid "Hidden"
198
  msgstr "hiddenフィールド"
199
 
200
- #: system/mw_wp_form_admin_page.php:244
201
  msgid "Error Message"
202
  msgstr "エラーメッセージ"
203
 
204
- #: system/mw_wp_form_admin_page.php:322
205
  msgid "Copy and Paste this shortcode."
206
  msgstr "このショートコードをコピー&ペーストしてください。"
207
 
208
- #: system/mw_wp_form_admin_page.php:336
209
- msgid "Active"
210
- msgstr "有効にする"
211
 
212
- #: system/mw_wp_form_admin_page.php:337
213
  msgid ""
214
  "If this field is active, MW WP Form get the post as query string \"post_id\" "
215
  "and you can use $post's property in editor"
@@ -217,124 +242,116 @@ msgstr ""
217
  "有効にした場合、MW WP FormはURL引数 ”post_id\" をもとに投稿を取得して、その投"
218
  "稿($post) のプロパティを使用できるようになります。"
219
 
220
- #: system/mw_wp_form_admin_page.php:338
221
  msgid "Example: {ID}, {post_title}, {post_meta} etc..."
222
  msgstr "例:{ID}、{post_title}、{post_meta}など…"
223
 
224
- #: system/mw_wp_form_admin_page.php:364
 
 
 
 
225
  msgid "To ( E-mail address )"
226
  msgstr "送信先(E-mailアドレス)"
227
 
228
- #: system/mw_wp_form_admin_page.php:366
229
  msgid "If empty: Using admin E-mail address."
230
  msgstr "未入力の場合:管理者のE-mailアドレスを使用します。"
231
 
232
- #: system/mw_wp_form_admin_page.php:369
233
  msgid "Subject"
234
  msgstr "件名"
235
 
236
- #: system/mw_wp_form_admin_page.php:373
237
  msgid "Ccontent"
238
  msgstr "本文"
239
 
240
- #: system/mw_wp_form_admin_page.php:375
241
  msgid "{key} is converted form data."
242
  msgstr "{キー}でそのフォーム項目に変換されます。"
243
 
244
- #: system/mw_wp_form_admin_page.php:378
245
  msgid "Automatic reply email"
246
  msgstr "自動返信メール"
247
 
248
- #: system/mw_wp_form_admin_page.php:380
249
  msgid "Please input the key to use as transmission to automatic reply email."
250
  msgstr "自動返信メールに使用する項目のキーを入力してください。"
251
 
252
- #: system/mw_wp_form_admin_page.php:395
253
  msgid "Input Page URL"
254
  msgstr "入力画面URL"
255
 
256
- #: system/mw_wp_form_admin_page.php:401
257
  msgid "Confirmation Page URL"
258
  msgstr "確認画面URL"
259
 
260
- #: system/mw_wp_form_admin_page.php:407
261
  msgid "Complete Page URL"
262
  msgstr "完了画面URL"
263
 
264
- #: system/mw_wp_form_admin_page.php:442
265
  msgid "Add Validation rule"
266
  msgstr "バリデーションルールを追加"
267
 
268
- #: system/mw_wp_form_admin_page.php:448
269
  msgid "The key which applies validation"
270
  msgstr "バリデーションを適用する項目"
271
 
272
- #: system/mw_wp_form_admin_page.php:452
273
  msgid "No empty"
274
  msgstr "必須項目"
275
 
276
- #: system/mw_wp_form_admin_page.php:453
277
  msgid "No empty( with checkbox )"
278
  msgstr "必須項目(チェックボックス)"
279
 
280
- #: system/mw_wp_form_admin_page.php:454
281
  msgid "Numeric"
282
  msgstr "半角数字"
283
 
284
- #: system/mw_wp_form_admin_page.php:455
285
  msgid "Alphabet"
286
  msgstr "半角英字"
287
 
288
- #: system/mw_wp_form_admin_page.php:456
289
  msgid "Alphabet and Numeric"
290
  msgstr "半角英数字"
291
 
292
- #: system/mw_wp_form_admin_page.php:457
293
  msgid "Zip code"
294
  msgstr "郵便番号"
295
 
296
- #: system/mw_wp_form_admin_page.php:459
297
  msgid "E-mail"
298
  msgstr "メールアドレス"
299
 
300
- #: system/mw_wp_form_admin_page.php:460
301
  msgid "Date"
302
  msgstr "日付"
303
 
304
- #: system/mw_wp_form_admin_page.php:464
305
  msgid "The key at same value"
306
  msgstr "一致する項目"
307
 
308
- #: system/mw_wp_form_admin_page.php:468
309
  msgid "The range of the number of characters"
310
  msgstr "文字数の範囲"
311
 
312
- #: system/mw_wp_form_admin_page.php:476
313
  msgid "The number of the minimum characters"
314
  msgstr "最小文字数"
315
 
316
- #. Plugin Name of the plugin/theme
317
- msgid "MW WP Form"
318
- msgstr ""
319
 
320
- #. Plugin URI of the plugin/theme
321
- msgid "http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/"
322
- msgstr ""
323
 
324
- #. Description of the plugin/theme
325
- msgid ""
326
- "MW WP Form can create mail form with a confirmation screen using shortcode."
327
- msgstr ""
328
- "MW WP Formはショートコードを使って確認画面付きのフォームを作成しメールを送信"
329
- "することができます。"
330
-
331
- #. Author of the plugin/theme
332
- msgid "inc2734"
333
- msgstr ""
334
-
335
- #. Author URI of the plugin/theme
336
- msgid "http://2inc.org"
337
- msgstr ""
338
 
339
  #~ msgid "Zip"
340
  #~ msgstr "郵便番号"
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 0.7\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
+ "POT-Creation-Date: 2013-04-18 18:56+0900\n"
8
+ "PO-Revision-Date: 2013-04-18 18:56+0900\n"
9
  "Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
10
  "Language-Team: Takashi Kitajima <inc@2inc.org>\n"
11
  "MIME-Version: 1.0\n"
18
  "X-Poedit-KeywordsList: __;_e;_x\n"
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
+ #: ../mw-wp-form.php:319
22
+ msgid "Validation Object is not a MW Validation Class."
23
+ msgstr ""
24
+
25
+ #: ../form_fields/mw_form_field_back_button.php:36
26
+ #: ../system/mw_wp_form_admin_page.php:278
27
  msgid "Back"
28
  msgstr "戻る"
29
 
30
+ #: ../form_fields/mw_form_field_preview_button.php:36
31
+ #: ../form_fields/mw_form_field_submit.php:37
32
  msgid "Confirm"
33
  msgstr "確認画面へ"
34
 
35
+ #: ../form_fields/mw_form_field_submit.php:38
36
+ #: ../form_fields/mw_form_field_submit_button.php:37
37
  msgid "Send"
38
  msgstr "送信する"
39
 
40
+ #: ../system/mw_validation.php:75
 
 
 
 
41
  msgid "This is required."
42
  msgstr "必須項目です。"
43
 
44
+ #: ../system/mw_validation.php:95 ../system/mw_validation.php:117
45
  msgid "Please enter."
46
  msgstr "未入力です。"
47
 
48
+ #: ../system/mw_validation.php:139
49
  msgid "Please enter with a half-width alphabetic character."
50
  msgstr "半角英字で入力してください。"
51
 
52
+ #: ../system/mw_validation.php:161
53
  msgid "Please enter with a half-width number."
54
  msgstr "半角数字で入力してください。"
55
 
56
+ #: ../system/mw_validation.php:183
57
  msgid "Please enter with a half-width alphanumeric character."
58
  msgstr "半角英数字で入力してください。"
59
 
60
+ #: ../system/mw_validation.php:205
61
  msgid "This is not the format of a zip code."
62
  msgstr "郵便番号の形式ではありません。"
63
 
64
+ #: ../system/mw_validation.php:232
65
  msgid "This is not the format of a tel number."
66
  msgstr "電話番号の形式ではありません。"
67
 
68
+ #: ../system/mw_validation.php:259
69
  msgid "This is not the format of a mail address."
70
  msgstr "メールアドレスの形式ではありません。"
71
 
72
+ #: ../system/mw_validation.php:281
73
  msgid "This is not the format of a url."
74
  msgstr "URLの形式ではありません。"
75
 
76
+ #: ../system/mw_validation.php:304
77
  msgid "This is not in agreement."
78
  msgstr "一致しません。"
79
 
80
+ #: ../system/mw_validation.php:328
81
  msgid "The number of characters is invalid."
82
  msgstr "文字数が正しくありません。"
83
 
84
+ #: ../system/mw_validation.php:352
85
  msgid "The number of characters is a few."
86
  msgstr "文字数が足りません。"
87
 
88
+ #: ../system/mw_validation.php:376
89
  msgid "This value is invalid."
90
  msgstr "値が不正です。"
91
 
92
+ #: ../system/mw_validation.php:398
93
  msgid "This is not the format of a date."
94
  msgstr "日付の形式ではありません。"
95
 
96
+ #: ../system/mw_wp_form_admin_page.php:69
97
  msgid "Add New Form"
98
  msgstr "フォームを追加"
99
 
100
+ #: ../system/mw_wp_form_admin_page.php:70
101
  msgid "Edit Form"
102
  msgstr "フォームを編集"
103
 
104
+ #: ../system/mw_wp_form_admin_page.php:71
105
  msgid "New Form"
106
  msgstr "新しいフォーム"
107
 
108
+ #: ../system/mw_wp_form_admin_page.php:72
109
  msgid "View Form"
110
  msgstr "フォームを表示"
111
 
112
+ #: ../system/mw_wp_form_admin_page.php:73
113
  msgid "Search Forms"
114
  msgstr "フォームを検索"
115
 
116
+ #: ../system/mw_wp_form_admin_page.php:74
117
  msgid "No Forms found"
118
  msgstr "フォームがありません"
119
 
120
+ #: ../system/mw_wp_form_admin_page.php:75
121
  msgid "No Forms found in Trash"
122
  msgstr "ゴミ箱にフォームはありません"
123
 
124
+ #: ../system/mw_wp_form_admin_page.php:96
125
+ msgid "Edit "
126
+ msgstr "編集"
127
+
128
+ #: ../system/mw_wp_form_admin_page.php:97
129
+ msgid "View"
130
+ msgstr "表示"
131
+
132
+ #: ../system/mw_wp_form_admin_page.php:98
133
+ msgid "Search"
134
+ msgstr "検索"
135
+
136
+ #: ../system/mw_wp_form_admin_page.php:99
137
+ msgid "No data found"
138
+ msgstr "データがありません"
139
+
140
+ #: ../system/mw_wp_form_admin_page.php:100
141
+ msgid "No data found in Trash"
142
+ msgstr "ゴミ箱にデータはありません"
143
+
144
+ #: ../system/mw_wp_form_admin_page.php:138
145
  msgid "Complete Message"
146
  msgstr "完了画面メッセージ"
147
 
148
+ #: ../system/mw_wp_form_admin_page.php:145
149
  msgid "URL Options"
150
  msgstr "URL設定"
151
 
152
+ #: ../system/mw_wp_form_admin_page.php:152
153
  msgid "Validation Rule"
154
  msgstr "バリデーションルール"
155
 
156
+ #: ../system/mw_wp_form_admin_page.php:159
157
  msgid "Form Key"
158
  msgstr "フォーム識別子"
159
 
160
+ #: ../system/mw_wp_form_admin_page.php:166
 
 
 
 
161
  msgid "Mail Options"
162
  msgstr "メール設定"
163
 
164
+ #: ../system/mw_wp_form_admin_page.php:173
165
+ msgid "settings"
166
+ msgstr "設定"
167
+
168
+ #: ../system/mw_wp_form_admin_page.php:180
169
+ msgid "Custom Fields"
170
+ msgstr "カスタムフィールド"
171
+
172
+ #: ../system/mw_wp_form_admin_page.php:224
173
  msgid "Text"
174
  msgstr "テキストフィールド"
175
 
176
+ #: ../system/mw_wp_form_admin_page.php:230
177
  msgid "Textarea"
178
  msgstr "テキストエリア"
179
 
180
+ #: ../system/mw_wp_form_admin_page.php:236
181
  msgid "Zip Code"
182
  msgstr "郵便番号"
183
 
184
+ #: ../system/mw_wp_form_admin_page.php:242
185
+ #: ../system/mw_wp_form_admin_page.php:527
186
  msgid "Tel"
187
  msgstr "電話番号"
188
 
189
+ #: ../system/mw_wp_form_admin_page.php:248
190
  msgid "Select"
191
  msgstr "セレクトボックス"
192
 
193
+ #: ../system/mw_wp_form_admin_page.php:254
194
  msgid "Radio"
195
  msgstr "ラジオボタン"
196
 
197
+ #: ../system/mw_wp_form_admin_page.php:260
198
  msgid "Checkbox"
199
  msgstr "チェックボックス"
200
 
201
+ #: ../system/mw_wp_form_admin_page.php:266
202
  msgid "Datepicker"
203
  msgstr "日付"
204
 
205
+ #: ../system/mw_wp_form_admin_page.php:272
206
  msgid "Password"
207
  msgstr "パスワードフィールド"
208
 
209
+ #: ../system/mw_wp_form_admin_page.php:284
210
  msgid "Confirm &amp; Submit"
211
  msgstr "確認・送信"
212
 
213
+ #: ../system/mw_wp_form_admin_page.php:290
214
  msgid "Submit"
215
  msgstr "送信"
216
 
217
+ #: ../system/mw_wp_form_admin_page.php:296
218
  msgid "Button"
219
  msgstr "ボタン"
220
 
221
+ #: ../system/mw_wp_form_admin_page.php:302
222
  msgid "Hidden"
223
  msgstr "hiddenフィールド"
224
 
225
+ #: ../system/mw_wp_form_admin_page.php:308
226
  msgid "Error Message"
227
  msgstr "エラーメッセージ"
228
 
229
+ #: ../system/mw_wp_form_admin_page.php:388
230
  msgid "Copy and Paste this shortcode."
231
  msgstr "このショートコードをコピー&ペーストしてください。"
232
 
233
+ #: ../system/mw_wp_form_admin_page.php:402
234
+ msgid "Activate Query string of post"
235
+ msgstr "URL引数を有効にする"
236
 
237
+ #: ../system/mw_wp_form_admin_page.php:403
238
  msgid ""
239
  "If this field is active, MW WP Form get the post as query string \"post_id\" "
240
  "and you can use $post's property in editor"
242
  "有効にした場合、MW WP FormはURL引数 ”post_id\" をもとに投稿を取得して、その投"
243
  "稿($post) のプロパティを使用できるようになります。"
244
 
245
+ #: ../system/mw_wp_form_admin_page.php:404
246
  msgid "Example: {ID}, {post_title}, {post_meta} etc..."
247
  msgstr "例:{ID}、{post_title}、{post_meta}など…"
248
 
249
+ #: ../system/mw_wp_form_admin_page.php:407
250
+ msgid "Saving contact data in database"
251
+ msgstr "問い合わせデータをデータベースに保存"
252
+
253
+ #: ../system/mw_wp_form_admin_page.php:433
254
  msgid "To ( E-mail address )"
255
  msgstr "送信先(E-mailアドレス)"
256
 
257
+ #: ../system/mw_wp_form_admin_page.php:435
258
  msgid "If empty: Using admin E-mail address."
259
  msgstr "未入力の場合:管理者のE-mailアドレスを使用します。"
260
 
261
+ #: ../system/mw_wp_form_admin_page.php:438
262
  msgid "Subject"
263
  msgstr "件名"
264
 
265
+ #: ../system/mw_wp_form_admin_page.php:442
266
  msgid "Ccontent"
267
  msgstr "本文"
268
 
269
+ #: ../system/mw_wp_form_admin_page.php:444
270
  msgid "{key} is converted form data."
271
  msgstr "{キー}でそのフォーム項目に変換されます。"
272
 
273
+ #: ../system/mw_wp_form_admin_page.php:447
274
  msgid "Automatic reply email"
275
  msgstr "自動返信メール"
276
 
277
+ #: ../system/mw_wp_form_admin_page.php:449
278
  msgid "Please input the key to use as transmission to automatic reply email."
279
  msgstr "自動返信メールに使用する項目のキーを入力してください。"
280
 
281
+ #: ../system/mw_wp_form_admin_page.php:464
282
  msgid "Input Page URL"
283
  msgstr "入力画面URL"
284
 
285
+ #: ../system/mw_wp_form_admin_page.php:470
286
  msgid "Confirmation Page URL"
287
  msgstr "確認画面URL"
288
 
289
+ #: ../system/mw_wp_form_admin_page.php:476
290
  msgid "Complete Page URL"
291
  msgstr "完了画面URL"
292
 
293
+ #: ../system/mw_wp_form_admin_page.php:511
294
  msgid "Add Validation rule"
295
  msgstr "バリデーションルールを追加"
296
 
297
+ #: ../system/mw_wp_form_admin_page.php:517
298
  msgid "The key which applies validation"
299
  msgstr "バリデーションを適用する項目"
300
 
301
+ #: ../system/mw_wp_form_admin_page.php:521
302
  msgid "No empty"
303
  msgstr "必須項目"
304
 
305
+ #: ../system/mw_wp_form_admin_page.php:522
306
  msgid "No empty( with checkbox )"
307
  msgstr "必須項目(チェックボックス)"
308
 
309
+ #: ../system/mw_wp_form_admin_page.php:523
310
  msgid "Numeric"
311
  msgstr "半角数字"
312
 
313
+ #: ../system/mw_wp_form_admin_page.php:524
314
  msgid "Alphabet"
315
  msgstr "半角英字"
316
 
317
+ #: ../system/mw_wp_form_admin_page.php:525
318
  msgid "Alphabet and Numeric"
319
  msgstr "半角英数字"
320
 
321
+ #: ../system/mw_wp_form_admin_page.php:526
322
  msgid "Zip code"
323
  msgstr "郵便番号"
324
 
325
+ #: ../system/mw_wp_form_admin_page.php:528
326
  msgid "E-mail"
327
  msgstr "メールアドレス"
328
 
329
+ #: ../system/mw_wp_form_admin_page.php:529
330
  msgid "Date"
331
  msgstr "日付"
332
 
333
+ #: ../system/mw_wp_form_admin_page.php:533
334
  msgid "The key at same value"
335
  msgstr "一致する項目"
336
 
337
+ #: ../system/mw_wp_form_admin_page.php:537
338
  msgid "The range of the number of characters"
339
  msgstr "文字数の範囲"
340
 
341
+ #: ../system/mw_wp_form_admin_page.php:545
342
  msgid "The number of the minimum characters"
343
  msgstr "最小文字数"
344
 
345
+ #: ../system/mw_wp_form_admin_page.php:583
346
+ msgid "Registed Date"
347
+ msgstr "登録日時"
348
 
349
+ #~ msgid "MW WP Form can create mail form with a confirmation screen."
350
+ #~ msgstr ""
351
+ #~ "MW WP Formは確認画面付きのフォームを作成しメールを送信することができます。"
352
 
353
+ #~ msgid "Active"
354
+ #~ msgstr "有効にする"
 
 
 
 
 
 
 
 
 
 
 
 
355
 
356
  #~ msgid "Zip"
357
  #~ msgstr "郵便番号"
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 0.6.4\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
- "POT-Creation-Date: 2013-04-01 07:59:46+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -19,7 +19,7 @@ msgstr ""
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
  #: form_fields/mw_form_field_back_button.php:36
22
- #: system/mw_wp_form_admin_page.php:214
23
  msgid "Back"
24
  msgstr ""
25
 
@@ -33,7 +33,7 @@ msgstr ""
33
  msgid "Send"
34
  msgstr ""
35
 
36
- #: mw-wp-form.php:275
37
  msgid "Validation Object is not a MW Validation Class."
38
  msgstr ""
39
 
@@ -93,224 +93,256 @@ msgstr ""
93
  msgid "This is not the format of a date."
94
  msgstr ""
95
 
96
- #: system/mw_wp_form_admin_page.php:65
97
  msgid "Add New Form"
98
  msgstr ""
99
 
100
- #: system/mw_wp_form_admin_page.php:66
101
  msgid "Edit Form"
102
  msgstr ""
103
 
104
- #: system/mw_wp_form_admin_page.php:67
105
  msgid "New Form"
106
  msgstr ""
107
 
108
- #: system/mw_wp_form_admin_page.php:68
109
  msgid "View Form"
110
  msgstr ""
111
 
112
- #: system/mw_wp_form_admin_page.php:69
113
  msgid "Search Forms"
114
  msgstr ""
115
 
116
- #: system/mw_wp_form_admin_page.php:70
117
  msgid "No Forms found"
118
  msgstr ""
119
 
120
- #: system/mw_wp_form_admin_page.php:71
121
  msgid "No Forms found in Trash"
122
  msgstr ""
123
 
124
- #: system/mw_wp_form_admin_page.php:109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  msgid "Complete Message"
126
  msgstr ""
127
 
128
- #: system/mw_wp_form_admin_page.php:116
129
  msgid "URL Options"
130
  msgstr ""
131
 
132
- #: system/mw_wp_form_admin_page.php:123
133
  msgid "Validation Rule"
134
  msgstr ""
135
 
136
- #: system/mw_wp_form_admin_page.php:130
137
  msgid "Form Key"
138
  msgstr ""
139
 
140
- #: system/mw_wp_form_admin_page.php:137
141
- msgid "Activate Query string of post"
142
  msgstr ""
143
 
144
- #: system/mw_wp_form_admin_page.php:144
145
- msgid "Mail Options"
 
 
 
 
146
  msgstr ""
147
 
148
- #: system/mw_wp_form_admin_page.php:160
149
  msgid "Text"
150
  msgstr ""
151
 
152
- #: system/mw_wp_form_admin_page.php:166
153
  msgid "Textarea"
154
  msgstr ""
155
 
156
- #: system/mw_wp_form_admin_page.php:172
157
  msgid "Zip Code"
158
  msgstr ""
159
 
160
- #: system/mw_wp_form_admin_page.php:178 system/mw_wp_form_admin_page.php:458
161
  msgid "Tel"
162
  msgstr ""
163
 
164
- #: system/mw_wp_form_admin_page.php:184
165
  msgid "Select"
166
  msgstr ""
167
 
168
- #: system/mw_wp_form_admin_page.php:190
169
  msgid "Radio"
170
  msgstr ""
171
 
172
- #: system/mw_wp_form_admin_page.php:196
173
  msgid "Checkbox"
174
  msgstr ""
175
 
176
- #: system/mw_wp_form_admin_page.php:202
177
  msgid "Datepicker"
178
  msgstr ""
179
 
180
- #: system/mw_wp_form_admin_page.php:208
181
  msgid "Password"
182
  msgstr ""
183
 
184
- #: system/mw_wp_form_admin_page.php:220
185
  msgid "Confirm &amp; Submit"
186
  msgstr ""
187
 
188
- #: system/mw_wp_form_admin_page.php:226
189
  msgid "Submit"
190
  msgstr ""
191
 
192
- #: system/mw_wp_form_admin_page.php:232
193
  msgid "Button"
194
  msgstr ""
195
 
196
- #: system/mw_wp_form_admin_page.php:238
197
  msgid "Hidden"
198
  msgstr ""
199
 
200
- #: system/mw_wp_form_admin_page.php:244
201
  msgid "Error Message"
202
  msgstr ""
203
 
204
- #: system/mw_wp_form_admin_page.php:322
205
  msgid "Copy and Paste this shortcode."
206
  msgstr ""
207
 
208
- #: system/mw_wp_form_admin_page.php:336
209
- msgid "Active"
210
  msgstr ""
211
 
212
- #: system/mw_wp_form_admin_page.php:337
213
  msgid ""
214
  "If this field is active, MW WP Form get the post as query string \"post_id\" "
215
  "and you can use $post's property in editor"
216
  msgstr ""
217
 
218
- #: system/mw_wp_form_admin_page.php:338
219
  msgid "Example: {ID}, {post_title}, {post_meta} etc..."
220
  msgstr ""
221
 
222
- #: system/mw_wp_form_admin_page.php:364
 
 
 
 
223
  msgid "To ( E-mail address )"
224
  msgstr ""
225
 
226
- #: system/mw_wp_form_admin_page.php:366
227
  msgid "If empty: Using admin E-mail address."
228
  msgstr ""
229
 
230
- #: system/mw_wp_form_admin_page.php:369
231
  msgid "Subject"
232
  msgstr ""
233
 
234
- #: system/mw_wp_form_admin_page.php:373
235
  msgid "Ccontent"
236
  msgstr ""
237
 
238
- #: system/mw_wp_form_admin_page.php:375
239
  msgid "{key} is converted form data."
240
  msgstr ""
241
 
242
- #: system/mw_wp_form_admin_page.php:378
243
  msgid "Automatic reply email"
244
  msgstr ""
245
 
246
- #: system/mw_wp_form_admin_page.php:380
247
  msgid "Please input the key to use as transmission to automatic reply email."
248
  msgstr ""
249
 
250
- #: system/mw_wp_form_admin_page.php:395
251
  msgid "Input Page URL"
252
  msgstr ""
253
 
254
- #: system/mw_wp_form_admin_page.php:401
255
  msgid "Confirmation Page URL"
256
  msgstr ""
257
 
258
- #: system/mw_wp_form_admin_page.php:407
259
  msgid "Complete Page URL"
260
  msgstr ""
261
 
262
- #: system/mw_wp_form_admin_page.php:442
263
  msgid "Add Validation rule"
264
  msgstr ""
265
 
266
- #: system/mw_wp_form_admin_page.php:448
267
  msgid "The key which applies validation"
268
  msgstr ""
269
 
270
- #: system/mw_wp_form_admin_page.php:452
271
  msgid "No empty"
272
  msgstr ""
273
 
274
- #: system/mw_wp_form_admin_page.php:453
275
  msgid "No empty( with checkbox )"
276
  msgstr ""
277
 
278
- #: system/mw_wp_form_admin_page.php:454
279
  msgid "Numeric"
280
  msgstr ""
281
 
282
- #: system/mw_wp_form_admin_page.php:455
283
  msgid "Alphabet"
284
  msgstr ""
285
 
286
- #: system/mw_wp_form_admin_page.php:456
287
  msgid "Alphabet and Numeric"
288
  msgstr ""
289
 
290
- #: system/mw_wp_form_admin_page.php:457
291
  msgid "Zip code"
292
  msgstr ""
293
 
294
- #: system/mw_wp_form_admin_page.php:459
295
  msgid "E-mail"
296
  msgstr ""
297
 
298
- #: system/mw_wp_form_admin_page.php:460
299
  msgid "Date"
300
  msgstr ""
301
 
302
- #: system/mw_wp_form_admin_page.php:464
303
  msgid "The key at same value"
304
  msgstr ""
305
 
306
- #: system/mw_wp_form_admin_page.php:468
307
  msgid "The range of the number of characters"
308
  msgstr ""
309
 
310
- #: system/mw_wp_form_admin_page.php:476
311
  msgid "The number of the minimum characters"
312
  msgstr ""
313
 
 
 
 
 
314
  #. Plugin Name of the plugin/theme
315
  msgid "MW WP Form"
316
  msgstr ""
@@ -320,12 +352,11 @@ msgid "http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/"
320
  msgstr ""
321
 
322
  #. Description of the plugin/theme
323
- msgid ""
324
- "MW WP Form can create mail form with a confirmation screen using shortcode."
325
  msgstr ""
326
 
327
  #. Author of the plugin/theme
328
- msgid "inc2734"
329
  msgstr ""
330
 
331
  #. Author URI 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 0.7\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
7
+ "POT-Creation-Date: 2013-04-18 07:37:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
  #: form_fields/mw_form_field_back_button.php:36
22
+ #: system/mw_wp_form_admin_page.php:278
23
  msgid "Back"
24
  msgstr ""
25
 
33
  msgid "Send"
34
  msgstr ""
35
 
36
+ #: mw-wp-form.php:319
37
  msgid "Validation Object is not a MW Validation Class."
38
  msgstr ""
39
 
93
  msgid "This is not the format of a date."
94
  msgstr ""
95
 
96
+ #: system/mw_wp_form_admin_page.php:69
97
  msgid "Add New Form"
98
  msgstr ""
99
 
100
+ #: system/mw_wp_form_admin_page.php:70
101
  msgid "Edit Form"
102
  msgstr ""
103
 
104
+ #: system/mw_wp_form_admin_page.php:71
105
  msgid "New Form"
106
  msgstr ""
107
 
108
+ #: system/mw_wp_form_admin_page.php:72
109
  msgid "View Form"
110
  msgstr ""
111
 
112
+ #: system/mw_wp_form_admin_page.php:73
113
  msgid "Search Forms"
114
  msgstr ""
115
 
116
+ #: system/mw_wp_form_admin_page.php:74
117
  msgid "No Forms found"
118
  msgstr ""
119
 
120
+ #: system/mw_wp_form_admin_page.php:75
121
  msgid "No Forms found in Trash"
122
  msgstr ""
123
 
124
+ #: system/mw_wp_form_admin_page.php:96
125
+ msgid "Edit "
126
+ msgstr ""
127
+
128
+ #: system/mw_wp_form_admin_page.php:97
129
+ msgid "View"
130
+ msgstr ""
131
+
132
+ #: system/mw_wp_form_admin_page.php:98
133
+ msgid "Search"
134
+ msgstr ""
135
+
136
+ #: system/mw_wp_form_admin_page.php:99
137
+ msgid "No data found"
138
+ msgstr ""
139
+
140
+ #: system/mw_wp_form_admin_page.php:100
141
+ msgid "No data found in Trash"
142
+ msgstr ""
143
+
144
+ #: system/mw_wp_form_admin_page.php:138
145
  msgid "Complete Message"
146
  msgstr ""
147
 
148
+ #: system/mw_wp_form_admin_page.php:145
149
  msgid "URL Options"
150
  msgstr ""
151
 
152
+ #: system/mw_wp_form_admin_page.php:152
153
  msgid "Validation Rule"
154
  msgstr ""
155
 
156
+ #: system/mw_wp_form_admin_page.php:159
157
  msgid "Form Key"
158
  msgstr ""
159
 
160
+ #: system/mw_wp_form_admin_page.php:166
161
+ msgid "Mail Options"
162
  msgstr ""
163
 
164
+ #: system/mw_wp_form_admin_page.php:173
165
+ msgid "settings"
166
+ msgstr ""
167
+
168
+ #: system/mw_wp_form_admin_page.php:180
169
+ msgid "Custom Fields"
170
  msgstr ""
171
 
172
+ #: system/mw_wp_form_admin_page.php:224
173
  msgid "Text"
174
  msgstr ""
175
 
176
+ #: system/mw_wp_form_admin_page.php:230
177
  msgid "Textarea"
178
  msgstr ""
179
 
180
+ #: system/mw_wp_form_admin_page.php:236
181
  msgid "Zip Code"
182
  msgstr ""
183
 
184
+ #: system/mw_wp_form_admin_page.php:242 system/mw_wp_form_admin_page.php:527
185
  msgid "Tel"
186
  msgstr ""
187
 
188
+ #: system/mw_wp_form_admin_page.php:248
189
  msgid "Select"
190
  msgstr ""
191
 
192
+ #: system/mw_wp_form_admin_page.php:254
193
  msgid "Radio"
194
  msgstr ""
195
 
196
+ #: system/mw_wp_form_admin_page.php:260
197
  msgid "Checkbox"
198
  msgstr ""
199
 
200
+ #: system/mw_wp_form_admin_page.php:266
201
  msgid "Datepicker"
202
  msgstr ""
203
 
204
+ #: system/mw_wp_form_admin_page.php:272
205
  msgid "Password"
206
  msgstr ""
207
 
208
+ #: system/mw_wp_form_admin_page.php:284
209
  msgid "Confirm &amp; Submit"
210
  msgstr ""
211
 
212
+ #: system/mw_wp_form_admin_page.php:290
213
  msgid "Submit"
214
  msgstr ""
215
 
216
+ #: system/mw_wp_form_admin_page.php:296
217
  msgid "Button"
218
  msgstr ""
219
 
220
+ #: system/mw_wp_form_admin_page.php:302
221
  msgid "Hidden"
222
  msgstr ""
223
 
224
+ #: system/mw_wp_form_admin_page.php:308
225
  msgid "Error Message"
226
  msgstr ""
227
 
228
+ #: system/mw_wp_form_admin_page.php:388
229
  msgid "Copy and Paste this shortcode."
230
  msgstr ""
231
 
232
+ #: system/mw_wp_form_admin_page.php:402
233
+ msgid "Activate Query string of post"
234
  msgstr ""
235
 
236
+ #: system/mw_wp_form_admin_page.php:403
237
  msgid ""
238
  "If this field is active, MW WP Form get the post as query string \"post_id\" "
239
  "and you can use $post's property in editor"
240
  msgstr ""
241
 
242
+ #: system/mw_wp_form_admin_page.php:404
243
  msgid "Example: {ID}, {post_title}, {post_meta} etc..."
244
  msgstr ""
245
 
246
+ #: system/mw_wp_form_admin_page.php:407
247
+ msgid "Saving contact data in database"
248
+ msgstr ""
249
+
250
+ #: system/mw_wp_form_admin_page.php:433
251
  msgid "To ( E-mail address )"
252
  msgstr ""
253
 
254
+ #: system/mw_wp_form_admin_page.php:435
255
  msgid "If empty: Using admin E-mail address."
256
  msgstr ""
257
 
258
+ #: system/mw_wp_form_admin_page.php:438
259
  msgid "Subject"
260
  msgstr ""
261
 
262
+ #: system/mw_wp_form_admin_page.php:442
263
  msgid "Ccontent"
264
  msgstr ""
265
 
266
+ #: system/mw_wp_form_admin_page.php:444
267
  msgid "{key} is converted form data."
268
  msgstr ""
269
 
270
+ #: system/mw_wp_form_admin_page.php:447
271
  msgid "Automatic reply email"
272
  msgstr ""
273
 
274
+ #: system/mw_wp_form_admin_page.php:449
275
  msgid "Please input the key to use as transmission to automatic reply email."
276
  msgstr ""
277
 
278
+ #: system/mw_wp_form_admin_page.php:464
279
  msgid "Input Page URL"
280
  msgstr ""
281
 
282
+ #: system/mw_wp_form_admin_page.php:470
283
  msgid "Confirmation Page URL"
284
  msgstr ""
285
 
286
+ #: system/mw_wp_form_admin_page.php:476
287
  msgid "Complete Page URL"
288
  msgstr ""
289
 
290
+ #: system/mw_wp_form_admin_page.php:511
291
  msgid "Add Validation rule"
292
  msgstr ""
293
 
294
+ #: system/mw_wp_form_admin_page.php:517
295
  msgid "The key which applies validation"
296
  msgstr ""
297
 
298
+ #: system/mw_wp_form_admin_page.php:521
299
  msgid "No empty"
300
  msgstr ""
301
 
302
+ #: system/mw_wp_form_admin_page.php:522
303
  msgid "No empty( with checkbox )"
304
  msgstr ""
305
 
306
+ #: system/mw_wp_form_admin_page.php:523
307
  msgid "Numeric"
308
  msgstr ""
309
 
310
+ #: system/mw_wp_form_admin_page.php:524
311
  msgid "Alphabet"
312
  msgstr ""
313
 
314
+ #: system/mw_wp_form_admin_page.php:525
315
  msgid "Alphabet and Numeric"
316
  msgstr ""
317
 
318
+ #: system/mw_wp_form_admin_page.php:526
319
  msgid "Zip code"
320
  msgstr ""
321
 
322
+ #: system/mw_wp_form_admin_page.php:528
323
  msgid "E-mail"
324
  msgstr ""
325
 
326
+ #: system/mw_wp_form_admin_page.php:529
327
  msgid "Date"
328
  msgstr ""
329
 
330
+ #: system/mw_wp_form_admin_page.php:533
331
  msgid "The key at same value"
332
  msgstr ""
333
 
334
+ #: system/mw_wp_form_admin_page.php:537
335
  msgid "The range of the number of characters"
336
  msgstr ""
337
 
338
+ #: system/mw_wp_form_admin_page.php:545
339
  msgid "The number of the minimum characters"
340
  msgstr ""
341
 
342
+ #: system/mw_wp_form_admin_page.php:583
343
+ msgid "Registed Date"
344
+ msgstr ""
345
+
346
  #. Plugin Name of the plugin/theme
347
  msgid "MW WP Form"
348
  msgstr ""
352
  msgstr ""
353
 
354
  #. Description of the plugin/theme
355
+ msgid "MW WP Form can create mail form with a confirmation screen."
 
356
  msgstr ""
357
 
358
  #. Author of the plugin/theme
359
+ msgid "Takashi Kitajima"
360
  msgstr ""
361
 
362
  #. Author URI of the plugin/theme
mw-wp-form.php CHANGED
@@ -2,12 +2,12 @@
2
  /**
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
5
- * Description: MW WP Form can create mail form with a confirmation screen using shortcode.
6
- * Version: 0.6.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: September 25, 2012
10
- * Modified: April 1, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
@@ -32,6 +32,7 @@ class mw_wp_form {
32
 
33
  const NAME = 'mw-wp-form';
34
  const DOMAIN = 'mw-wp-form';
 
35
  protected $key;
36
  protected $input;
37
  protected $preview;
@@ -44,6 +45,7 @@ class mw_wp_form {
44
  protected $viewFlg = 'input';
45
  protected $MW_WP_Form_Admin_Page;
46
  protected $options_by_formkey;
 
47
 
48
  /**
49
  * __construct
@@ -51,6 +53,11 @@ class mw_wp_form {
51
  public function __construct() {
52
  load_plugin_textdomain( self::DOMAIN, false, basename( dirname( __FILE__ ) ) . '/languages' );
53
 
 
 
 
 
 
54
  // 管理画面の実行
55
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_admin_page.php' );
56
  $this->MW_WP_Form_Admin_Page = new MW_WP_Form_Admin_Page();
@@ -64,13 +71,49 @@ class mw_wp_form {
64
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_session.php' );
65
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_validation.php' );
66
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_form_field.php' );
67
- foreach( glob( plugin_dir_path( __FILE__ ) . 'form_fields/*.php' ) as $form_field ) {
68
  include_once $form_field;
69
  }
70
  add_action( 'wp', array( $this, 'init' ) );
71
  add_action( 'wp_print_styles', array( $this, 'original_style' ) );
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * register_post_type
76
  * 管理画面(カスタム投稿タイプ)の設定
@@ -233,6 +276,7 @@ class mw_wp_form {
233
  setup_postdata( $post );
234
  if ( get_post_type() === self::NAME ) {
235
  $this->options_by_formkey = get_post_meta( $post->ID, self::NAME, true );
 
236
  $this->key = self::NAME.'-'.$atts['key'];
237
  $this->input = $this->parse_url( $this->options_by_formkey['input_url'] );
238
  $this->preview = $this->parse_url( $this->options_by_formkey['confirmation_url'] );
@@ -323,23 +367,70 @@ class mw_wp_form {
323
 
324
  if ( $this->options_by_formkey && !empty( $Mail ) ) {
325
  $Mail->send();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  if ( isset( $this->options_by_formkey['automatic_reply_email'], $this->data[$this->options_by_formkey['automatic_reply_email']] ) && !$this->Validation->mail( $this->data[$this->options_by_formkey['automatic_reply_email']] ) ) {
327
  $Mail->to = $this->data[$this->options_by_formkey['automatic_reply_email']];
328
  $Mail->send();
329
  }
330
  }
331
  }
 
 
 
 
 
332
  public function create_mail_body( $matches ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  if ( !isset( $this->data[$matches[1]] ) )
334
  return;
335
  if ( is_array( $this->data[$matches[1]] ) ) {
336
  if ( !array_key_exists( 'data', $this->data[$matches[1]] ) )
337
  return;
338
- if ( is_array( $this->data[$matches[1]]['data'] ) )
339
- return $this->Form->getZipValue( $matches[1] );
340
- return $this->data[$matches[1]]['data'];
 
 
 
 
 
 
 
341
  } else {
342
- return $this->data[$matches[1]];
 
 
 
343
  }
344
  }
345
 
@@ -352,12 +443,6 @@ class mw_wp_form {
352
  $redirect = ( empty( $url ) ) ? $_SERVER['REQUEST_URI'] : $url;
353
  $redirect = $this->parse_url( $redirect );
354
  $REQUEST_URI = $this->parse_url( $_SERVER['REQUEST_URI'] );
355
- /*
356
- var_dump( $redirect );
357
- echo '<br />';
358
- var_dump( $REQUEST_URI );
359
- exit;
360
- */
361
  if ( $redirect != $REQUEST_URI || $this->Form->isInput() && !empty( $_POST ) ) {
362
  wp_redirect( $redirect );
363
  exit();
2
  /**
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
5
+ * Description: MW WP Form can create mail form with a confirmation screen.
6
+ * Version: 0.7
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: September 25, 2012
10
+ * Modified: April 16, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
32
 
33
  const NAME = 'mw-wp-form';
34
  const DOMAIN = 'mw-wp-form';
35
+ const DBDATA = 'mwf_';
36
  protected $key;
37
  protected $input;
38
  protected $preview;
45
  protected $viewFlg = 'input';
46
  protected $MW_WP_Form_Admin_Page;
47
  protected $options_by_formkey;
48
+ protected $insert_id;
49
 
50
  /**
51
  * __construct
53
  public function __construct() {
54
  load_plugin_textdomain( self::DOMAIN, false, basename( dirname( __FILE__ ) ) . '/languages' );
55
 
56
+ // 有効化した時の処理
57
+ register_activation_hook( __FILE__, array( __CLASS__, 'activation' ) );
58
+ // アンインストールした時の処理
59
+ register_uninstall_hook( __FILE__, array( __CLASS__, 'uninstall' ) );
60
+
61
  // 管理画面の実行
62
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_admin_page.php' );
63
  $this->MW_WP_Form_Admin_Page = new MW_WP_Form_Admin_Page();
71
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_session.php' );
72
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_validation.php' );
73
  include_once( plugin_dir_path( __FILE__ ) . 'system/mw_form_field.php' );
74
+ foreach ( glob( plugin_dir_path( __FILE__ ) . 'form_fields/*.php' ) as $form_field ) {
75
  include_once $form_field;
76
  }
77
  add_action( 'wp', array( $this, 'init' ) );
78
  add_action( 'wp_print_styles', array( $this, 'original_style' ) );
79
  }
80
 
81
+ /**
82
+ * activation
83
+ * 有効化した時の処理
84
+ */
85
+ public static function activation() {
86
+ }
87
+
88
+ /**
89
+ * uninstall
90
+ * アンインストールした時の処理
91
+ */
92
+ public static function uninstall() {
93
+ $forms = get_posts( array(
94
+ 'post_type' => self::NAME,
95
+ 'posts_per_page' => -1,
96
+ ) );
97
+ if ( empty( $forms ) ) return;
98
+ $data_post_ids[] = array();
99
+ foreach ( $forms as $form ) {
100
+ $data_post_ids[] = $form->ID;
101
+ wp_delete_post( $form->ID, true );
102
+ }
103
+
104
+ if ( empty( $data_post_ids ) ) return;
105
+ foreach ( $data_post_ids as $data_post_id ) {
106
+ $data_posts = get_posts( array(
107
+ 'post_type' => self::DBDATA . $data_post_id,
108
+ 'posts_per_page' => -1,
109
+ ) );
110
+ if ( empty( $data_posts ) ) continue;
111
+ foreach ( $data_posts as $data_post ) {
112
+ wp_delete_post( $data_post->ID, true );
113
+ }
114
+ }
115
+ }
116
+
117
  /**
118
  * register_post_type
119
  * 管理画面(カスタム投稿タイプ)の設定
276
  setup_postdata( $post );
277
  if ( get_post_type() === self::NAME ) {
278
  $this->options_by_formkey = get_post_meta( $post->ID, self::NAME, true );
279
+ $this->options_by_formkey['post_id'] = $post->ID;
280
  $this->key = self::NAME.'-'.$atts['key'];
281
  $this->input = $this->parse_url( $this->options_by_formkey['input_url'] );
282
  $this->preview = $this->parse_url( $this->options_by_formkey['confirmation_url'] );
367
 
368
  if ( $this->options_by_formkey && !empty( $Mail ) ) {
369
  $Mail->send();
370
+
371
+ if ( !empty( $this->options_by_formkey['usedb'] ) ) {
372
+ $this->insert_id = wp_insert_post( array(
373
+ 'post_title' => $this->options_by_formkey['mail_subject'],
374
+ 'post_status' => 'publish',
375
+ 'post_type' => self::DBDATA . $this->options_by_formkey['post_id'],
376
+ // 'post_content' => $Mail->body,
377
+ ) );
378
+ preg_replace_callback(
379
+ '/{(.+?)}/',
380
+ array( $this, 'save_mail_body' ),
381
+ $body
382
+ );
383
+ }
384
+
385
  if ( isset( $this->options_by_formkey['automatic_reply_email'], $this->data[$this->options_by_formkey['automatic_reply_email']] ) && !$this->Validation->mail( $this->data[$this->options_by_formkey['automatic_reply_email']] ) ) {
386
  $Mail->to = $this->data[$this->options_by_formkey['automatic_reply_email']];
387
  $Mail->send();
388
  }
389
  }
390
  }
391
+
392
+ /**
393
+ * create_mail_body
394
+ * メール本文用に {$postのプロパティ} を置換
395
+ */
396
  public function create_mail_body( $matches ) {
397
+ return $this->parse_mail_body( $matches, false );
398
+ }
399
+
400
+ /**
401
+ * save_mail_body
402
+ * DB保存用に {$postのプロパティ} を置換、保存
403
+ */
404
+ public function save_mail_body( $matches ) {
405
+ return $this->parse_mail_body( $matches, true );
406
+ }
407
+
408
+ /**
409
+ * parse_mail_body
410
+ * $this->create_mail_body(), $this->save_mail_body の本体
411
+ * 第2引数でDB保存するか判定
412
+ */
413
+ protected function parse_mail_body( $matches, $doUpdate = false ) {
414
  if ( !isset( $this->data[$matches[1]] ) )
415
  return;
416
  if ( is_array( $this->data[$matches[1]] ) ) {
417
  if ( !array_key_exists( 'data', $this->data[$matches[1]] ) )
418
  return;
419
+ if ( is_array( $this->data[$matches[1]]['data'] ) ) {
420
+ $value = $this->Form->getZipValue( $matches[1] );
421
+ if ( $doUpdate )
422
+ update_post_meta( $this->insert_id, $matches[1], $value );
423
+ return $value;
424
+ }
425
+ $value = $this->data[$matches[1]]['data'];
426
+ if ( $doUpdate )
427
+ update_post_meta( $this->insert_id, $matches[1], $value );
428
+ return $value;
429
  } else {
430
+ $value = $this->data[$matches[1]];
431
+ if ( $doUpdate )
432
+ update_post_meta( $this->insert_id, $matches[1], $value );
433
+ return $value;
434
  }
435
  }
436
 
443
  $redirect = ( empty( $url ) ) ? $_SERVER['REQUEST_URI'] : $url;
444
  $redirect = $this->parse_url( $redirect );
445
  $REQUEST_URI = $this->parse_url( $_SERVER['REQUEST_URI'] );
 
 
 
 
 
 
446
  if ( $redirect != $REQUEST_URI || $this->Form->isInput() && !empty( $_POST ) ) {
447
  wp_redirect( $redirect );
448
  exit();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: plugin, form, confirm, preview
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
- Stable tag: 0.6.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -29,6 +29,11 @@ http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
29
 
30
  == Changelog ==
31
 
 
 
 
 
 
32
  = 0.6.4 =
33
  * Added : 引数を有効にする meta_box を追加
34
  * Bug fix: "Zip Code" が日本語化されていないバグを修正
4
  Tags: plugin, form, confirm, preview
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
+ Stable tag: 0.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
29
 
30
  == Changelog ==
31
 
32
+ = 0.7 =
33
+ * Added : 問い合わせデータをデータベースに保存する機能を追加
34
+ * Added : アンインストール時にデータを削除するように修正
35
+ * Bug fix: 一覧画面で QTags の JSエラーがでていたのを修正
36
+
37
  = 0.6.4 =
38
  * Added : 引数を有効にする meta_box を追加
39
  * Bug fix: "Zip Code" が日本語化されていないバグを修正
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.1.2
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: February 21, 2013
10
- * Modified: March 25, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
@@ -29,23 +29,27 @@ class MW_WP_Form_Admin_Page {
29
 
30
  const NAME = 'mw-wp-form';
31
  const DOMAIN = 'mw-wp-form';
32
- private $postmeta;
 
 
33
 
34
  /**
35
  * __construct
36
  */
37
  public function __construct() {
38
- add_action( 'admin_head', array( $this, 'cpt_public_false' ) );
39
- add_action( 'admin_head', array( $this, 'add_meta_box' ) );
40
- add_action( 'admin_print_footer_scripts', array( $this, 'add_quicktag' ) );
41
  add_action( 'admin_print_styles', array( $this, 'admin_style' ) );
42
  add_action( 'admin_print_scripts', array( $this, 'admin_scripts' ) );
 
 
 
43
  add_action( 'save_post', array( $this, 'save_post' ) );
44
  add_filter( 'user_can_richedit', array( $this, 'disable_visual_editor' ) );
 
45
  }
46
 
47
  /**
48
  * get_post_data
 
49
  */
50
  protected function get_post_data( $key ) {
51
  if ( isset( $this->postdata[$key] ) ) {
@@ -73,21 +77,45 @@ class MW_WP_Form_Admin_Page {
73
  'public' => false,
74
  'show_ui' => true,
75
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  }
77
 
78
  /**
79
  * cpt_public_false
 
80
  */
81
  public function cpt_public_false() {
82
- if ( self::NAME == get_post_type() ) : ?>
83
  <style type="text/css">
84
- #misc-publishing-actions {
85
- display: none;
86
- }
87
- .post-php #message a {
88
- display: none;
89
- }
90
- .wp-list-table .post-title span.hide-if-no-js {
91
  display: none;
92
  }
93
  </style>
@@ -99,7 +127,8 @@ class MW_WP_Form_Admin_Page {
99
  * add_meta_box
100
  */
101
  public function add_meta_box() {
102
- if ( self::NAME == get_post_type() ) {
 
103
  global $post;
104
  // 設定データ取得
105
  $this->postdata = get_post_meta( $post->ID, self::NAME, true );
@@ -131,13 +160,6 @@ class MW_WP_Form_Admin_Page {
131
  array( $this, 'display_form_key' ),
132
  self::NAME, 'side'
133
  );
134
- // 引数有効
135
- add_meta_box(
136
- self::NAME.'_querystring',
137
- __( 'Activate Query string of post', self::DOMAIN ),
138
- array( $this, 'display_query_string' ),
139
- self::NAME, 'side'
140
- );
141
  // メール設定
142
  add_meta_box(
143
  self::NAME.'_mail',
@@ -145,6 +167,47 @@ class MW_WP_Form_Admin_Page {
145
  array( $this, 'add_mail_options' ),
146
  self::NAME, 'side'
147
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
  }
150
 
@@ -155,96 +218,98 @@ class MW_WP_Form_Admin_Page {
155
  public function add_quicktag() {
156
  if ( self::NAME == get_post_type() ) : ?>
157
  <script type="text/javascript">
158
- QTags.addButton(
159
- '<?php echo self::NAME; ?>_text',
160
- '<?php _e( 'Text', self::DOMAIN ); ?>',
161
- '[mwform_text name=""]',
162
- ''
163
- );
164
- QTags.addButton(
165
- '<?php echo self::NAME; ?>_textarea',
166
- '<?php _e( 'Textarea', self::DOMAIN ); ?>',
167
- '[mwform_textarea name=""]',
168
- ''
169
- );
170
- QTags.addButton(
171
- '<?php echo self::NAME; ?>_zip',
172
- '<?php _e( 'Zip Code', self::DOMAIN ); ?>',
173
- '[mwform_zip name=""]',
174
- ''
175
- );
176
- QTags.addButton(
177
- '<?php echo self::NAME; ?>_tel',
178
- '<?php _e( 'Tel', self::DOMAIN ); ?>',
179
- '[mwform_tel name=""]',
180
- ''
181
- );
182
- QTags.addButton(
183
- '<?php echo self::NAME; ?>_select',
184
- '<?php _e( 'Select', self::DOMAIN ); ?>',
185
- '[mwform_select name="" children=""]',
186
- ''
187
- );
188
- QTags.addButton(
189
- '<?php echo self::NAME; ?>_radio',
190
- '<?php _e( 'Radio', self::DOMAIN ); ?>',
191
- '[mwform_radio name="" children=""]',
192
- ''
193
- );
194
- QTags.addButton(
195
- '<?php echo self::NAME; ?>_checkbox',
196
- '<?php _e( 'Checkbox', self::DOMAIN ); ?>',
197
- '[mwform_checkbox name="" children=""]',
198
- ''
199
- );
200
- QTags.addButton(
201
- '<?php echo self::NAME; ?>_datepicker',
202
- '<?php _e( 'Datepicker', self::DOMAIN ); ?>',
203
- '[mwform_datepicker name=""]',
204
- ''
205
- );
206
- QTags.addButton(
207
- '<?php echo self::NAME; ?>_password',
208
- '<?php _e( 'Password', self::DOMAIN ); ?>',
209
- '[mwform_password name=""]',
210
- ''
211
- );
212
- QTags.addButton(
213
- '<?php echo self::NAME; ?>_backButton',
214
- '<?php _e( 'Back', self::DOMAIN ); ?>',
215
- '[mwform_backButton]',
216
- ''
217
- );
218
- QTags.addButton(
219
- '<?php echo self::NAME; ?>_submitButton',
220
- '<?php _e( 'Confirm &amp; Submit', self::DOMAIN ); ?>',
221
- '[mwform_submitButton]',
222
- ''
223
- );
224
- QTags.addButton(
225
- '<?php echo self::NAME; ?>_submit',
226
- '<?php _e( 'Submit', self::DOMAIN ); ?>',
227
- '[mwform_submit name="submit"]',
228
- ''
229
- );
230
- QTags.addButton(
231
- '<?php echo self::NAME; ?>_button',
232
- '<?php _e( 'Button', self::DOMAIN ); ?>',
233
- '[mwform_button name=""]',
234
- ''
235
- );
236
- QTags.addButton(
237
- '<?php echo self::NAME; ?>_hidden',
238
- '<?php _e( 'Hidden', self::DOMAIN ); ?>',
239
- '[mwform_hidden name=""]',
240
- ''
241
- );
242
- QTags.addButton(
243
- '<?php echo self::NAME; ?>_error',
244
- '<?php _e( 'Error Message', self::DOMAIN ); ?>',
245
- '[mwform_error keys=""]',
246
- ''
247
- );
 
 
248
  </script>
249
  <?php
250
  endif;
@@ -255,7 +320,8 @@ class MW_WP_Form_Admin_Page {
255
  * CSS適用
256
  */
257
  public function admin_style() {
258
- if ( self::NAME == get_post_type() ) {
 
259
  $url = plugin_dir_url( __FILE__ );
260
  wp_register_style( self::DOMAIN.'-admin', $url.'../css/admin.css' );
261
  wp_enqueue_style( self::DOMAIN.'-admin' );
@@ -326,17 +392,20 @@ class MW_WP_Form_Admin_Page {
326
  }
327
 
328
  /**
329
- * display_query_string
330
  * $post を取得するための引数を有効にするフィールドを表示
331
  */
332
- public function display_query_string() {
333
  global $post;
334
  ?>
335
  <p>
336
- <label><input type="checkbox" name="<?php echo esc_attr( self::NAME ); ?>[querystring]" value="1" <?php checked( $this->get_post_data( 'querystring' ), 1 ); ?> /> <?php _e( 'Active', self::DOMAIN ); ?></label><br />
337
  <?php _e( 'If this field is active, MW WP Form get the post as query string "post_id" and you can use $post\'s property in editor', self::DOMAIN ); ?><br />
338
  <?php _e( 'Example: {ID}, {post_title}, {post_meta} etc...', self::DOMAIN ); ?>
339
  </p>
 
 
 
340
  <?php
341
  }
342
 
@@ -493,5 +562,53 @@ class MW_WP_Form_Admin_Page {
493
  }
494
  return true;
495
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  }
497
  ?>
3
  * Name: MW WP Form Admin Page
4
  * URI: http://2inc.org
5
  * Description: 管理画面クラス
6
+ * Version: 1.2
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: February 21, 2013
10
+ * Modified: April 16, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
29
 
30
  const NAME = 'mw-wp-form';
31
  const DOMAIN = 'mw-wp-form';
32
+ const DBDATA = 'mwf_';
33
+ private $postdata;
34
+ private $form_post_type = array(); // DB登録使用時のカスタム投稿タイプ名
35
 
36
  /**
37
  * __construct
38
  */
39
  public function __construct() {
 
 
 
40
  add_action( 'admin_print_styles', array( $this, 'admin_style' ) );
41
  add_action( 'admin_print_scripts', array( $this, 'admin_scripts' ) );
42
+ add_action( 'admin_head', array( $this, 'add_forms_columns' ) );
43
+ add_action( 'admin_head', array( $this, 'cpt_public_false' ) );
44
+ add_action( 'admin_head', array( $this, 'add_meta_box' ) );
45
  add_action( 'save_post', array( $this, 'save_post' ) );
46
  add_filter( 'user_can_richedit', array( $this, 'disable_visual_editor' ) );
47
+ add_action( 'admin_print_footer_scripts', array( $this, 'add_quicktag' ) );
48
  }
49
 
50
  /**
51
  * get_post_data
52
+ * フォームの設定データを返す
53
  */
54
  protected function get_post_data( $key ) {
55
  if ( isset( $this->postdata[$key] ) ) {
77
  'public' => false,
78
  'show_ui' => true,
79
  ) );
80
+
81
+ $_posts = get_posts( array(
82
+ 'post_type' => self::NAME,
83
+ 'posts_per_page' => -1
84
+ ) );
85
+ foreach ( $_posts as $_post ) {
86
+ $post_meta = get_post_meta( $_post->ID, self::NAME, true );
87
+ if ( empty( $post_meta['usedb'] ) )
88
+ continue;
89
+
90
+ $post_type = self::DBDATA . $_post->ID;
91
+ register_post_type( $post_type, array(
92
+ 'label' => $_post->post_title,
93
+ 'labels' => array(
94
+ 'name' => $_post->post_title,
95
+ 'singular_name' => $_post->post_title,
96
+ 'edit_item' => __( 'Edit ', self::DOMAIN ) . ':' . $_post->post_title,
97
+ 'view_item' => __( 'View', self::DOMAIN ) . ':' . $_post->post_title,
98
+ 'search_items' => __( 'Search', self::DOMAIN ) . ':' . $_post->post_title,
99
+ 'not_found' => __( 'No data found', self::DOMAIN ),
100
+ 'not_found_in_trash' => __( 'No data found in Trash', self::DOMAIN ),
101
+ ),
102
+ 'public' => false,
103
+ 'show_ui' => true,
104
+ 'show_in_menu' => 'edit.php?post_type=' . self::NAME,
105
+ 'supports' => array( 'title' ),
106
+ ) );
107
+ $this->form_post_type[] = $post_type;
108
+ }
109
  }
110
 
111
  /**
112
  * cpt_public_false
113
+ * DB登録データの一覧、詳細画面で新規追加のリンクを消す
114
  */
115
  public function cpt_public_false() {
116
+ if ( in_array( get_post_type(), $this->form_post_type ) ) : ?>
117
  <style type="text/css">
118
+ h2 a.add-new-h2 {
 
 
 
 
 
 
119
  display: none;
120
  }
121
  </style>
127
  * add_meta_box
128
  */
129
  public function add_meta_box() {
130
+ $post_type = get_post_type();
131
+ if ( self::NAME == $post_type ) {
132
  global $post;
133
  // 設定データ取得
134
  $this->postdata = get_post_meta( $post->ID, self::NAME, true );
160
  array( $this, 'display_form_key' ),
161
  self::NAME, 'side'
162
  );
 
 
 
 
 
 
 
163
  // メール設定
164
  add_meta_box(
165
  self::NAME.'_mail',
167
  array( $this, 'add_mail_options' ),
168
  self::NAME, 'side'
169
  );
170
+ // 設定
171
+ add_meta_box(
172
+ self::NAME.'_settings',
173
+ __( 'settings', self::DOMAIN ),
174
+ array( $this, 'settings' ),
175
+ self::NAME, 'side'
176
+ );
177
+ } elseif ( in_array( $post_type, $this->form_post_type ) ) {
178
+ add_meta_box(
179
+ self::NAME.'_custom_fields',
180
+ __( 'Custom Fields', self::DOMAIN ),
181
+ array( $this, 'custom_fields' ),
182
+ $post_type
183
+ );
184
+ }
185
+ }
186
+
187
+ /**
188
+ * custom_fields
189
+ * DB登録データの詳細画面にカスタムフィールドを表示
190
+ */
191
+ public function custom_fields() {
192
+ global $post;
193
+ $post_custom = get_post_custom( $post->ID );
194
+ if ( ! empty( $post_custom ) && is_array( $post_custom ) ) {
195
+ ?>
196
+ <table border="0" cellpadding="0" cellspacing="0">
197
+ <?php
198
+ foreach ( $post_custom as $key => $val ) {
199
+ if ( $key == '_edit_lock' )
200
+ continue;
201
+ ?>
202
+ <tr>
203
+ <th><?php echo esc_html( $key ); ?></th>
204
+ <td><?php echo nl2br( esc_html( $val[0] ) ); ?></td>
205
+ </tr>
206
+ <?php
207
+ }
208
+ ?>
209
+ </table>
210
+ <?php
211
  }
212
  }
213
 
218
  public function add_quicktag() {
219
  if ( self::NAME == get_post_type() ) : ?>
220
  <script type="text/javascript">
221
+ if ( typeof( QTags ) !== 'undefined' ) {
222
+ QTags.addButton(
223
+ '<?php echo self::NAME; ?>_text',
224
+ '<?php _e( 'Text', self::DOMAIN ); ?>',
225
+ '[mwform_text name=""]',
226
+ ''
227
+ );
228
+ QTags.addButton(
229
+ '<?php echo self::NAME; ?>_textarea',
230
+ '<?php _e( 'Textarea', self::DOMAIN ); ?>',
231
+ '[mwform_textarea name=""]',
232
+ ''
233
+ );
234
+ QTags.addButton(
235
+ '<?php echo self::NAME; ?>_zip',
236
+ '<?php _e( 'Zip Code', self::DOMAIN ); ?>',
237
+ '[mwform_zip name=""]',
238
+ ''
239
+ );
240
+ QTags.addButton(
241
+ '<?php echo self::NAME; ?>_tel',
242
+ '<?php _e( 'Tel', self::DOMAIN ); ?>',
243
+ '[mwform_tel name=""]',
244
+ ''
245
+ );
246
+ QTags.addButton(
247
+ '<?php echo self::NAME; ?>_select',
248
+ '<?php _e( 'Select', self::DOMAIN ); ?>',
249
+ '[mwform_select name="" children=""]',
250
+ ''
251
+ );
252
+ QTags.addButton(
253
+ '<?php echo self::NAME; ?>_radio',
254
+ '<?php _e( 'Radio', self::DOMAIN ); ?>',
255
+ '[mwform_radio name="" children=""]',
256
+ ''
257
+ );
258
+ QTags.addButton(
259
+ '<?php echo self::NAME; ?>_checkbox',
260
+ '<?php _e( 'Checkbox', self::DOMAIN ); ?>',
261
+ '[mwform_checkbox name="" children=""]',
262
+ ''
263
+ );
264
+ QTags.addButton(
265
+ '<?php echo self::NAME; ?>_datepicker',
266
+ '<?php _e( 'Datepicker', self::DOMAIN ); ?>',
267
+ '[mwform_datepicker name=""]',
268
+ ''
269
+ );
270
+ QTags.addButton(
271
+ '<?php echo self::NAME; ?>_password',
272
+ '<?php _e( 'Password', self::DOMAIN ); ?>',
273
+ '[mwform_password name=""]',
274
+ ''
275
+ );
276
+ QTags.addButton(
277
+ '<?php echo self::NAME; ?>_backButton',
278
+ '<?php _e( 'Back', self::DOMAIN ); ?>',
279
+ '[mwform_backButton]',
280
+ ''
281
+ );
282
+ QTags.addButton(
283
+ '<?php echo self::NAME; ?>_submitButton',
284
+ '<?php _e( 'Confirm &amp; Submit', self::DOMAIN ); ?>',
285
+ '[mwform_submitButton]',
286
+ ''
287
+ );
288
+ QTags.addButton(
289
+ '<?php echo self::NAME; ?>_submit',
290
+ '<?php _e( 'Submit', self::DOMAIN ); ?>',
291
+ '[mwform_submit name="submit"]',
292
+ ''
293
+ );
294
+ QTags.addButton(
295
+ '<?php echo self::NAME; ?>_button',
296
+ '<?php _e( 'Button', self::DOMAIN ); ?>',
297
+ '[mwform_button name=""]',
298
+ ''
299
+ );
300
+ QTags.addButton(
301
+ '<?php echo self::NAME; ?>_hidden',
302
+ '<?php _e( 'Hidden', self::DOMAIN ); ?>',
303
+ '[mwform_hidden name=""]',
304
+ ''
305
+ );
306
+ QTags.addButton(
307
+ '<?php echo self::NAME; ?>_error',
308
+ '<?php _e( 'Error Message', self::DOMAIN ); ?>',
309
+ '[mwform_error keys=""]',
310
+ ''
311
+ );
312
+ }
313
  </script>
314
  <?php
315
  endif;
320
  * CSS適用
321
  */
322
  public function admin_style() {
323
+ $post_type = get_post_type();
324
+ if ( self::NAME == $post_type || in_array( $post_type, $this->form_post_type ) ) {
325
  $url = plugin_dir_url( __FILE__ );
326
  wp_register_style( self::DOMAIN.'-admin', $url.'../css/admin.css' );
327
  wp_enqueue_style( self::DOMAIN.'-admin' );
392
  }
393
 
394
  /**
395
+ * settings
396
  * $post を取得するための引数を有効にするフィールドを表示
397
  */
398
+ public function settings() {
399
  global $post;
400
  ?>
401
  <p>
402
+ <label><input type="checkbox" name="<?php echo esc_attr( self::NAME ); ?>[querystring]" value="1" <?php checked( $this->get_post_data( 'querystring' ), 1 ); ?> /> <?php _e( 'Activate Query string of post', self::DOMAIN ); ?></label><br />
403
  <?php _e( 'If this field is active, MW WP Form get the post as query string "post_id" and you can use $post\'s property in editor', self::DOMAIN ); ?><br />
404
  <?php _e( 'Example: {ID}, {post_title}, {post_meta} etc...', self::DOMAIN ); ?>
405
  </p>
406
+ <p>
407
+ <input type="checkbox" name="<?php echo esc_attr( self::NAME ); ?>[usedb]" value="1" <?php checked( $this->get_post_data( 'usedb' ), 1 ); ?> /> <?php _e( 'Saving contact data in database', self::DOMAIN ); ?></label>
408
+ </p>
409
  <?php
410
  }
411
 
562
  }
563
  return true;
564
  }
565
+
566
+ /**
567
+ * add_form_columns_name
568
+ * DB登録使用時に問い合わせデータ一覧にカラムを追加
569
+ */
570
+ public function add_forms_columns() {
571
+ global $wp_query;
572
+ $post_type = get_post_type();
573
+ if ( ! is_admin() )
574
+ return;
575
+ if ( ! in_array( $post_type, $this->form_post_type ) )
576
+ return;
577
+ add_filter( 'manage_' . $post_type . '_posts_columns', array( $this, 'add_form_columns_name' ) );
578
+ add_action( 'manage_' . $post_type . '_posts_custom_column', array( $this, 'add_form_columns' ), 10, 2 );
579
+ }
580
+ public function add_form_columns_name( $columns ) {
581
+ global $posts;
582
+ unset( $columns['date'] );
583
+ $columns['post_date'] = __( 'Registed Date', self::DOMAIN );
584
+ foreach ( $posts as $post ) {
585
+ $post_custom_keys = get_post_custom_keys( $post->ID );
586
+ if ( ! empty( $post_custom_keys ) && is_array( $post_custom_keys ) ) {
587
+ foreach ( $post_custom_keys as $key ) {
588
+ if ( $key == '_edit_lock' )
589
+ continue;
590
+ $columns[$key] = $key;
591
+ }
592
+ }
593
+ }
594
+ return $columns;
595
+ }
596
+ public function add_form_columns( $column, $post_id ) {
597
+ $post_custom_keys = get_post_custom_keys( $post_id );
598
+ if ( $column == 'post_date' ) {
599
+ $post = get_post( $post_id );
600
+ echo esc_html( $post->post_date );
601
+ }
602
+ elseif ( !empty( $post_custom_keys ) && is_array( $post_custom_keys ) && in_array( $column, $post_custom_keys ) ) {
603
+ $post_meta = get_post_meta( $post_id, $column, true );
604
+ if ( $post_meta ) {
605
+ echo esc_html( $post_meta );
606
+ } else {
607
+ echo '&nbsp;';
608
+ }
609
+ } else {
610
+ echo '&nbsp;';
611
+ }
612
+ }
613
  }
614
  ?>