Custom Field Template - Version 1.1.1

Version Description

Download this release

Release Info

Developer Hiroaki Miyashita
Plugin Icon 128x128 Custom Field Template
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1 to 1.1.1

custom-field-template-ja.mo CHANGED
Binary file
custom-field-template-ja.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-03-09 18:33+0900\n"
6
- "PO-Revision-Date: 2009-03-09 18:33+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -16,329 +16,346 @@ msgstr ""
16
  "X-Poedit-Basepath: ../\n"
17
  "X-Poedit-SearchPath-0: custom-field-template\n"
18
 
19
- #: custom-field-template/custom-field-template.php:101
20
- #: custom-field-template/custom-field-template.php:102
21
- #: custom-field-template/custom-field-template.php:432
22
- #: custom-field-template/custom-field-template.php:555
23
- #: custom-field-template/custom-field-template.php:1333
24
- #: custom-field-template/custom-field-template.php:1453
25
  msgid "Custom Field Template"
26
  msgstr "カスタムフィールドテンプレート"
27
 
28
- #: custom-field-template/custom-field-template.php:141
29
- #: custom-field-template/custom-field-template.php:1503
30
  msgid "Load"
31
  msgstr "読込"
32
 
33
- #: custom-field-template/custom-field-template.php:290
34
  msgid "read more"
35
  msgstr "続きを表示"
36
 
37
- #: custom-field-template/custom-field-template.php:308
38
- #: custom-field-template/custom-field-template.php:318
39
  msgid "Custom Fields"
40
  msgstr "カスタムフィールド"
41
 
42
- #: custom-field-template/custom-field-template.php:348
43
  msgid "Settings"
44
  msgstr "設定"
45
 
46
- #: custom-field-template/custom-field-template.php:360
47
  msgid "Default Template"
48
  msgstr "デフォルトテンプレート"
49
 
50
- #: custom-field-template/custom-field-template.php:496
51
- #: custom-field-template/custom-field-template.php:500
52
- #: custom-field-template/custom-field-template.php:512
53
- #: custom-field-template/custom-field-template.php:520
54
- #: custom-field-template/custom-field-template.php:534
55
  msgid "Options updated."
56
  msgstr "オプションは更新されました。"
57
 
58
- #: custom-field-template/custom-field-template.php:538
59
  msgid "Value Counts rebuilt."
60
  msgstr "バリューカウントは再構築されました。"
61
 
62
- #: custom-field-template/custom-field-template.php:543
63
  msgid "Options resetted."
64
  msgstr "オプションはリセットされました。"
65
 
66
- #: custom-field-template/custom-field-template.php:547
67
  msgid "Options deleted."
68
  msgstr "オプションは削除されました。"
69
 
70
- #: custom-field-template/custom-field-template.php:561
71
- #: custom-field-template/custom-field-template.php:638
72
- #: custom-field-template/custom-field-template.php:657
73
- #: custom-field-template/custom-field-template.php:686
74
- #: custom-field-template/custom-field-template.php:717
75
- #: custom-field-template/custom-field-template.php:750
76
- #: custom-field-template/custom-field-template.php:770
77
- #: custom-field-template/custom-field-template.php:866
78
- #: custom-field-template/custom-field-template.php:882
79
- #: custom-field-template/custom-field-template.php:898
80
  msgid "Click to toggle"
81
  msgstr "クリックで切替"
82
 
83
- #: custom-field-template/custom-field-template.php:562
84
  msgid "Custom Field Template Options"
85
  msgstr "カスタムフィールドテンプレートオプション"
86
 
87
- #: custom-field-template/custom-field-template.php:572
88
  msgid "Template Title"
89
  msgstr "テンプレートタイトル"
90
 
91
- #: custom-field-template/custom-field-template.php:574
92
  msgid "Template Instruction"
93
  msgstr "テンプレートインストラクション"
94
 
95
- #: custom-field-template/custom-field-template.php:576
 
96
  msgid "Post Type"
97
  msgstr "投稿タイプ"
98
 
99
- #: custom-field-template/custom-field-template.php:578
 
100
  msgid "Both"
101
  msgstr "両方"
102
 
103
- #: custom-field-template/custom-field-template.php:579
 
104
  msgid "Post"
105
  msgstr "投稿"
106
 
107
- #: custom-field-template/custom-field-template.php:580
 
108
  msgid "Page"
109
  msgstr "ページ"
110
 
111
- #: custom-field-template/custom-field-template.php:581
112
- #: custom-field-template/custom-field-template.php:732
113
  msgid "Category ID (comma-deliminated)"
114
  msgstr "カテゴリーID(カンマ区切り)"
115
 
116
- #: custom-field-template/custom-field-template.php:583
117
  msgid "Template Content"
118
  msgstr "テンプレートコンテンツ"
119
 
120
- #: custom-field-template/custom-field-template.php:590
121
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
122
  msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
123
 
124
- #: custom-field-template/custom-field-template.php:591
125
  msgid "Use multiple image inset"
126
  msgstr "複数画像挿入を利用する"
127
 
128
- #: custom-field-template/custom-field-template.php:591
129
  msgid "Caution:"
130
  msgstr "ご注意:"
131
 
132
- #: custom-field-template/custom-field-template.php:591
133
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
134
  msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
135
 
136
- #: custom-field-template/custom-field-template.php:595
137
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
138
  msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
139
 
140
- #: custom-field-template/custom-field-template.php:596
141
  msgid "Use labels in place of custom keys"
142
  msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
143
 
144
- #: custom-field-template/custom-field-template.php:599
145
  msgid "In case that you would like to add p and br tags in textareas automatically"
146
  msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
147
 
148
- #: custom-field-template/custom-field-template.php:600
149
  msgid "Use wpautop function"
150
  msgstr "wpautop関数を使用する"
151
 
152
- #: custom-field-template/custom-field-template.php:604
153
  msgid "In case that you would like to save values automatically in switching templates"
154
  msgstr "テンプレート切替時自動で保存したい場合"
155
 
156
- #: custom-field-template/custom-field-template.php:605
157
  msgid "Use the auto save in switching templates"
158
  msgstr "テンプレート切替時の自動保存を使用する"
159
 
160
- #: custom-field-template/custom-field-template.php:609
161
  msgid "In case that you would like to forbid to use the default custom fields."
162
  msgstr "デフォルトのカスタムフィールドの使用を禁止する場合"
163
 
164
- #: custom-field-template/custom-field-template.php:610
165
  msgid "Disable the default custom fields"
166
  msgstr "デフォルトのカスタムフィールドを無効にする"
167
 
168
- #: custom-field-template/custom-field-template.php:614
169
  msgid "In case that you would like to forbid to use the quick edit."
170
  msgstr "クイック編集の使用を禁止する場合"
171
 
172
- #: custom-field-template/custom-field-template.php:615
173
  msgid "Disable the quick edit"
174
  msgstr "クイック編集を無効にする"
175
 
176
- #: custom-field-template/custom-field-template.php:619
177
  msgid "In case that you would like to replace the box title with the template title."
178
  msgstr "ボックスタイトルをテンプレートタイトルで置き換える場合"
179
 
180
- #: custom-field-template/custom-field-template.php:620
181
  msgid "Replace the box title"
182
  msgstr "ボックスタイトルを置き換える"
183
 
184
- #: custom-field-template/custom-field-template.php:624
185
  msgid "In case that you would like to use the shortcode in the widget."
186
  msgstr "ショートコードをウィジェットで使用したい場合"
187
 
188
- #: custom-field-template/custom-field-template.php:625
189
  msgid "Use the shortcode in the widget"
190
  msgstr "ショートコードをウィジェットで使用する"
191
 
192
- #: custom-field-template/custom-field-template.php:629
193
- #: custom-field-template/custom-field-template.php:648
194
- #: custom-field-template/custom-field-template.php:677
195
- #: custom-field-template/custom-field-template.php:708
196
- #: custom-field-template/custom-field-template.php:741
197
  msgid "Update Options »"
198
  msgstr "オプションを更新する »"
199
 
200
- #: custom-field-template/custom-field-template.php:639
201
  msgid "ADMIN CSS"
202
  msgstr "ADMIN CSS"
203
 
204
- #: custom-field-template/custom-field-template.php:658
205
  msgid "[cft] and [cftsearch] Shortcode Format"
206
  msgstr "[cft] and [cftsearch] Shortcode Format"
207
 
208
- #: custom-field-template/custom-field-template.php:661
209
  msgid "For [cft], [key] will be converted into the value of [key]."
210
  msgstr "[cft]では、[key]は、[key]の値に置換されます。"
211
 
212
- #: custom-field-template/custom-field-template.php:662
213
  msgid "For [cftsearch], [key] will be converted into the input field."
214
  msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
215
 
216
- #: custom-field-template/custom-field-template.php:671
217
- #: custom-field-template/custom-field-template.php:735
218
  msgid "Use PHP"
219
  msgstr "PHPを使用する"
220
 
221
- #: custom-field-template/custom-field-template.php:687
222
  msgid "PHP CODE (Experimental Option)"
223
  msgstr "PHP CODE (Experimental Option)"
224
 
225
- #: custom-field-template/custom-field-template.php:689
226
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
227
  msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
228
 
229
- #: custom-field-template/custom-field-template.php:690
230
  msgid "For `text` and `textarea`, you must set $value as an string."
231
  msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
232
 
233
- #: custom-field-template/custom-field-template.php:692
234
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
235
  msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
236
 
237
- #: custom-field-template/custom-field-template.php:718
238
  msgid "Auto Hook of `the_content()` (Experimental Option)"
239
  msgstr "Auto Hook of `the_content()` (Experimental Option)"
240
 
241
- #: custom-field-template/custom-field-template.php:728
242
  msgid "Position"
243
  msgstr "位置"
244
 
245
- #: custom-field-template/custom-field-template.php:729
246
  msgid "Before the conetnt"
247
  msgstr "コンテンツの前"
248
 
249
- #: custom-field-template/custom-field-template.php:730
250
  msgid "After the conetnt"
251
  msgstr "コンテンツの後"
252
 
253
- #: custom-field-template/custom-field-template.php:734
 
 
 
 
 
254
  msgid "Content"
255
  msgstr "コンテンツ"
256
 
257
- #: custom-field-template/custom-field-template.php:751
258
  msgid "Rebuild Value Counts"
259
  msgstr "バリューカウントの再構築"
260
 
261
- #: custom-field-template/custom-field-template.php:753
262
  msgid "Are you sure to rebuild all value counts?"
263
  msgstr "本当に全てのバリューカウントを再構築しますか?"
264
 
265
- #: custom-field-template/custom-field-template.php:757
266
  msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
267
  msgstr "バリューカウントはキーごとに値がどのくらいあるか一時的に保存するのに使用されます。`valueCount = true`をフィールドにセットしてください。"
268
 
269
- #: custom-field-template/custom-field-template.php:761
270
  msgid "Rebuild Value Counts »"
271
  msgstr "バリューカウントを再構築する »"
272
 
273
- #: custom-field-template/custom-field-template.php:771
274
  msgid "Option List"
275
  msgstr "オプションリスト"
276
 
277
- #: custom-field-template/custom-field-template.php:867
278
  msgid "Reset Options"
279
  msgstr "オプションをリセットする"
280
 
281
- #: custom-field-template/custom-field-template.php:869
282
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
283
  msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
284
 
285
- #: custom-field-template/custom-field-template.php:873
286
  msgid "Unset Options »"
287
  msgstr "オプションをリセットする »"
288
 
289
- #: custom-field-template/custom-field-template.php:883
290
  msgid "Delete Options"
291
  msgstr "オプションを削除する"
292
 
293
- #: custom-field-template/custom-field-template.php:885
294
  msgid "Are you sure to delete options? Options you set will be deleted."
295
  msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
296
 
297
- #: custom-field-template/custom-field-template.php:889
298
  msgid "Delete Options »"
299
  msgstr "オプションを削除する »"
300
 
301
- #: custom-field-template/custom-field-template.php:899
302
  msgid "Donation"
303
  msgstr "寄付"
304
 
305
- #: custom-field-template/custom-field-template.php:901
306
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
307
  msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
308
 
309
- #: custom-field-template/custom-field-template.php:1064
310
  msgid "Clear"
311
  msgstr "解除"
312
 
313
- #: custom-field-template/custom-field-template.php:1131
314
  msgid "Select"
315
  msgstr "選択してください"
316
 
317
- #: custom-field-template/custom-field-template.php:1189
318
  msgid "Add Media"
319
  msgstr ""
320
 
321
- #: custom-field-template/custom-field-template.php:1191
322
  msgid "Add an Image"
323
  msgstr ""
324
 
325
- #: custom-field-template/custom-field-template.php:1193
326
  msgid "Add Video"
327
  msgstr ""
328
 
329
- #: custom-field-template/custom-field-template.php:1195
330
  msgid "Add Audio"
331
  msgstr ""
332
 
333
- #: custom-field-template/custom-field-template.php:1206
334
  msgid "Toggle"
335
  msgstr "切り替え"
336
 
337
- #: custom-field-template/custom-field-template.php:1530
 
 
 
 
 
 
 
 
338
  msgid "Save"
339
  msgstr "保存"
340
 
341
- #: custom-field-template/custom-field-template.php:1837
342
  msgid "Search »"
343
  msgstr "検索 »"
344
 
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-03-23 00:04+0900\n"
6
+ "PO-Revision-Date: 2009-03-23 00:04+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
16
  "X-Poedit-Basepath: ../\n"
17
  "X-Poedit-SearchPath-0: custom-field-template\n"
18
 
19
+ #: custom-field-template/custom-field-template.php:107
20
+ #: custom-field-template/custom-field-template.php:108
21
+ #: custom-field-template/custom-field-template.php:438
22
+ #: custom-field-template/custom-field-template.php:607
23
+ #: custom-field-template/custom-field-template.php:1443
24
+ #: custom-field-template/custom-field-template.php:1563
25
  msgid "Custom Field Template"
26
  msgstr "カスタムフィールドテンプレート"
27
 
28
+ #: custom-field-template/custom-field-template.php:147
29
+ #: custom-field-template/custom-field-template.php:1655
30
  msgid "Load"
31
  msgstr "読込"
32
 
33
+ #: custom-field-template/custom-field-template.php:296
34
  msgid "read more"
35
  msgstr "続きを表示"
36
 
37
+ #: custom-field-template/custom-field-template.php:314
38
+ #: custom-field-template/custom-field-template.php:324
39
  msgid "Custom Fields"
40
  msgstr "カスタムフィールド"
41
 
42
+ #: custom-field-template/custom-field-template.php:354
43
  msgid "Settings"
44
  msgstr "設定"
45
 
46
+ #: custom-field-template/custom-field-template.php:366
47
  msgid "Default Template"
48
  msgstr "デフォルトテンプレート"
49
 
50
+ #: custom-field-template/custom-field-template.php:547
51
+ #: custom-field-template/custom-field-template.php:551
52
+ #: custom-field-template/custom-field-template.php:563
53
+ #: custom-field-template/custom-field-template.php:571
54
+ #: custom-field-template/custom-field-template.php:586
55
  msgid "Options updated."
56
  msgstr "オプションは更新されました。"
57
 
58
+ #: custom-field-template/custom-field-template.php:590
59
  msgid "Value Counts rebuilt."
60
  msgstr "バリューカウントは再構築されました。"
61
 
62
+ #: custom-field-template/custom-field-template.php:595
63
  msgid "Options resetted."
64
  msgstr "オプションはリセットされました。"
65
 
66
+ #: custom-field-template/custom-field-template.php:599
67
  msgid "Options deleted."
68
  msgstr "オプションは削除されました。"
69
 
70
+ #: custom-field-template/custom-field-template.php:613
71
+ #: custom-field-template/custom-field-template.php:690
72
+ #: custom-field-template/custom-field-template.php:709
73
+ #: custom-field-template/custom-field-template.php:738
74
+ #: custom-field-template/custom-field-template.php:769
75
+ #: custom-field-template/custom-field-template.php:807
76
+ #: custom-field-template/custom-field-template.php:827
77
+ #: custom-field-template/custom-field-template.php:926
78
+ #: custom-field-template/custom-field-template.php:942
79
+ #: custom-field-template/custom-field-template.php:958
80
  msgid "Click to toggle"
81
  msgstr "クリックで切替"
82
 
83
+ #: custom-field-template/custom-field-template.php:614
84
  msgid "Custom Field Template Options"
85
  msgstr "カスタムフィールドテンプレートオプション"
86
 
87
+ #: custom-field-template/custom-field-template.php:624
88
  msgid "Template Title"
89
  msgstr "テンプレートタイトル"
90
 
91
+ #: custom-field-template/custom-field-template.php:626
92
  msgid "Template Instruction"
93
  msgstr "テンプレートインストラクション"
94
 
95
+ #: custom-field-template/custom-field-template.php:628
96
+ #: custom-field-template/custom-field-template.php:785
97
  msgid "Post Type"
98
  msgstr "投稿タイプ"
99
 
100
+ #: custom-field-template/custom-field-template.php:630
101
+ #: custom-field-template/custom-field-template.php:786
102
  msgid "Both"
103
  msgstr "両方"
104
 
105
+ #: custom-field-template/custom-field-template.php:631
106
+ #: custom-field-template/custom-field-template.php:787
107
  msgid "Post"
108
  msgstr "投稿"
109
 
110
+ #: custom-field-template/custom-field-template.php:632
111
+ #: custom-field-template/custom-field-template.php:788
112
  msgid "Page"
113
  msgstr "ページ"
114
 
115
+ #: custom-field-template/custom-field-template.php:633
116
+ #: custom-field-template/custom-field-template.php:789
117
  msgid "Category ID (comma-deliminated)"
118
  msgstr "カテゴリーID(カンマ区切り)"
119
 
120
+ #: custom-field-template/custom-field-template.php:635
121
  msgid "Template Content"
122
  msgstr "テンプレートコンテンツ"
123
 
124
+ #: custom-field-template/custom-field-template.php:642
125
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
126
  msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
127
 
128
+ #: custom-field-template/custom-field-template.php:643
129
  msgid "Use multiple image inset"
130
  msgstr "複数画像挿入を利用する"
131
 
132
+ #: custom-field-template/custom-field-template.php:643
133
  msgid "Caution:"
134
  msgstr "ご注意:"
135
 
136
+ #: custom-field-template/custom-field-template.php:643
137
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
138
  msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
139
 
140
+ #: custom-field-template/custom-field-template.php:647
141
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
142
  msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
143
 
144
+ #: custom-field-template/custom-field-template.php:648
145
  msgid "Use labels in place of custom keys"
146
  msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
147
 
148
+ #: custom-field-template/custom-field-template.php:651
149
  msgid "In case that you would like to add p and br tags in textareas automatically"
150
  msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
151
 
152
+ #: custom-field-template/custom-field-template.php:652
153
  msgid "Use wpautop function"
154
  msgstr "wpautop関数を使用する"
155
 
156
+ #: custom-field-template/custom-field-template.php:656
157
  msgid "In case that you would like to save values automatically in switching templates"
158
  msgstr "テンプレート切替時自動で保存したい場合"
159
 
160
+ #: custom-field-template/custom-field-template.php:657
161
  msgid "Use the auto save in switching templates"
162
  msgstr "テンプレート切替時の自動保存を使用する"
163
 
164
+ #: custom-field-template/custom-field-template.php:661
165
  msgid "In case that you would like to forbid to use the default custom fields."
166
  msgstr "デフォルトのカスタムフィールドの使用を禁止する場合"
167
 
168
+ #: custom-field-template/custom-field-template.php:662
169
  msgid "Disable the default custom fields"
170
  msgstr "デフォルトのカスタムフィールドを無効にする"
171
 
172
+ #: custom-field-template/custom-field-template.php:666
173
  msgid "In case that you would like to forbid to use the quick edit."
174
  msgstr "クイック編集の使用を禁止する場合"
175
 
176
+ #: custom-field-template/custom-field-template.php:667
177
  msgid "Disable the quick edit"
178
  msgstr "クイック編集を無効にする"
179
 
180
+ #: custom-field-template/custom-field-template.php:671
181
  msgid "In case that you would like to replace the box title with the template title."
182
  msgstr "ボックスタイトルをテンプレートタイトルで置き換える場合"
183
 
184
+ #: custom-field-template/custom-field-template.php:672
185
  msgid "Replace the box title"
186
  msgstr "ボックスタイトルを置き換える"
187
 
188
+ #: custom-field-template/custom-field-template.php:676
189
  msgid "In case that you would like to use the shortcode in the widget."
190
  msgstr "ショートコードをウィジェットで使用したい場合"
191
 
192
+ #: custom-field-template/custom-field-template.php:677
193
  msgid "Use the shortcode in the widget"
194
  msgstr "ショートコードをウィジェットで使用する"
195
 
196
+ #: custom-field-template/custom-field-template.php:681
197
+ #: custom-field-template/custom-field-template.php:700
198
+ #: custom-field-template/custom-field-template.php:729
199
+ #: custom-field-template/custom-field-template.php:760
200
+ #: custom-field-template/custom-field-template.php:798
201
  msgid "Update Options »"
202
  msgstr "オプションを更新する »"
203
 
204
+ #: custom-field-template/custom-field-template.php:691
205
  msgid "ADMIN CSS"
206
  msgstr "ADMIN CSS"
207
 
208
+ #: custom-field-template/custom-field-template.php:710
209
  msgid "[cft] and [cftsearch] Shortcode Format"
210
  msgstr "[cft] and [cftsearch] Shortcode Format"
211
 
212
+ #: custom-field-template/custom-field-template.php:713
213
  msgid "For [cft], [key] will be converted into the value of [key]."
214
  msgstr "[cft]では、[key]は、[key]の値に置換されます。"
215
 
216
+ #: custom-field-template/custom-field-template.php:714
217
  msgid "For [cftsearch], [key] will be converted into the input field."
218
  msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
219
 
220
+ #: custom-field-template/custom-field-template.php:723
221
+ #: custom-field-template/custom-field-template.php:792
222
  msgid "Use PHP"
223
  msgstr "PHPを使用する"
224
 
225
+ #: custom-field-template/custom-field-template.php:739
226
  msgid "PHP CODE (Experimental Option)"
227
  msgstr "PHP CODE (Experimental Option)"
228
 
229
+ #: custom-field-template/custom-field-template.php:741
230
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
231
  msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
232
 
233
+ #: custom-field-template/custom-field-template.php:742
234
  msgid "For `text` and `textarea`, you must set $value as an string."
235
  msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
236
 
237
+ #: custom-field-template/custom-field-template.php:744
238
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
239
  msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
240
 
241
+ #: custom-field-template/custom-field-template.php:770
242
  msgid "Auto Hook of `the_content()` (Experimental Option)"
243
  msgstr "Auto Hook of `the_content()` (Experimental Option)"
244
 
245
+ #: custom-field-template/custom-field-template.php:780
246
  msgid "Position"
247
  msgstr "位置"
248
 
249
+ #: custom-field-template/custom-field-template.php:781
250
  msgid "Before the conetnt"
251
  msgstr "コンテンツの前"
252
 
253
+ #: custom-field-template/custom-field-template.php:782
254
  msgid "After the conetnt"
255
  msgstr "コンテンツの後"
256
 
257
+ #: custom-field-template/custom-field-template.php:783
258
+ #, php-format
259
+ msgid "Inside the conetnt ([cfthook hook=%d])"
260
+ msgstr "コンテンツの中 ([cfthook hook=%d])"
261
+
262
+ #: custom-field-template/custom-field-template.php:791
263
  msgid "Content"
264
  msgstr "コンテンツ"
265
 
266
+ #: custom-field-template/custom-field-template.php:808
267
  msgid "Rebuild Value Counts"
268
  msgstr "バリューカウントの再構築"
269
 
270
+ #: custom-field-template/custom-field-template.php:810
271
  msgid "Are you sure to rebuild all value counts?"
272
  msgstr "本当に全てのバリューカウントを再構築しますか?"
273
 
274
+ #: custom-field-template/custom-field-template.php:814
275
  msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
276
  msgstr "バリューカウントはキーごとに値がどのくらいあるか一時的に保存するのに使用されます。`valueCount = true`をフィールドにセットしてください。"
277
 
278
+ #: custom-field-template/custom-field-template.php:818
279
  msgid "Rebuild Value Counts »"
280
  msgstr "バリューカウントを再構築する »"
281
 
282
+ #: custom-field-template/custom-field-template.php:828
283
  msgid "Option List"
284
  msgstr "オプションリスト"
285
 
286
+ #: custom-field-template/custom-field-template.php:927
287
  msgid "Reset Options"
288
  msgstr "オプションをリセットする"
289
 
290
+ #: custom-field-template/custom-field-template.php:929
291
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
292
  msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
293
 
294
+ #: custom-field-template/custom-field-template.php:933
295
  msgid "Unset Options »"
296
  msgstr "オプションをリセットする »"
297
 
298
+ #: custom-field-template/custom-field-template.php:943
299
  msgid "Delete Options"
300
  msgstr "オプションを削除する"
301
 
302
+ #: custom-field-template/custom-field-template.php:945
303
  msgid "Are you sure to delete options? Options you set will be deleted."
304
  msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
305
 
306
+ #: custom-field-template/custom-field-template.php:949
307
  msgid "Delete Options »"
308
  msgstr "オプションを削除する »"
309
 
310
+ #: custom-field-template/custom-field-template.php:959
311
  msgid "Donation"
312
  msgstr "寄付"
313
 
314
+ #: custom-field-template/custom-field-template.php:961
315
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
316
  msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
317
 
318
+ #: custom-field-template/custom-field-template.php:1150
319
  msgid "Clear"
320
  msgstr "解除"
321
 
322
+ #: custom-field-template/custom-field-template.php:1225
323
  msgid "Select"
324
  msgstr "選択してください"
325
 
326
+ #: custom-field-template/custom-field-template.php:1284
327
  msgid "Add Media"
328
  msgstr ""
329
 
330
+ #: custom-field-template/custom-field-template.php:1286
331
  msgid "Add an Image"
332
  msgstr ""
333
 
334
+ #: custom-field-template/custom-field-template.php:1288
335
  msgid "Add Video"
336
  msgstr ""
337
 
338
+ #: custom-field-template/custom-field-template.php:1290
339
  msgid "Add Audio"
340
  msgstr ""
341
 
342
+ #: custom-field-template/custom-field-template.php:1301
343
  msgid "Toggle"
344
  msgstr "切り替え"
345
 
346
+ #: custom-field-template/custom-field-template.php:1604
347
+ msgid "Initialize"
348
+ msgstr "初期化"
349
+
350
+ #: custom-field-template/custom-field-template.php:1605
351
+ msgid "Are you sure to reset current values? Default values will be loaded."
352
+ msgstr "現在値をリセットしてもよろしいですか?初期値が読み込まれます。"
353
+
354
+ #: custom-field-template/custom-field-template.php:1608
355
  msgid "Save"
356
  msgstr "保存"
357
 
358
+ #: custom-field-template/custom-field-template.php:1985
359
  msgid "Search »"
360
  msgstr "検索 »"
361
 
custom-field-template.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
4
  Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
- Version: 1.1
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
@@ -58,12 +58,16 @@ class custom_field_template {
58
  }
59
  }
60
 
 
 
 
 
 
61
  if ( is_user_logged_in() && isset($_REQUEST['post']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxsave' ) {
62
  if ( $_REQUEST['post'] > 0 )
63
  $this->edit_meta_value( $_REQUEST['post'] );
64
  exit();
65
  }
66
-
67
 
68
  if ( is_user_logged_in() && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxload') {
69
  if ( isset($_REQUEST['id']) )
@@ -444,24 +448,69 @@ mediaButton = true';
444
  foreach( $categories as $val ) :
445
  $cats[] = $val->cat_ID;
446
  endforeach;
 
 
 
 
 
 
 
447
 
448
  for ( $i=0; $i<count($options['hook']); $i++ ) :
449
  if ( $options['hook'][$i]['category'] ) :
450
  if ( is_category() || is_single() ) :
 
 
 
 
451
  $needle = explode(',', $options['hook'][$i]['category']);
452
  foreach ( $needle as $val ) :
453
  if ( in_array($val, $cats ) ) :
454
  if ( $options['hook'][$i]['position'] == 0 )
455
  $content .= $options['hook'][$i]['content'];
 
 
456
  else
457
  $content = $options['hook'][$i]['content'] . $content;
458
  break;
459
  endif;
460
  endforeach;
461
  endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  else :
 
 
 
 
463
  if ( $options['hook'][$i]['position'] == 0 )
464
  $content .= $options['hook'][$i]['content'];
 
 
465
  else
466
  $content = $options['hook'][$i]['content'] . $content;
467
  endif;
@@ -529,6 +578,7 @@ mediaButton = true';
529
  $options['hook'][$j]['content'] = $_POST["custom_field_template_hook_content"][$i];
530
  $options['hook'][$j]['category'] = preg_replace('/\s/', '', $_POST["custom_field_template_hook_category"][$i]);
531
  $options['hook'][$j]['use_php'] = $_POST["custom_field_template_hook_use_php"][$i];
 
532
  $j++;
533
  }
534
  }
@@ -669,8 +719,8 @@ mediaButton = true';
669
  ?>
670
  <tr><th><strong>FORMAT #<?php echo $i; ?></strong></th></tr>
671
  <tr><td>
672
- <p><textarea name="custom_field_template_shortcode_format[]" rows="10" cols="80"><?php echo stripcslashes($options['shortcode_format'][$i]); ?></textarea></p>
673
- <p><input type="checkbox" name="custom_field_template_shortcode_format_use_php[]" id="custom_field_template_shortcode_format_use_php[]" value="1" <?php if ($options['shortcode_format_use_php'][$i]) { echo ' checked="checked"'; } ?> /> <?php _e('Use PHP', 'custom-field-template'); ?></p>
674
  </td></tr>
675
  <?php
676
  endfor;
@@ -730,7 +780,12 @@ ex. `radio` and `select`:</dt><dd>$values = array('dog', 'cat', 'monkey'); $defa
730
  <p><label for="custom_field_template_hook_position[<?php echo $i; ?>]"><?php echo sprintf(__('Position', 'custom-field-template'), $i); ?></label>:<br />
731
  <input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="1" <?php if($options['hook'][$i]['position']==1) echo ' checked="checked"'; ?> /> <?php _e('Before the conetnt', 'custom-field-template'); ?>
732
  <input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="0" <?php if($options['hook'][$i]['position']==0) echo ' checked="checked"'; ?> /> <?php _e('After the conetnt', 'custom-field-template'); ?>
 
733
  </p>
 
 
 
 
734
  <p><label for="custom_field_template_hook_category[<?php echo $i; ?>]"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
735
  <input type="text" name="custom_field_template_hook_category[<?php echo $i; ?>]" id="custom_field_template_hook_category[<?php echo $i; ?>]" value="<?php echo stripcslashes($options['hook'][$i]['category']); ?>" size="80" /></p>
736
  <p><label for="custom_field_template_hook_content[<?php echo $i; ?>]"><?php echo sprintf(__('Content', 'custom-field-template'), $i); ?></label>:<br /><textarea name="custom_field_template_hook_content[<?php echo $i; ?>]" rows="5" cols="80"><?php echo stripcslashes($options['hook'][$i]['content']); ?></textarea></p>
@@ -965,7 +1020,7 @@ jQuery(this).addClass("closed");
965
  eval(stripcslashes($options['php'][$code]));
966
  endif;
967
 
968
- if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
969
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
970
  if ( $value ) {
971
  $value = $value[ $sid ];
@@ -998,7 +1053,7 @@ jQuery(this).addClass("closed");
998
 
999
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1000
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1001
- $out .= '<input id="' . $name . '" name="' . $name . '[]" value="' . attribute_escape($value) . '" type="text" size="' . $size . '"' . $class . $event_output . ' /></dd>' .
1002
  '</dl>';
1003
  return $out;
1004
  }
@@ -1012,7 +1067,7 @@ jQuery(this).addClass("closed");
1012
 
1013
  if ( !$value ) $value = "true";
1014
 
1015
- if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
1016
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
1017
  if ( $selected ) {
1018
  if ( in_array(stripcslashes($value), $selected) ) $checked = 'checked="checked"';
@@ -1038,10 +1093,12 @@ jQuery(this).addClass("closed");
1038
  '<dl>' .
1039
  '<dt><span' . $hide . '>' . $title . '</span></dt>' .
1040
  '<dd>';
 
 
1041
 
1042
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1043
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1044
- $out .= '<label for="' . $id . '" class="selectit"><input name="' . $name . '[' . $sid . ']" value="' . attribute_escape($value) . '" ' . $checked . ' type="checkbox"' . $class . $event_output . ' /> ';
1045
  if ( $valueLabel )
1046
  $out .= stripcslashes($valueLabel);
1047
  else
@@ -1064,7 +1121,7 @@ jQuery(this).addClass("closed");
1064
  eval(stripcslashes($options['php'][$code]));
1065
  endif;
1066
 
1067
- if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
1068
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
1069
  $selected = $selected[ $sid ];
1070
  } else {
@@ -1102,7 +1159,7 @@ jQuery(this).addClass("closed");
1102
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1103
  $i = 0;
1104
  foreach( $values as $val ) {
1105
- $id = $name . '_' . $this->sanitize_name( $val );
1106
 
1107
  $checked = ( trim( $val ) == trim( $selected ) ) ? 'checked="checked"' : '';
1108
 
@@ -1131,7 +1188,7 @@ jQuery(this).addClass("closed");
1131
  eval(stripcslashes($options['php'][$code]));
1132
  endif;
1133
 
1134
- if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
1135
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
1136
  if ( $selected ) {
1137
  $selected = $selected[ $sid ];
@@ -1160,7 +1217,7 @@ jQuery(this).addClass("closed");
1160
 
1161
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1162
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1163
- $out .= '<select name="' . $name . '[]"' . $class . $event_output . '>';
1164
 
1165
  if ( $selectLabel )
1166
  $out .= '<option value="" >' . stripcslashes(trim($selectLabel)) . '</option>';
@@ -1197,7 +1254,7 @@ jQuery(this).addClass("closed");
1197
  eval(stripcslashes($options['php'][$code]));
1198
  endif;
1199
 
1200
- if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
1201
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
1202
  $value = $value[ $sid ];
1203
  } else {
@@ -1314,8 +1371,11 @@ EOF;
1314
  if ( $_REQUEST['post'] && $options['custom_fields'][$id]['category'] && !isset($options['posts'][$_REQUEST['post']]) && $options['posts'][$_REQUEST['post']] !== $id && $_REQUEST['cft_mode'] != 'ajaxload' )
1315
  return;
1316
 
1317
- if ( $options['custom_fields'][$id]['instruction'] )
1318
- $out .= '<div id="cft_instruction">' . stripcslashes($options['custom_fields'][$id]['instruction']) . '</div>';
 
 
 
1319
 
1320
  $out .= '<div>';
1321
  $out .= '<input type="hidden" name="custom-field-template-id" id="custom-field-template-id" value="' . $id . '" />';
@@ -1482,7 +1542,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1482
  $categories = explode(',', $val['category']);
1483
  foreach($categories as $cat_id) :
1484
  if ( is_numeric($cat_id) ) :
1485
- $out .= ' jQuery(\'#in-category-' . $cat_id . '\').click(function(){if(jQuery(\'#in-category-' . $cat_id . '\').attr(\'checked\') == true) { if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;};';
1486
  if ( $options['custom_field_template_use_autosave'] ) :
1487
  $out .= ' var fields = jQuery(\'#cft :input\').fieldSerialize();';
1488
  $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields, success: function(){jQuery(\'#custom_field_template_select\').val(\'' . $key . '\');jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=' . $key . '&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
@@ -1498,7 +1558,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1498
  $out .= 'jQuery(\'#cft\').html(html);}});';
1499
  endif;
1500
 
1501
- $out .= ' }else{ jQuery(\'#cft\').html(\'\');';
1502
  if ( $options['custom_field_template_replace_the_title'] ) :
1503
  $out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . __('Custom Field Template', 'custom-field-template') . '\');';
1504
  endif;
@@ -1530,10 +1590,50 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1530
  '</style>';
1531
  $body = $this->load_custom_field($init_id);
1532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1533
  if ( count($options['custom_fields'])>1 ) :
1534
  $flag = 0;
 
 
 
 
1535
  for ( $i=0; $i < count($options['custom_fields']); $i++ ) :
1536
- if ( !$options['custom_fields'][$i]['category'] ) :
1537
  $flag = 1;
1538
  break;
1539
  endif;
@@ -1541,10 +1641,12 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1541
  if ( $flag ) :
1542
  $out .= '<select id="custom_field_template_select">';
1543
  for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
1544
- if ( $i == $options['posts'][$_REQUEST['post']] && isset($_REQUEST['post']) ) :
1545
- $out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1546
  elseif ( $options['custom_fields'][$i]['category'] ) :
1547
  $out .= '';
 
 
1548
  else :
1549
  $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1550
  endif;
@@ -1564,36 +1666,13 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1564
  endif;
1565
  $out .= '" />';
1566
  else :
1567
- $out .= '<div style="height:25px;">&nbsp;</div>';
1568
  endif;
1569
  else :
1570
- $out .= '<div style="height:25px;">&nbsp;</div>';
1571
  endif;
1572
 
1573
- $out .= '<input type="hidden" name="custom-field-template-verify-key" id="custom-field-template-verify-key" value="' . wp_create_nonce('custom-field-template') . '" />';
1574
- $out .= '<div id="cft">';
1575
- $out .= $body;
1576
- $out .= '</div>';
1577
-
1578
- $out .= '<div style="position:absolute; top:30px; right:5px;">';
1579
- $out .= '<img class="waiting" style="display:none; vertical-align:middle;" src="images/loading.gif" alt="" id="cftloading_img" /> ';
1580
- $out .= '<input type="button" value="' . __('Save', 'custom-field-template') . '" onclick="';
1581
- $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1582
- $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields});';
1583
- $out .= '" class="button" style="vertical-align:middle;" />';
1584
- $out .= '</div>';
1585
-
1586
- if ( substr($wp_version, 0, 3) < '2.5' ) {
1587
- $out .= '</div></fieldset></div>';
1588
- } else {
1589
- if ( $body && $options['custom_field_template_replace_the_title'] ) :
1590
- $out .= '<script type="text/javascript">' . "\n" . '// <![CDATA[' . "\n";
1591
- $out .= 'jQuery(document).ready(function() {jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$init_id]['title'] . '\');});' . "\n";
1592
- $out .= '// ]]>' . "\n" . '</script>';
1593
- endif;
1594
- }
1595
-
1596
- echo $out;
1597
  }
1598
 
1599
  function edit_meta_value( $id ) {
@@ -1903,7 +1982,8 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1903
  extract(shortcode_atts(array(
1904
  'template' => 0,
1905
  'format' => '',
1906
- 'search_label' => __('Search &raquo;', 'custom-field-template')
 
1907
  ), $attr));
1908
 
1909
 
@@ -1925,6 +2005,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1925
  if($val[0]['searchOperator']) eval('$search["operator"] =' . stripslashes($val[0]['searchOperator']));
1926
  if($val[0]['searchValueLabel']) eval('$search["valueLabel"] =' . stripslashes($val[0]['searchValueLabel']));
1927
  if($val[0]['searchDefault']) eval('$search["default"] =' . stripslashes($val[0]['searchDefault']));
 
1928
 
1929
  foreach ( $search as $skey => $sval ) :
1930
  $j = 1;
@@ -1972,17 +2053,18 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1972
  if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][urlencode($key)][$rkey] )
1973
  $checked = ' checked="checked"';
1974
 
1975
- $replace_val[$rkey] .= '<li><input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metavalue) . '"' . $class . $checked . ' /> ';
1976
  if ( $valueLabels[$j] ) $replace_val[$rkey] .= stripcslashes($valueLabels[$j]);
1977
  else $replace_val[$rkey] .= stripcslashes($metavalue);
1978
- $replace_val[$rkey] .= '</li>';
1979
  $j++;
1980
  endforeach;
1981
  $replace_val[$rkey] .= '</ul>';
1982
  else :
1983
- $replace_val[$rkey] .= '<input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape(trim($values[0])) . '"' . $class . ' /> ';
1984
  if ( $valueLabel[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[0]));
1985
  else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
 
1986
  endif;
1987
  break;
1988
  case 'radio':
@@ -2004,17 +2086,18 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2004
  endif;
2005
  if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][urlencode($key)][$rkey] )
2006
  $checked = ' checked="checked"';
2007
- $replace_val[$rkey] .= '<li><input type="radio" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metavalue) . '"' . $class . $checked . ' /> ';
2008
  if ( $valueLabels[$j] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[$j]));
2009
  else $replace_val[$rkey] .= stripcslashes($metavalue);
2010
- $replace_val[$rkey] .= '</li>';
2011
  $j++;
2012
  endforeach;
2013
  $replace_val[$rkey] .= '</ul>';
2014
  else :
2015
- $replace_val[$rkey] .= '<input type="radio" name="cftsearch[' . urlencode($key) . '][]" value="' . attribute_escape(trim($values[0])) . '"' . $class . ' /> ';
2016
  if ( $valueLabels[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[0]));
2017
  else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
 
2018
  endif;
2019
  break;
2020
  case 'select':
@@ -2054,7 +2137,8 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2054
  endfor;
2055
  endif;
2056
 
2057
- $output .= '<p><input type="submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
 
2058
  $output .= '<input type="hidden" name="cftsearch_submit" value="1" /></p>' . "\n";
2059
  $output .= '</form>' . "\n";
2060
  else :
@@ -2081,12 +2165,12 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2081
  break;
2082
  case 'checkbox':
2083
  if ( $val2['class'] ) $class = ' class="' . $val2['class'] . '"';
2084
- $output .= '<dd><input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($val2['value']) . '"' . $class . ' /> ';
2085
  if ( $val2['valueLabel'] )
2086
  $output .= stripcslashes($val2['valueLabel']);
2087
  else
2088
  $output .= stripcslashes($val2['value']);
2089
- $output .= '</dd>' . "\n";
2090
  break;
2091
  case 'radio':
2092
  if ( $val2['class'] ) $class = ' class="' . $val2['class'] . '"';
@@ -2095,13 +2179,13 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2095
  $i=0;
2096
  foreach ( $values as $metaval ) :
2097
  $metaval = trim($metaval);
2098
- $output .= '<dd>' . '<input type="radio" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metaval) . '"' . $class . ' /> ';
2099
  if ( $val2['valueLabel'] )
2100
  $output .= stripcslashes(trim($valueLabels[$i]));
2101
  else
2102
  $output .= stripcslashes($metaval);
2103
  $i++;
2104
- $output .= '</dd>' . "\n";
2105
  endforeach;
2106
  break;
2107
  case 'select':
@@ -2130,7 +2214,8 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2130
  $output .= '</dl>' ."\n";
2131
  endif;
2132
  endforeach;
2133
- $output .= '<p><input type="submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
 
2134
  $output .= '<input type="hidden" name="cftsearch_submit" value="1" /></p>' . "\n";
2135
  $output .= '</form>' . "\n";
2136
  endif;
@@ -2146,6 +2231,8 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2146
  $wp_query->is_page = '';
2147
  $wp_query->is_singular = '';
2148
 
 
 
2149
  $where = '';
2150
 
2151
  $count = count($options['custom_fields']);
@@ -2195,17 +2282,25 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2195
  endforeach;
2196
  endif;
2197
 
2198
- if ( is_array($_REQUEST['cftcategory']) ) :
2199
- $ids = get_objects_in_term($_REQUEST['cftcategory'], 'category');
2200
  if ( is_array($ids) && count($ids) > 0 ) :
2201
  $in_posts = "'" . implode("', '", $ids) . "'";
2202
  $where .= " AND ID IN (" . $in_posts . ")";
2203
  endif;
2204
  $where .= " AND " . $wpdb->posts . ".post_type = 'post'";
2205
  endif;
 
 
 
 
 
 
 
2206
 
2207
- $where .= " AND wp_posts.post_status = 'publish'";
2208
-
 
2209
  return $where;
2210
  }
2211
 
@@ -2219,10 +2314,24 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2219
  }
2220
 
2221
  function custom_field_template_posts_orderby($sql) {
2222
- if ( ($_REQUEST['order'] == 'ASC' || $_REQUEST['order'] == 'DESC') && $_REQUEST['orderby'] ) :
2223
- $sql = " meta.meta_value " . $_REQUEST['order'];
 
 
 
 
 
 
 
 
 
 
 
2224
  return $sql;
2225
  endif;
 
 
 
2226
  }
2227
 
2228
  function EvalBuffer($string) {
4
  Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
+ Version: 1.1.1
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
58
  }
59
  }
60
 
61
+ if ( is_user_logged_in() && isset($_REQUEST['post']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'selectbox' ) {
62
+ echo $this->custom_field_template_selectbox();
63
+ exit();
64
+ }
65
+
66
  if ( is_user_logged_in() && isset($_REQUEST['post']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxsave' ) {
67
  if ( $_REQUEST['post'] > 0 )
68
  $this->edit_meta_value( $_REQUEST['post'] );
69
  exit();
70
  }
 
71
 
72
  if ( is_user_logged_in() && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxload') {
73
  if ( isset($_REQUEST['id']) )
448
  foreach( $categories as $val ) :
449
  $cats[] = $val->cat_ID;
450
  endforeach;
451
+
452
+ if ( $options['custom_fields'][$id]['post_type'] ) :
453
+ if ( $options['custom_fields'][$id]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) )
454
+ return;
455
+ if ( $options['custom_fields'][$id]['post_type'] == 'page' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php')) )
456
+ return;
457
+ endif;
458
 
459
  for ( $i=0; $i<count($options['hook']); $i++ ) :
460
  if ( $options['hook'][$i]['category'] ) :
461
  if ( is_category() || is_single() ) :
462
+ if ( $options['hook'][$i]['use_php'] ) :
463
+ $options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
464
+ $options['hook'][$i]['content'] = preg_replace_callback("/(<\?php|<\?|< \?php)(.*?)\?>/si", array($this, 'EvalBuffer'), $options['hook'][$i]['content']);
465
+ endif;
466
  $needle = explode(',', $options['hook'][$i]['category']);
467
  foreach ( $needle as $val ) :
468
  if ( in_array($val, $cats ) ) :
469
  if ( $options['hook'][$i]['position'] == 0 )
470
  $content .= $options['hook'][$i]['content'];
471
+ elseif ( $options['hook'][$i]['position'] == 2 )
472
+ $content = preg_replace('/\[cfthook hook='.$i.'\]/', $options['hook'][$i]['content'], $content);
473
  else
474
  $content = $options['hook'][$i]['content'] . $content;
475
  break;
476
  endif;
477
  endforeach;
478
  endif;
479
+ elseif ( $option['hook'][$i]['post_type']=='post' ) :
480
+ if ( is_category() || is_single() ) :
481
+ if ( $options['hook'][$i]['use_php'] ) :
482
+ $options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
483
+ $options['hook'][$i]['content'] = preg_replace_callback("/(<\?php|<\?|< \?php)(.*?)\?>/si", array($this, 'EvalBuffer'), $options['hook'][$i]['content']);
484
+ endif;
485
+ if ( $options['hook'][$i]['position'] == 0 )
486
+ $content .= $options['hook'][$i]['content'];
487
+ elseif ( $options['hook'][$i]['position'] == 2 )
488
+ $content = preg_replace('/\[cfthook hook='.$i.'\]/', $options['hook'][$i]['content'], $content);
489
+ else
490
+ $content = $options['hook'][$i]['content'] . $content;
491
+ endif;
492
+ elseif ( $option['hook'][$i]['post_type']=='page' ) :
493
+ if ( is_page() ) :
494
+ if ( $options['hook'][$i]['use_php'] ) :
495
+ $options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
496
+ $options['hook'][$i]['content'] = preg_replace_callback("/(<\?php|<\?|< \?php)(.*?)\?>/si", array($this, 'EvalBuffer'), $options['hook'][$i]['content']);
497
+ endif;
498
+ if ( $options['hook'][$i]['position'] == 0 )
499
+ $content .= $options['hook'][$i]['content'];
500
+ elseif ( $options['hook'][$i]['position'] == 2 )
501
+ $content = preg_replace('/\[cfthook hook='.$i.'\]/', $options['hook'][$i]['content'], $content);
502
+ else
503
+ $content = $options['hook'][$i]['content'] . $content;
504
+ endif;
505
  else :
506
+ if ( $options['hook'][$i]['use_php'] ) :
507
+ $options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
508
+ $options['hook'][$i]['content'] = preg_replace_callback("/(<\?php|<\?|< \?php)(.*?)\?>/si", array($this, 'EvalBuffer'), $options['hook'][$i]['content']);
509
+ endif;
510
  if ( $options['hook'][$i]['position'] == 0 )
511
  $content .= $options['hook'][$i]['content'];
512
+ elseif ( $options['hook'][$i]['position'] == 2 )
513
+ $content = preg_replace('/\[cfthook hook='.$i.'\]/', $options['hook'][$i]['content'], $content);
514
  else
515
  $content = $options['hook'][$i]['content'] . $content;
516
  endif;
578
  $options['hook'][$j]['content'] = $_POST["custom_field_template_hook_content"][$i];
579
  $options['hook'][$j]['category'] = preg_replace('/\s/', '', $_POST["custom_field_template_hook_category"][$i]);
580
  $options['hook'][$j]['use_php'] = $_POST["custom_field_template_hook_use_php"][$i];
581
+ $options['hook'][$j]['post_type'] = $_POST["custom_field_template_hook_post_type"][$i];
582
  $j++;
583
  }
584
  }
719
  ?>
720
  <tr><th><strong>FORMAT #<?php echo $i; ?></strong></th></tr>
721
  <tr><td>
722
+ <p><textarea name="custom_field_template_shortcode_format[<?php echo $i; ?>]" rows="10" cols="80"><?php echo stripcslashes($options['shortcode_format'][$i]); ?></textarea></p>
723
+ <p><label><input type="checkbox" name="custom_field_template_shortcode_format_use_php[<?php echo $i; ?>]" value="1" <?php if ($options['shortcode_format_use_php'][$i]) { echo ' checked="checked"'; } ?> /> <?php _e('Use PHP', 'custom-field-template'); ?></label></p>
724
  </td></tr>
725
  <?php
726
  endfor;
780
  <p><label for="custom_field_template_hook_position[<?php echo $i; ?>]"><?php echo sprintf(__('Position', 'custom-field-template'), $i); ?></label>:<br />
781
  <input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="1" <?php if($options['hook'][$i]['position']==1) echo ' checked="checked"'; ?> /> <?php _e('Before the conetnt', 'custom-field-template'); ?>
782
  <input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="0" <?php if($options['hook'][$i]['position']==0) echo ' checked="checked"'; ?> /> <?php _e('After the conetnt', 'custom-field-template'); ?>
783
+ <input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="2" <?php if($options['hook'][$i]['position']==2) echo ' checked="checked"'; ?> /> <?php echo sprintf(__('Inside the conetnt ([cfthook hook=%d])', 'custom-field-template'), $i); ?>
784
  </p>
785
+ <p><label for="custom_field_template_hook_post_type[<?php echo $i; ?>]"><?php echo sprintf(__('Post Type', 'custom-field-template'), $i); ?></label>:<br />
786
+ <input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value=""<?php if ( !$options['hook'][$i]['post_type'] ) : echo ' checked="checked"'; endif; ?> /> <?php _e('Both', 'custom-field-template'); ?>
787
+ <input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value="post"<?php if ( $options['hook'][$i]['post_type']=='post') : echo ' checked="checked"'; endif; ?> /> <?php _e('Post', 'custom-field-template'); ?>
788
+ <input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value="page"<?php if ( $options['hook'][$i]['post_type']=='page') : echo ' checked="checked"'; endif; ?> /> <?php _e('Page', 'custom-field-template'); ?></p>
789
  <p><label for="custom_field_template_hook_category[<?php echo $i; ?>]"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
790
  <input type="text" name="custom_field_template_hook_category[<?php echo $i; ?>]" id="custom_field_template_hook_category[<?php echo $i; ?>]" value="<?php echo stripcslashes($options['hook'][$i]['category']); ?>" size="80" /></p>
791
  <p><label for="custom_field_template_hook_content[<?php echo $i; ?>]"><?php echo sprintf(__('Content', 'custom-field-template'), $i); ?></label>:<br /><textarea name="custom_field_template_hook_content[<?php echo $i; ?>]" rows="5" cols="80"><?php echo stripcslashes($options['hook'][$i]['content']); ?></textarea></p>
1020
  eval(stripcslashes($options['php'][$code]));
1021
  endif;
1022
 
1023
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
1024
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
1025
  if ( $value ) {
1026
  $value = $value[ $sid ];
1053
 
1054
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1055
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1056
+ $out .= '<input id="' . $name . $sid . '" name="' . $name . '[]" value="' . attribute_escape($value) . '" type="text" size="' . $size . '"' . $class . $event_output . ' /></dd>' .
1057
  '</dl>';
1058
  return $out;
1059
  }
1067
 
1068
  if ( !$value ) $value = "true";
1069
 
1070
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
1071
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
1072
  if ( $selected ) {
1073
  if ( in_array(stripcslashes($value), $selected) ) $checked = 'checked="checked"';
1093
  '<dl>' .
1094
  '<dt><span' . $hide . '>' . $title . '</span></dt>' .
1095
  '<dd>';
1096
+
1097
+ $id = $name . $sid . '_' . $this->sanitize_name( $value );
1098
 
1099
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1100
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1101
+ $out .= '<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . ']" value="' . attribute_escape($value) . '" ' . $checked . ' type="checkbox"' . $class . $event_output . ' /> ';
1102
  if ( $valueLabel )
1103
  $out .= stripcslashes($valueLabel);
1104
  else
1121
  eval(stripcslashes($options['php'][$code]));
1122
  endif;
1123
 
1124
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
1125
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
1126
  $selected = $selected[ $sid ];
1127
  } else {
1159
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1160
  $i = 0;
1161
  foreach( $values as $val ) {
1162
+ $id = $name . $sid . '_' . $this->sanitize_name( $val );
1163
 
1164
  $checked = ( trim( $val ) == trim( $selected ) ) ? 'checked="checked"' : '';
1165
 
1188
  eval(stripcslashes($options['php'][$code]));
1189
  endif;
1190
 
1191
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
1192
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
1193
  if ( $selected ) {
1194
  $selected = $selected[ $sid ];
1217
 
1218
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1219
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1220
+ $out .= '<select id="' . $name . $sid . '" name="' . $name . '[]"' . $class . $event_output . '>';
1221
 
1222
  if ( $selectLabel )
1223
  $out .= '<option value="" >' . stripcslashes(trim($selectLabel)) . '</option>';
1254
  eval(stripcslashes($options['php'][$code]));
1255
  endif;
1256
 
1257
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
1258
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
1259
  $value = $value[ $sid ];
1260
  } else {
1371
  if ( $_REQUEST['post'] && $options['custom_fields'][$id]['category'] && !isset($options['posts'][$_REQUEST['post']]) && $options['posts'][$_REQUEST['post']] !== $id && $_REQUEST['cft_mode'] != 'ajaxload' )
1372
  return;
1373
 
1374
+ if ( $options['custom_fields'][$id]['instruction'] ) :
1375
+ $instruction = stripcslashes($options['custom_fields'][$id]['instruction']);
1376
+ $instruction = preg_replace_callback("/(<\?php|<\?|< \?php)(.*?)\?>/si", array($this, 'EvalBuffer'), $instruction);
1377
+ $out .= '<div id="cft_instruction">' . $instruction . '</div>';
1378
+ endif;
1379
 
1380
  $out .= '<div>';
1381
  $out .= '<input type="hidden" name="custom-field-template-id" id="custom-field-template-id" value="' . $id . '" />';
1542
  $categories = explode(',', $val['category']);
1543
  foreach($categories as $cat_id) :
1544
  if ( is_numeric($cat_id) ) :
1545
+ $out .= ' jQuery(\'#in-category-' . $cat_id . '\').click(function(){if(jQuery(\'#in-category-' . $cat_id . '\').attr(\'checked\') == true) { if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;}; jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), function(html) { jQuery(\'#cft_selectbox\').html(html); });';
1546
  if ( $options['custom_field_template_use_autosave'] ) :
1547
  $out .= ' var fields = jQuery(\'#cft :input\').fieldSerialize();';
1548
  $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields, success: function(){jQuery(\'#custom_field_template_select\').val(\'' . $key . '\');jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=' . $key . '&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
1558
  $out .= 'jQuery(\'#cft\').html(html);}});';
1559
  endif;
1560
 
1561
+ $out .= ' }else{ jQuery(\'#cft\').html(\'\');jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val(), function(html) { jQuery(\'#cft_selectbox\').html(html); });';
1562
  if ( $options['custom_field_template_replace_the_title'] ) :
1563
  $out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . __('Custom Field Template', 'custom-field-template') . '\');';
1564
  endif;
1590
  '</style>';
1591
  $body = $this->load_custom_field($init_id);
1592
 
1593
+ $out .= '<div id="cft_selectbox" style="height:25px;">';
1594
+ $out .= $this->custom_field_template_selectbox();
1595
+ $out .= '</div>';
1596
+
1597
+ $out .= '<input type="hidden" name="custom-field-template-verify-key" id="custom-field-template-verify-key" value="' . wp_create_nonce('custom-field-template') . '" />';
1598
+ $out .= '<div id="cft">';
1599
+ $out .= $body;
1600
+ $out .= '</div>';
1601
+
1602
+ $out .= '<div style="position:absolute; top:30px; right:5px;">';
1603
+ $out .= '<img class="waiting" style="display:none; vertical-align:middle;" src="images/loading.gif" alt="" id="cftloading_img" /> ';
1604
+ $out .= '<input type="button" value="' . __('Initialize', 'custom-field-template') . '" onclick="';
1605
+ $out .= 'if(confirm(\''.__('Are you sure to reset current values? Default values will be loaded.', 'custom-field-template').'\')){if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;};jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&default=true&id=\'+jQuery(\'#custom-field-template-id\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
1606
+ $out .= 'jQuery(\'#cft\').html(html);}});}';
1607
+ $out .= '" class="button" style="vertical-align:middle;" />';
1608
+ $out .= '<input type="button" value="' . __('Save', 'custom-field-template') . '" onclick="';
1609
+ $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1610
+ $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields});';
1611
+ $out .= '" class="button" style="vertical-align:middle;" />';
1612
+ $out .= '</div>';
1613
+
1614
+ if ( substr($wp_version, 0, 3) < '2.5' ) {
1615
+ $out .= '</div></fieldset></div>';
1616
+ } else {
1617
+ if ( $body && $options['custom_field_template_replace_the_title'] ) :
1618
+ $out .= '<script type="text/javascript">' . "\n" . '// <![CDATA[' . "\n";
1619
+ $out .= 'jQuery(document).ready(function() {jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$init_id]['title'] . '\');});' . "\n";
1620
+ $out .= '// ]]>' . "\n" . '</script>';
1621
+ endif;
1622
+ }
1623
+
1624
+ echo $out;
1625
+ }
1626
+
1627
+ function custom_field_template_selectbox() {
1628
+ $options = $this->get_custom_field_template_data();
1629
  if ( count($options['custom_fields'])>1 ) :
1630
  $flag = 0;
1631
+ $categories = get_the_category($_REQUEST['post']);
1632
+ $cats = array();
1633
+ if ( is_array($categories) ) foreach($categories as $category) $cats[] = $category->cat_ID;
1634
+ if ( $_REQUEST['post_category'] ) $cats = array_merge($cats, $_REQUEST['post_category']);
1635
  for ( $i=0; $i < count($options['custom_fields']); $i++ ) :
1636
+ if ( !$options['custom_fields'][$i]['category'] || in_array($options['custom_fields'][$i]['category'], $cats) ) :
1637
  $flag = 1;
1638
  break;
1639
  endif;
1641
  if ( $flag ) :
1642
  $out .= '<select id="custom_field_template_select">';
1643
  for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
1644
+ if ( in_array($options['custom_fields'][$i]['category'], $cats) ) :
1645
+ $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1646
  elseif ( $options['custom_fields'][$i]['category'] ) :
1647
  $out .= '';
1648
+ elseif ( $i == $options['posts'][$_REQUEST['post']] && isset($_REQUEST['post']) ) :
1649
+ $out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1650
  else :
1651
  $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1652
  endif;
1666
  endif;
1667
  $out .= '" />';
1668
  else :
1669
+ $out .= '&nbsp;';
1670
  endif;
1671
  else :
1672
+ $out .= '&nbsp;';
1673
  endif;
1674
 
1675
+ return $out;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1676
  }
1677
 
1678
  function edit_meta_value( $id ) {
1982
  extract(shortcode_atts(array(
1983
  'template' => 0,
1984
  'format' => '',
1985
+ 'search_label' => __('Search &raquo;', 'custom-field-template'),
1986
+ 'button' => true
1987
  ), $attr));
1988
 
1989
 
2005
  if($val[0]['searchOperator']) eval('$search["operator"] =' . stripslashes($val[0]['searchOperator']));
2006
  if($val[0]['searchValueLabel']) eval('$search["valueLabel"] =' . stripslashes($val[0]['searchValueLabel']));
2007
  if($val[0]['searchDefault']) eval('$search["default"] =' . stripslashes($val[0]['searchDefault']));
2008
+ if($val[0]['searchClass']) eval('$search["class"] =' . stripslashes($val[0]['searchClass']));
2009
 
2010
  foreach ( $search as $skey => $sval ) :
2011
  $j = 1;
2053
  if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][urlencode($key)][$rkey] )
2054
  $checked = ' checked="checked"';
2055
 
2056
+ $replace_val[$rkey] .= '<li><label><input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metavalue) . '"' . $class . $checked . ' /> ';
2057
  if ( $valueLabels[$j] ) $replace_val[$rkey] .= stripcslashes($valueLabels[$j]);
2058
  else $replace_val[$rkey] .= stripcslashes($metavalue);
2059
+ $replace_val[$rkey] .= '</label></li>';
2060
  $j++;
2061
  endforeach;
2062
  $replace_val[$rkey] .= '</ul>';
2063
  else :
2064
+ $replace_val[$rkey] .= '<label><input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape(trim($values[0])) . '"' . $class . ' /> ';
2065
  if ( $valueLabel[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[0]));
2066
  else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
2067
+ $replace_val[$rkey] .= '</label>';
2068
  endif;
2069
  break;
2070
  case 'radio':
2086
  endif;
2087
  if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][urlencode($key)][$rkey] )
2088
  $checked = ' checked="checked"';
2089
+ $replace_val[$rkey] .= '<li><label><input type="radio" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metavalue) . '"' . $class . $checked . ' /> ';
2090
  if ( $valueLabels[$j] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[$j]));
2091
  else $replace_val[$rkey] .= stripcslashes($metavalue);
2092
+ $replace_val[$rkey] .= '</label></li>';
2093
  $j++;
2094
  endforeach;
2095
  $replace_val[$rkey] .= '</ul>';
2096
  else :
2097
+ $replace_val[$rkey] .= '<label><input type="radio" name="cftsearch[' . urlencode($key) . '][]" value="' . attribute_escape(trim($values[0])) . '"' . $class . ' /> ';
2098
  if ( $valueLabels[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[0]));
2099
  else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
2100
+ $replace_val[$rkey] .= '</label>';
2101
  endif;
2102
  break;
2103
  case 'select':
2137
  endfor;
2138
  endif;
2139
 
2140
+ if ( $button === true )
2141
+ $output .= '<p><input type="submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
2142
  $output .= '<input type="hidden" name="cftsearch_submit" value="1" /></p>' . "\n";
2143
  $output .= '</form>' . "\n";
2144
  else :
2165
  break;
2166
  case 'checkbox':
2167
  if ( $val2['class'] ) $class = ' class="' . $val2['class'] . '"';
2168
+ $output .= '<dd><label><input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($val2['value']) . '"' . $class . ' /> ';
2169
  if ( $val2['valueLabel'] )
2170
  $output .= stripcslashes($val2['valueLabel']);
2171
  else
2172
  $output .= stripcslashes($val2['value']);
2173
+ $output .= '</label></dd>' . "\n";
2174
  break;
2175
  case 'radio':
2176
  if ( $val2['class'] ) $class = ' class="' . $val2['class'] . '"';
2179
  $i=0;
2180
  foreach ( $values as $metaval ) :
2181
  $metaval = trim($metaval);
2182
+ $output .= '<dd><label>' . '<input type="radio" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metaval) . '"' . $class . ' /> ';
2183
  if ( $val2['valueLabel'] )
2184
  $output .= stripcslashes(trim($valueLabels[$i]));
2185
  else
2186
  $output .= stripcslashes($metaval);
2187
  $i++;
2188
+ $output .= '</label></dd>' . "\n";
2189
  endforeach;
2190
  break;
2191
  case 'select':
2214
  $output .= '</dl>' ."\n";
2215
  endif;
2216
  endforeach;
2217
+ if ( $button == true )
2218
+ $output .= '<p><input type="submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
2219
  $output .= '<input type="hidden" name="cftsearch_submit" value="1" /></p>' . "\n";
2220
  $output .= '</form>' . "\n";
2221
  endif;
2231
  $wp_query->is_page = '';
2232
  $wp_query->is_singular = '';
2233
 
2234
+ $original_where = $where;
2235
+
2236
  $where = '';
2237
 
2238
  $count = count($options['custom_fields']);
2282
  endforeach;
2283
  endif;
2284
 
2285
+ if ( is_array($_REQUEST['cftcategory_in']) ) :
2286
+ $ids = get_objects_in_term($_REQUEST['cftcategory_in'], 'category');
2287
  if ( is_array($ids) && count($ids) > 0 ) :
2288
  $in_posts = "'" . implode("', '", $ids) . "'";
2289
  $where .= " AND ID IN (" . $in_posts . ")";
2290
  endif;
2291
  $where .= " AND " . $wpdb->posts . ".post_type = 'post'";
2292
  endif;
2293
+ if ( is_array($_REQUEST['cftcategory_not_in']) ) :
2294
+ $ids = get_objects_in_term($_REQUEST['cftcategory_not_in'], 'category');
2295
+ if ( is_array($ids) && count($ids) > 0 ) :
2296
+ $in_posts = "'" . implode("', '", $ids) . "'";
2297
+ $where .= " AND ID NOT IN (" . $in_posts . ")";
2298
+ endif;
2299
+ endif;
2300
 
2301
+ $where .= " AND `".$wpdb->posts."`.post_status = 'publish'";
2302
+ if ( $_REQUEST['s'] ) $where .= $original_where;
2303
+
2304
  return $where;
2305
  }
2306
 
2314
  }
2315
 
2316
  function custom_field_template_posts_orderby($sql) {
2317
+ global $wpdb;
2318
+
2319
+ if ( empty($_REQUEST['order']) || ((strtoupper($_REQUEST['order']) != 'ASC') && (strtoupper($_REQUEST['order']) != 'DESC')) )
2320
+ $_REQUEST['order'] = 'DESC';
2321
+
2322
+ if ( $_REQUEST['orderby'] ) :
2323
+ if ( in_array($_REQUEST['orderby'], array('post_author', 'post_date', 'post_title', 'post_modified', 'menu_order', 'post_parent', 'ID')) ):
2324
+ $sql = "`".$wpdb->posts."`.".$_REQUEST['orderby']." ".$_REQUEST['order'];
2325
+ elseif ( $_REQUEST['orderby']=='rand' ):
2326
+ $sql = "RAND()";
2327
+ else:
2328
+ $sql = " meta.meta_value " . $_REQUEST['order'];
2329
+ endif;
2330
  return $sql;
2331
  endif;
2332
+
2333
+ $sql = "`".$wpdb->posts."`.post_date ".$_REQUEST['order'];
2334
+ return $sql;
2335
  }
2336
 
2337
  function EvalBuffer($string) {
custom-field-template.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-03-09 18:34+0900\n"
6
- "PO-Revision-Date: 2009-03-09 18:34+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -13,329 +13,346 @@ msgstr ""
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: custom-field-template\n"
15
 
16
- #: custom-field-template/custom-field-template.php:101
17
- #: custom-field-template/custom-field-template.php:102
18
- #: custom-field-template/custom-field-template.php:432
19
- #: custom-field-template/custom-field-template.php:555
20
- #: custom-field-template/custom-field-template.php:1333
21
- #: custom-field-template/custom-field-template.php:1453
22
  msgid "Custom Field Template"
23
  msgstr ""
24
 
25
- #: custom-field-template/custom-field-template.php:141
26
- #: custom-field-template/custom-field-template.php:1503
27
  msgid "Load"
28
  msgstr ""
29
 
30
- #: custom-field-template/custom-field-template.php:290
31
  msgid "read more"
32
  msgstr ""
33
 
34
- #: custom-field-template/custom-field-template.php:308
35
- #: custom-field-template/custom-field-template.php:318
36
  msgid "Custom Fields"
37
  msgstr ""
38
 
39
- #: custom-field-template/custom-field-template.php:348
40
  msgid "Settings"
41
  msgstr ""
42
 
43
- #: custom-field-template/custom-field-template.php:360
44
  msgid "Default Template"
45
  msgstr ""
46
 
47
- #: custom-field-template/custom-field-template.php:496
48
- #: custom-field-template/custom-field-template.php:500
49
- #: custom-field-template/custom-field-template.php:512
50
- #: custom-field-template/custom-field-template.php:520
51
- #: custom-field-template/custom-field-template.php:534
52
  msgid "Options updated."
53
  msgstr ""
54
 
55
- #: custom-field-template/custom-field-template.php:538
56
  msgid "Value Counts rebuilt."
57
  msgstr ""
58
 
59
- #: custom-field-template/custom-field-template.php:543
60
  msgid "Options resetted."
61
  msgstr ""
62
 
63
- #: custom-field-template/custom-field-template.php:547
64
  msgid "Options deleted."
65
  msgstr ""
66
 
67
- #: custom-field-template/custom-field-template.php:561
68
- #: custom-field-template/custom-field-template.php:638
69
- #: custom-field-template/custom-field-template.php:657
70
- #: custom-field-template/custom-field-template.php:686
71
- #: custom-field-template/custom-field-template.php:717
72
- #: custom-field-template/custom-field-template.php:750
73
- #: custom-field-template/custom-field-template.php:770
74
- #: custom-field-template/custom-field-template.php:866
75
- #: custom-field-template/custom-field-template.php:882
76
- #: custom-field-template/custom-field-template.php:898
77
  msgid "Click to toggle"
78
  msgstr ""
79
 
80
- #: custom-field-template/custom-field-template.php:562
81
  msgid "Custom Field Template Options"
82
  msgstr ""
83
 
84
- #: custom-field-template/custom-field-template.php:572
85
  msgid "Template Title"
86
  msgstr ""
87
 
88
- #: custom-field-template/custom-field-template.php:574
89
  msgid "Template Instruction"
90
  msgstr ""
91
 
92
- #: custom-field-template/custom-field-template.php:576
 
93
  msgid "Post Type"
94
  msgstr ""
95
 
96
- #: custom-field-template/custom-field-template.php:578
 
97
  msgid "Both"
98
  msgstr ""
99
 
100
- #: custom-field-template/custom-field-template.php:579
 
101
  msgid "Post"
102
  msgstr ""
103
 
104
- #: custom-field-template/custom-field-template.php:580
 
105
  msgid "Page"
106
  msgstr ""
107
 
108
- #: custom-field-template/custom-field-template.php:581
109
- #: custom-field-template/custom-field-template.php:732
110
  msgid "Category ID (comma-deliminated)"
111
  msgstr ""
112
 
113
- #: custom-field-template/custom-field-template.php:583
114
  msgid "Template Content"
115
  msgstr ""
116
 
117
- #: custom-field-template/custom-field-template.php:590
118
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
119
  msgstr ""
120
 
121
- #: custom-field-template/custom-field-template.php:591
122
  msgid "Use multiple image inset"
123
  msgstr ""
124
 
125
- #: custom-field-template/custom-field-template.php:591
126
  msgid "Caution:"
127
  msgstr ""
128
 
129
- #: custom-field-template/custom-field-template.php:591
130
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
131
  msgstr ""
132
 
133
- #: custom-field-template/custom-field-template.php:595
134
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
135
  msgstr ""
136
 
137
- #: custom-field-template/custom-field-template.php:596
138
  msgid "Use labels in place of custom keys"
139
  msgstr ""
140
 
141
- #: custom-field-template/custom-field-template.php:599
142
  msgid "In case that you would like to add p and br tags in textareas automatically"
143
  msgstr ""
144
 
145
- #: custom-field-template/custom-field-template.php:600
146
  msgid "Use wpautop function"
147
  msgstr ""
148
 
149
- #: custom-field-template/custom-field-template.php:604
150
  msgid "In case that you would like to save values automatically in switching templates"
151
  msgstr ""
152
 
153
- #: custom-field-template/custom-field-template.php:605
154
  msgid "Use the auto save in switching templates"
155
  msgstr ""
156
 
157
- #: custom-field-template/custom-field-template.php:609
158
  msgid "In case that you would like to forbid to use the default custom fields."
159
  msgstr ""
160
 
161
- #: custom-field-template/custom-field-template.php:610
162
  msgid "Disable the default custom fields"
163
  msgstr ""
164
 
165
- #: custom-field-template/custom-field-template.php:614
166
  msgid "In case that you would like to forbid to use the quick edit."
167
  msgstr ""
168
 
169
- #: custom-field-template/custom-field-template.php:615
170
  msgid "Disable the quick edit"
171
  msgstr ""
172
 
173
- #: custom-field-template/custom-field-template.php:619
174
  msgid "In case that you would like to replace the box title with the template title."
175
  msgstr ""
176
 
177
- #: custom-field-template/custom-field-template.php:620
178
  msgid "Replace the box title"
179
  msgstr ""
180
 
181
- #: custom-field-template/custom-field-template.php:624
182
  msgid "In case that you would like to use the shortcode in the widget."
183
  msgstr ""
184
 
185
- #: custom-field-template/custom-field-template.php:625
186
  msgid "Use the shortcode in the widget"
187
  msgstr ""
188
 
189
- #: custom-field-template/custom-field-template.php:629
190
- #: custom-field-template/custom-field-template.php:648
191
- #: custom-field-template/custom-field-template.php:677
192
- #: custom-field-template/custom-field-template.php:708
193
- #: custom-field-template/custom-field-template.php:741
194
  msgid "Update Options &raquo;"
195
  msgstr ""
196
 
197
- #: custom-field-template/custom-field-template.php:639
198
  msgid "ADMIN CSS"
199
  msgstr ""
200
 
201
- #: custom-field-template/custom-field-template.php:658
202
  msgid "[cft] and [cftsearch] Shortcode Format"
203
  msgstr ""
204
 
205
- #: custom-field-template/custom-field-template.php:661
206
  msgid "For [cft], [key] will be converted into the value of [key]."
207
  msgstr ""
208
 
209
- #: custom-field-template/custom-field-template.php:662
210
  msgid "For [cftsearch], [key] will be converted into the input field."
211
  msgstr ""
212
 
213
- #: custom-field-template/custom-field-template.php:671
214
- #: custom-field-template/custom-field-template.php:735
215
  msgid "Use PHP"
216
  msgstr ""
217
 
218
- #: custom-field-template/custom-field-template.php:687
219
  msgid "PHP CODE (Experimental Option)"
220
  msgstr ""
221
 
222
- #: custom-field-template/custom-field-template.php:689
223
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
224
  msgstr ""
225
 
226
- #: custom-field-template/custom-field-template.php:690
227
  msgid "For `text` and `textarea`, you must set $value as an string."
228
  msgstr ""
229
 
230
- #: custom-field-template/custom-field-template.php:692
231
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
232
  msgstr ""
233
 
234
- #: custom-field-template/custom-field-template.php:718
235
  msgid "Auto Hook of `the_content()` (Experimental Option)"
236
  msgstr ""
237
 
238
- #: custom-field-template/custom-field-template.php:728
239
  msgid "Position"
240
  msgstr ""
241
 
242
- #: custom-field-template/custom-field-template.php:729
243
  msgid "Before the conetnt"
244
  msgstr ""
245
 
246
- #: custom-field-template/custom-field-template.php:730
247
  msgid "After the conetnt"
248
  msgstr ""
249
 
250
- #: custom-field-template/custom-field-template.php:734
 
 
 
 
 
251
  msgid "Content"
252
  msgstr ""
253
 
254
- #: custom-field-template/custom-field-template.php:751
255
  msgid "Rebuild Value Counts"
256
  msgstr ""
257
 
258
- #: custom-field-template/custom-field-template.php:753
259
  msgid "Are you sure to rebuild all value counts?"
260
  msgstr ""
261
 
262
- #: custom-field-template/custom-field-template.php:757
263
  msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
264
  msgstr ""
265
 
266
- #: custom-field-template/custom-field-template.php:761
267
  msgid "Rebuild Value Counts &raquo;"
268
  msgstr ""
269
 
270
- #: custom-field-template/custom-field-template.php:771
271
  msgid "Option List"
272
  msgstr ""
273
 
274
- #: custom-field-template/custom-field-template.php:867
275
  msgid "Reset Options"
276
  msgstr ""
277
 
278
- #: custom-field-template/custom-field-template.php:869
279
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
280
  msgstr ""
281
 
282
- #: custom-field-template/custom-field-template.php:873
283
  msgid "Unset Options &raquo;"
284
  msgstr ""
285
 
286
- #: custom-field-template/custom-field-template.php:883
287
  msgid "Delete Options"
288
  msgstr ""
289
 
290
- #: custom-field-template/custom-field-template.php:885
291
  msgid "Are you sure to delete options? Options you set will be deleted."
292
  msgstr ""
293
 
294
- #: custom-field-template/custom-field-template.php:889
295
  msgid "Delete Options &raquo;"
296
  msgstr ""
297
 
298
- #: custom-field-template/custom-field-template.php:899
299
  msgid "Donation"
300
  msgstr ""
301
 
302
- #: custom-field-template/custom-field-template.php:901
303
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
304
  msgstr ""
305
 
306
- #: custom-field-template/custom-field-template.php:1064
307
  msgid "Clear"
308
  msgstr ""
309
 
310
- #: custom-field-template/custom-field-template.php:1131
311
  msgid "Select"
312
  msgstr ""
313
 
314
- #: custom-field-template/custom-field-template.php:1189
315
  msgid "Add Media"
316
  msgstr ""
317
 
318
- #: custom-field-template/custom-field-template.php:1191
319
  msgid "Add an Image"
320
  msgstr ""
321
 
322
- #: custom-field-template/custom-field-template.php:1193
323
  msgid "Add Video"
324
  msgstr ""
325
 
326
- #: custom-field-template/custom-field-template.php:1195
327
  msgid "Add Audio"
328
  msgstr ""
329
 
330
- #: custom-field-template/custom-field-template.php:1206
331
  msgid "Toggle"
332
  msgstr ""
333
 
334
- #: custom-field-template/custom-field-template.php:1530
 
 
 
 
 
 
 
 
335
  msgid "Save"
336
  msgstr ""
337
 
338
- #: custom-field-template/custom-field-template.php:1837
339
  msgid "Search &raquo;"
340
  msgstr ""
341
 
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-03-23 00:05+0900\n"
6
+ "PO-Revision-Date: 2009-03-23 00:05+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: custom-field-template\n"
15
 
16
+ #: custom-field-template/custom-field-template.php:107
17
+ #: custom-field-template/custom-field-template.php:108
18
+ #: custom-field-template/custom-field-template.php:438
19
+ #: custom-field-template/custom-field-template.php:607
20
+ #: custom-field-template/custom-field-template.php:1443
21
+ #: custom-field-template/custom-field-template.php:1563
22
  msgid "Custom Field Template"
23
  msgstr ""
24
 
25
+ #: custom-field-template/custom-field-template.php:147
26
+ #: custom-field-template/custom-field-template.php:1655
27
  msgid "Load"
28
  msgstr ""
29
 
30
+ #: custom-field-template/custom-field-template.php:296
31
  msgid "read more"
32
  msgstr ""
33
 
34
+ #: custom-field-template/custom-field-template.php:314
35
+ #: custom-field-template/custom-field-template.php:324
36
  msgid "Custom Fields"
37
  msgstr ""
38
 
39
+ #: custom-field-template/custom-field-template.php:354
40
  msgid "Settings"
41
  msgstr ""
42
 
43
+ #: custom-field-template/custom-field-template.php:366
44
  msgid "Default Template"
45
  msgstr ""
46
 
47
+ #: custom-field-template/custom-field-template.php:547
48
+ #: custom-field-template/custom-field-template.php:551
49
+ #: custom-field-template/custom-field-template.php:563
50
+ #: custom-field-template/custom-field-template.php:571
51
+ #: custom-field-template/custom-field-template.php:586
52
  msgid "Options updated."
53
  msgstr ""
54
 
55
+ #: custom-field-template/custom-field-template.php:590
56
  msgid "Value Counts rebuilt."
57
  msgstr ""
58
 
59
+ #: custom-field-template/custom-field-template.php:595
60
  msgid "Options resetted."
61
  msgstr ""
62
 
63
+ #: custom-field-template/custom-field-template.php:599
64
  msgid "Options deleted."
65
  msgstr ""
66
 
67
+ #: custom-field-template/custom-field-template.php:613
68
+ #: custom-field-template/custom-field-template.php:690
69
+ #: custom-field-template/custom-field-template.php:709
70
+ #: custom-field-template/custom-field-template.php:738
71
+ #: custom-field-template/custom-field-template.php:769
72
+ #: custom-field-template/custom-field-template.php:807
73
+ #: custom-field-template/custom-field-template.php:827
74
+ #: custom-field-template/custom-field-template.php:926
75
+ #: custom-field-template/custom-field-template.php:942
76
+ #: custom-field-template/custom-field-template.php:958
77
  msgid "Click to toggle"
78
  msgstr ""
79
 
80
+ #: custom-field-template/custom-field-template.php:614
81
  msgid "Custom Field Template Options"
82
  msgstr ""
83
 
84
+ #: custom-field-template/custom-field-template.php:624
85
  msgid "Template Title"
86
  msgstr ""
87
 
88
+ #: custom-field-template/custom-field-template.php:626
89
  msgid "Template Instruction"
90
  msgstr ""
91
 
92
+ #: custom-field-template/custom-field-template.php:628
93
+ #: custom-field-template/custom-field-template.php:785
94
  msgid "Post Type"
95
  msgstr ""
96
 
97
+ #: custom-field-template/custom-field-template.php:630
98
+ #: custom-field-template/custom-field-template.php:786
99
  msgid "Both"
100
  msgstr ""
101
 
102
+ #: custom-field-template/custom-field-template.php:631
103
+ #: custom-field-template/custom-field-template.php:787
104
  msgid "Post"
105
  msgstr ""
106
 
107
+ #: custom-field-template/custom-field-template.php:632
108
+ #: custom-field-template/custom-field-template.php:788
109
  msgid "Page"
110
  msgstr ""
111
 
112
+ #: custom-field-template/custom-field-template.php:633
113
+ #: custom-field-template/custom-field-template.php:789
114
  msgid "Category ID (comma-deliminated)"
115
  msgstr ""
116
 
117
+ #: custom-field-template/custom-field-template.php:635
118
  msgid "Template Content"
119
  msgstr ""
120
 
121
+ #: custom-field-template/custom-field-template.php:642
122
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
123
  msgstr ""
124
 
125
+ #: custom-field-template/custom-field-template.php:643
126
  msgid "Use multiple image inset"
127
  msgstr ""
128
 
129
+ #: custom-field-template/custom-field-template.php:643
130
  msgid "Caution:"
131
  msgstr ""
132
 
133
+ #: custom-field-template/custom-field-template.php:643
134
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
135
  msgstr ""
136
 
137
+ #: custom-field-template/custom-field-template.php:647
138
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
139
  msgstr ""
140
 
141
+ #: custom-field-template/custom-field-template.php:648
142
  msgid "Use labels in place of custom keys"
143
  msgstr ""
144
 
145
+ #: custom-field-template/custom-field-template.php:651
146
  msgid "In case that you would like to add p and br tags in textareas automatically"
147
  msgstr ""
148
 
149
+ #: custom-field-template/custom-field-template.php:652
150
  msgid "Use wpautop function"
151
  msgstr ""
152
 
153
+ #: custom-field-template/custom-field-template.php:656
154
  msgid "In case that you would like to save values automatically in switching templates"
155
  msgstr ""
156
 
157
+ #: custom-field-template/custom-field-template.php:657
158
  msgid "Use the auto save in switching templates"
159
  msgstr ""
160
 
161
+ #: custom-field-template/custom-field-template.php:661
162
  msgid "In case that you would like to forbid to use the default custom fields."
163
  msgstr ""
164
 
165
+ #: custom-field-template/custom-field-template.php:662
166
  msgid "Disable the default custom fields"
167
  msgstr ""
168
 
169
+ #: custom-field-template/custom-field-template.php:666
170
  msgid "In case that you would like to forbid to use the quick edit."
171
  msgstr ""
172
 
173
+ #: custom-field-template/custom-field-template.php:667
174
  msgid "Disable the quick edit"
175
  msgstr ""
176
 
177
+ #: custom-field-template/custom-field-template.php:671
178
  msgid "In case that you would like to replace the box title with the template title."
179
  msgstr ""
180
 
181
+ #: custom-field-template/custom-field-template.php:672
182
  msgid "Replace the box title"
183
  msgstr ""
184
 
185
+ #: custom-field-template/custom-field-template.php:676
186
  msgid "In case that you would like to use the shortcode in the widget."
187
  msgstr ""
188
 
189
+ #: custom-field-template/custom-field-template.php:677
190
  msgid "Use the shortcode in the widget"
191
  msgstr ""
192
 
193
+ #: custom-field-template/custom-field-template.php:681
194
+ #: custom-field-template/custom-field-template.php:700
195
+ #: custom-field-template/custom-field-template.php:729
196
+ #: custom-field-template/custom-field-template.php:760
197
+ #: custom-field-template/custom-field-template.php:798
198
  msgid "Update Options &raquo;"
199
  msgstr ""
200
 
201
+ #: custom-field-template/custom-field-template.php:691
202
  msgid "ADMIN CSS"
203
  msgstr ""
204
 
205
+ #: custom-field-template/custom-field-template.php:710
206
  msgid "[cft] and [cftsearch] Shortcode Format"
207
  msgstr ""
208
 
209
+ #: custom-field-template/custom-field-template.php:713
210
  msgid "For [cft], [key] will be converted into the value of [key]."
211
  msgstr ""
212
 
213
+ #: custom-field-template/custom-field-template.php:714
214
  msgid "For [cftsearch], [key] will be converted into the input field."
215
  msgstr ""
216
 
217
+ #: custom-field-template/custom-field-template.php:723
218
+ #: custom-field-template/custom-field-template.php:792
219
  msgid "Use PHP"
220
  msgstr ""
221
 
222
+ #: custom-field-template/custom-field-template.php:739
223
  msgid "PHP CODE (Experimental Option)"
224
  msgstr ""
225
 
226
+ #: custom-field-template/custom-field-template.php:741
227
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
228
  msgstr ""
229
 
230
+ #: custom-field-template/custom-field-template.php:742
231
  msgid "For `text` and `textarea`, you must set $value as an string."
232
  msgstr ""
233
 
234
+ #: custom-field-template/custom-field-template.php:744
235
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
236
  msgstr ""
237
 
238
+ #: custom-field-template/custom-field-template.php:770
239
  msgid "Auto Hook of `the_content()` (Experimental Option)"
240
  msgstr ""
241
 
242
+ #: custom-field-template/custom-field-template.php:780
243
  msgid "Position"
244
  msgstr ""
245
 
246
+ #: custom-field-template/custom-field-template.php:781
247
  msgid "Before the conetnt"
248
  msgstr ""
249
 
250
+ #: custom-field-template/custom-field-template.php:782
251
  msgid "After the conetnt"
252
  msgstr ""
253
 
254
+ #: custom-field-template/custom-field-template.php:783
255
+ #, php-format
256
+ msgid "Inside the conetnt ([cfthook hook=%d])"
257
+ msgstr ""
258
+
259
+ #: custom-field-template/custom-field-template.php:791
260
  msgid "Content"
261
  msgstr ""
262
 
263
+ #: custom-field-template/custom-field-template.php:808
264
  msgid "Rebuild Value Counts"
265
  msgstr ""
266
 
267
+ #: custom-field-template/custom-field-template.php:810
268
  msgid "Are you sure to rebuild all value counts?"
269
  msgstr ""
270
 
271
+ #: custom-field-template/custom-field-template.php:814
272
  msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
273
  msgstr ""
274
 
275
+ #: custom-field-template/custom-field-template.php:818
276
  msgid "Rebuild Value Counts &raquo;"
277
  msgstr ""
278
 
279
+ #: custom-field-template/custom-field-template.php:828
280
  msgid "Option List"
281
  msgstr ""
282
 
283
+ #: custom-field-template/custom-field-template.php:927
284
  msgid "Reset Options"
285
  msgstr ""
286
 
287
+ #: custom-field-template/custom-field-template.php:929
288
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
289
  msgstr ""
290
 
291
+ #: custom-field-template/custom-field-template.php:933
292
  msgid "Unset Options &raquo;"
293
  msgstr ""
294
 
295
+ #: custom-field-template/custom-field-template.php:943
296
  msgid "Delete Options"
297
  msgstr ""
298
 
299
+ #: custom-field-template/custom-field-template.php:945
300
  msgid "Are you sure to delete options? Options you set will be deleted."
301
  msgstr ""
302
 
303
+ #: custom-field-template/custom-field-template.php:949
304
  msgid "Delete Options &raquo;"
305
  msgstr ""
306
 
307
+ #: custom-field-template/custom-field-template.php:959
308
  msgid "Donation"
309
  msgstr ""
310
 
311
+ #: custom-field-template/custom-field-template.php:961
312
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
313
  msgstr ""
314
 
315
+ #: custom-field-template/custom-field-template.php:1150
316
  msgid "Clear"
317
  msgstr ""
318
 
319
+ #: custom-field-template/custom-field-template.php:1225
320
  msgid "Select"
321
  msgstr ""
322
 
323
+ #: custom-field-template/custom-field-template.php:1284
324
  msgid "Add Media"
325
  msgstr ""
326
 
327
+ #: custom-field-template/custom-field-template.php:1286
328
  msgid "Add an Image"
329
  msgstr ""
330
 
331
+ #: custom-field-template/custom-field-template.php:1288
332
  msgid "Add Video"
333
  msgstr ""
334
 
335
+ #: custom-field-template/custom-field-template.php:1290
336
  msgid "Add Audio"
337
  msgstr ""
338
 
339
+ #: custom-field-template/custom-field-template.php:1301
340
  msgid "Toggle"
341
  msgstr ""
342
 
343
+ #: custom-field-template/custom-field-template.php:1604
344
+ msgid "Initialize"
345
+ msgstr ""
346
+
347
+ #: custom-field-template/custom-field-template.php:1605
348
+ msgid "Are you sure to reset current values? Default values will be loaded."
349
+ msgstr ""
350
+
351
+ #: custom-field-template/custom-field-template.php:1608
352
  msgid "Save"
353
  msgstr ""
354
 
355
+ #: custom-field-template/custom-field-template.php:1985
356
  msgid "Search &raquo;"
357
  msgstr ""
358
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpressgogo.com/development/custom-field-template.html
4
  Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
5
  Requires at least: 2.1
6
  Tested up to: 2.7.1
7
- Stable tag: 1.1
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -46,6 +46,7 @@ The Custom Field Template plugin adds the default custom fields on the Write Pos
46
  * Adds the value count option.
47
  * Adds the option to use the shortcode in the widhet.
48
  * Adds the attributes of JavaScript Event Handlers. (`onclick = alert('ok');`)
 
49
 
50
  Localization
51
 
4
  Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
5
  Requires at least: 2.1
6
  Tested up to: 2.7.1
7
+ Stable tag: 1.1.1
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
46
  * Adds the value count option.
47
  * Adds the option to use the shortcode in the widhet.
48
  * Adds the attributes of JavaScript Event Handlers. (`onclick = alert('ok');`)
49
+ * Adds the Initialize button.
50
 
51
  Localization
52