Custom Field Template - Version 1.0.3

Version Description

Download this release

Release Info

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

Code changes from version 1.0.2 to 1.0.3

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-01-29 01:52+0900\n"
6
- "PO-Revision-Date: 2009-01-29 01:52+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -16,245 +16,267 @@ msgstr ""
16
  "X-Poedit-Basepath: ../\n"
17
  "X-Poedit-SearchPath-0: custom-field-template\n"
18
 
19
- #: custom-field-template/custom-field-template.php:88
20
- #: custom-field-template/custom-field-template.php:89
21
- #: custom-field-template/custom-field-template.php:414
22
- #: custom-field-template/custom-field-template.php:521
23
- #: custom-field-template/custom-field-template.php:1209
24
  msgid "Custom Field Template"
25
  msgstr "カスタムフィールドテンプレート"
26
 
27
- #: custom-field-template/custom-field-template.php:272
 
 
 
 
 
28
  msgid "read more"
29
  msgstr "続きを表示"
30
 
31
- #: custom-field-template/custom-field-template.php:290
32
- #: custom-field-template/custom-field-template.php:300
33
  msgid "Custom Fields"
34
  msgstr "カスタムフィールド"
35
 
36
- #: custom-field-template/custom-field-template.php:330
37
  msgid "Settings"
38
  msgstr "設定"
39
 
40
- #: custom-field-template/custom-field-template.php:342
41
  msgid "Default Template"
42
  msgstr "デフォルトテンプレート"
43
 
44
- #: custom-field-template/custom-field-template.php:471
45
- #: custom-field-template/custom-field-template.php:475
46
- #: custom-field-template/custom-field-template.php:483
47
- #: custom-field-template/custom-field-template.php:491
48
- #: custom-field-template/custom-field-template.php:504
49
  msgid "Options updated."
50
  msgstr "オプションは更新されました。"
51
 
52
- #: custom-field-template/custom-field-template.php:509
53
  msgid "Options resetted."
54
  msgstr "オプションはリセットされました。"
55
 
56
- #: custom-field-template/custom-field-template.php:513
57
  msgid "Options deleted."
58
  msgstr "オプションは削除されました。"
59
 
60
- #: custom-field-template/custom-field-template.php:527
 
 
 
 
 
 
 
 
 
 
 
 
61
  msgid "Custom Field Template Options"
62
  msgstr "カスタムフィールドテンプレートオプション"
63
 
64
- #: custom-field-template/custom-field-template.php:537
65
  msgid "Template Title"
66
  msgstr "テンプレートタイトル"
67
 
68
- #: custom-field-template/custom-field-template.php:539
69
  msgid "Template Instruction"
70
  msgstr "テンプレートインストラクション"
71
 
72
- #: custom-field-template/custom-field-template.php:541
73
- #: custom-field-template/custom-field-template.php:671
74
  msgid "Category ID (comma-deliminated)"
75
  msgstr "カテゴリーID(カンマ区切り)"
76
 
77
- #: custom-field-template/custom-field-template.php:543
78
  msgid "Template Content"
79
  msgstr "テンプレートコンテンツ"
80
 
81
- #: custom-field-template/custom-field-template.php:550
82
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
83
  msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
84
 
85
- #: custom-field-template/custom-field-template.php:551
86
  msgid "Use multiple image inset"
87
  msgstr "複数画像挿入を利用する"
88
 
89
- #: custom-field-template/custom-field-template.php:551
90
  msgid "Caution:"
91
  msgstr "ご注意:"
92
 
93
- #: custom-field-template/custom-field-template.php:551
94
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
95
  msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
96
 
97
- #: custom-field-template/custom-field-template.php:555
98
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
99
  msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
100
 
101
- #: custom-field-template/custom-field-template.php:556
102
  msgid "Use labels in place of custom keys"
103
  msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
104
 
105
- #: custom-field-template/custom-field-template.php:559
106
  msgid "In case that you would like to add p and br tags in textareas automatically"
107
  msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
108
 
109
- #: custom-field-template/custom-field-template.php:560
110
  msgid "Use wpautop function"
111
  msgstr "wpautop関数を使用する"
112
 
113
- #: custom-field-template/custom-field-template.php:564
114
  msgid "In case that you would like to save values automatically in switching templates"
115
  msgstr "テンプレート切替時自動で保存したい場合"
116
 
117
- #: custom-field-template/custom-field-template.php:565
118
  msgid "Use the auto save in switching templates"
119
  msgstr "テンプレート切替時の自動保存を使用する"
120
 
121
- #: custom-field-template/custom-field-template.php:569
122
  #: custom-field-template/custom-field-template.php:588
123
- #: custom-field-template/custom-field-template.php:616
124
- #: custom-field-template/custom-field-template.php:647
125
- #: custom-field-template/custom-field-template.php:679
 
 
 
 
 
 
 
 
 
126
  msgid "Update Options »"
127
  msgstr "オプションを更新する »"
128
 
129
- #: custom-field-template/custom-field-template.php:578
130
- #: custom-field-template/custom-field-template.php:597
131
- #: custom-field-template/custom-field-template.php:625
132
- #: custom-field-template/custom-field-template.php:656
133
- #: custom-field-template/custom-field-template.php:688
134
- #: custom-field-template/custom-field-template.php:775
135
- #: custom-field-template/custom-field-template.php:791
136
- #: custom-field-template/custom-field-template.php:807
137
- msgid "Click to toggle"
138
- msgstr "クリックで切替"
139
-
140
- #: custom-field-template/custom-field-template.php:579
141
  msgid "ADMIN CSS"
142
- msgstr ""
143
 
144
- #: custom-field-template/custom-field-template.php:598
145
  msgid "[cft] and [cftsearch] Shortcode Format"
146
  msgstr "[cft] and [cftsearch] Shortcode Format"
147
 
148
- #: custom-field-template/custom-field-template.php:601
149
  msgid "For [cft], [key] will be converted into the value of [key]."
150
  msgstr "[cft]では、[key]は、[key]の値に置換されます。"
151
 
152
- #: custom-field-template/custom-field-template.php:602
153
  msgid "For [cftsearch], [key] will be converted into the input field."
154
  msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
155
 
156
- #: custom-field-template/custom-field-template.php:626
 
 
 
 
 
157
  msgid "PHP CODE (Experimental Option)"
158
  msgstr "PHP CODE (Experimental Option)"
159
 
160
- #: custom-field-template/custom-field-template.php:628
161
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
162
  msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
163
 
164
- #: custom-field-template/custom-field-template.php:629
165
  msgid "For `text` and `textarea`, you must set $value as an string."
166
  msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
167
 
168
- #: custom-field-template/custom-field-template.php:631
169
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
170
  msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
171
 
172
- #: custom-field-template/custom-field-template.php:657
173
  msgid "Auto Hook of `the_content()` (Experimental Option)"
174
  msgstr "Auto Hook of `the_content()` (Experimental Option)"
175
 
176
- #: custom-field-template/custom-field-template.php:667
177
  msgid "Position"
178
  msgstr "位置"
179
 
180
- #: custom-field-template/custom-field-template.php:668
181
  msgid "Before the conetnt"
182
  msgstr "コンテンツの前"
183
 
184
- #: custom-field-template/custom-field-template.php:669
185
  msgid "After the conetnt"
186
  msgstr "コンテンツの後"
187
 
188
- #: custom-field-template/custom-field-template.php:673
189
  msgid "Content"
190
  msgstr "コンテンツ"
191
 
192
- #: custom-field-template/custom-field-template.php:689
193
  msgid "Option List"
194
  msgstr "オプションリスト"
195
 
196
- #: custom-field-template/custom-field-template.php:776
197
  msgid "Reset Options"
198
  msgstr "オプションをリセットする"
199
 
200
- #: custom-field-template/custom-field-template.php:778
201
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
202
  msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
203
 
204
- #: custom-field-template/custom-field-template.php:782
205
  msgid "Unset Options »"
206
  msgstr "オプションをリセットする »"
207
 
208
- #: custom-field-template/custom-field-template.php:792
209
  msgid "Delete Options"
210
  msgstr "オプションを削除する"
211
 
212
- #: custom-field-template/custom-field-template.php:794
213
  msgid "Are you sure to delete options? Options you set will be deleted."
214
  msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
215
 
216
- #: custom-field-template/custom-field-template.php:798
217
  msgid "Delete Options »"
218
  msgstr "オプションを削除する »"
219
 
220
- #: custom-field-template/custom-field-template.php:808
221
  msgid "Donation"
222
  msgstr "寄付"
223
 
224
- #: custom-field-template/custom-field-template.php:810
225
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
226
  msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
227
 
228
- #: custom-field-template/custom-field-template.php:973
229
  msgid "Clear"
230
  msgstr "解除"
231
 
232
- #: custom-field-template/custom-field-template.php:1095
 
 
 
 
233
  msgid "Add Media"
234
  msgstr ""
235
 
236
- #: custom-field-template/custom-field-template.php:1097
237
  msgid "Add an Image"
238
  msgstr ""
239
 
240
- #: custom-field-template/custom-field-template.php:1099
241
  msgid "Add Video"
242
  msgstr ""
243
 
244
- #: custom-field-template/custom-field-template.php:1101
245
  msgid "Add Audio"
246
  msgstr ""
247
 
248
- #: custom-field-template/custom-field-template.php:1112
249
  msgid "Toggle"
250
  msgstr "切り替え"
251
 
252
- #: custom-field-template/custom-field-template.php:1367
253
  msgid "Save"
254
  msgstr "保存"
255
 
256
- #: custom-field-template/custom-field-template.php:1754
257
- #: custom-field-template/custom-field-template.php:1823
258
  msgid "Search »"
259
  msgstr "検索 »"
260
 
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-02-02 15:57+0900\n"
6
+ "PO-Revision-Date: 2009-02-02 15:58+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:95
20
+ #: custom-field-template/custom-field-template.php:96
21
+ #: custom-field-template/custom-field-template.php:426
22
+ #: custom-field-template/custom-field-template.php:539
23
+ #: custom-field-template/custom-field-template.php:1248
24
  msgid "Custom Field Template"
25
  msgstr "カスタムフィールドテンプレート"
26
 
27
+ #: custom-field-template/custom-field-template.php:135
28
+ #: custom-field-template/custom-field-template.php:1399
29
+ msgid "Load"
30
+ msgstr "読込"
31
+
32
+ #: custom-field-template/custom-field-template.php:284
33
  msgid "read more"
34
  msgstr "続きを表示"
35
 
36
+ #: custom-field-template/custom-field-template.php:302
37
+ #: custom-field-template/custom-field-template.php:312
38
  msgid "Custom Fields"
39
  msgstr "カスタムフィールド"
40
 
41
+ #: custom-field-template/custom-field-template.php:342
42
  msgid "Settings"
43
  msgstr "設定"
44
 
45
+ #: custom-field-template/custom-field-template.php:354
46
  msgid "Default Template"
47
  msgstr "デフォルトテンプレート"
48
 
49
+ #: custom-field-template/custom-field-template.php:484
50
+ #: custom-field-template/custom-field-template.php:488
51
+ #: custom-field-template/custom-field-template.php:500
52
+ #: custom-field-template/custom-field-template.php:508
53
+ #: custom-field-template/custom-field-template.php:522
54
  msgid "Options updated."
55
  msgstr "オプションは更新されました。"
56
 
57
+ #: custom-field-template/custom-field-template.php:527
58
  msgid "Options resetted."
59
  msgstr "オプションはリセットされました。"
60
 
61
+ #: custom-field-template/custom-field-template.php:531
62
  msgid "Options deleted."
63
  msgstr "オプションは削除されました。"
64
 
65
+ #: custom-field-template/custom-field-template.php:545
66
+ #: custom-field-template/custom-field-template.php:602
67
+ #: custom-field-template/custom-field-template.php:621
68
+ #: custom-field-template/custom-field-template.php:650
69
+ #: custom-field-template/custom-field-template.php:681
70
+ #: custom-field-template/custom-field-template.php:714
71
+ #: custom-field-template/custom-field-template.php:804
72
+ #: custom-field-template/custom-field-template.php:820
73
+ #: custom-field-template/custom-field-template.php:836
74
+ msgid "Click to toggle"
75
+ msgstr "クリックで切替"
76
+
77
+ #: custom-field-template/custom-field-template.php:546
78
  msgid "Custom Field Template Options"
79
  msgstr "カスタムフィールドテンプレートオプション"
80
 
81
+ #: custom-field-template/custom-field-template.php:556
82
  msgid "Template Title"
83
  msgstr "テンプレートタイトル"
84
 
85
+ #: custom-field-template/custom-field-template.php:558
86
  msgid "Template Instruction"
87
  msgstr "テンプレートインストラクション"
88
 
89
+ #: custom-field-template/custom-field-template.php:560
90
+ #: custom-field-template/custom-field-template.php:696
91
  msgid "Category ID (comma-deliminated)"
92
  msgstr "カテゴリーID(カンマ区切り)"
93
 
94
+ #: custom-field-template/custom-field-template.php:562
95
  msgid "Template Content"
96
  msgstr "テンプレートコンテンツ"
97
 
98
+ #: custom-field-template/custom-field-template.php:569
99
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
100
  msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
101
 
102
+ #: custom-field-template/custom-field-template.php:570
103
  msgid "Use multiple image inset"
104
  msgstr "複数画像挿入を利用する"
105
 
106
+ #: custom-field-template/custom-field-template.php:570
107
  msgid "Caution:"
108
  msgstr "ご注意:"
109
 
110
+ #: custom-field-template/custom-field-template.php:570
111
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
112
  msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
113
 
114
+ #: custom-field-template/custom-field-template.php:574
115
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
116
  msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
117
 
118
+ #: custom-field-template/custom-field-template.php:575
119
  msgid "Use labels in place of custom keys"
120
  msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
121
 
122
+ #: custom-field-template/custom-field-template.php:578
123
  msgid "In case that you would like to add p and br tags in textareas automatically"
124
  msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
125
 
126
+ #: custom-field-template/custom-field-template.php:579
127
  msgid "Use wpautop function"
128
  msgstr "wpautop関数を使用する"
129
 
130
+ #: custom-field-template/custom-field-template.php:583
131
  msgid "In case that you would like to save values automatically in switching templates"
132
  msgstr "テンプレート切替時自動で保存したい場合"
133
 
134
+ #: custom-field-template/custom-field-template.php:584
135
  msgid "Use the auto save in switching templates"
136
  msgstr "テンプレート切替時の自動保存を使用する"
137
 
 
138
  #: custom-field-template/custom-field-template.php:588
139
+ msgid "In case that you would like to forbid to use the default custom fields."
140
+ msgstr "デフォルトのカスタムフィールドの使用を禁止する場合"
141
+
142
+ #: custom-field-template/custom-field-template.php:589
143
+ msgid "Disable the default custom fields"
144
+ msgstr "デフォルトのカスタムフィールドを無効にする"
145
+
146
+ #: custom-field-template/custom-field-template.php:593
147
+ #: custom-field-template/custom-field-template.php:612
148
+ #: custom-field-template/custom-field-template.php:641
149
+ #: custom-field-template/custom-field-template.php:672
150
+ #: custom-field-template/custom-field-template.php:705
151
  msgid "Update Options »"
152
  msgstr "オプションを更新する »"
153
 
154
+ #: custom-field-template/custom-field-template.php:603
 
 
 
 
 
 
 
 
 
 
 
155
  msgid "ADMIN CSS"
156
+ msgstr "ADMIN CSS"
157
 
158
+ #: custom-field-template/custom-field-template.php:622
159
  msgid "[cft] and [cftsearch] Shortcode Format"
160
  msgstr "[cft] and [cftsearch] Shortcode Format"
161
 
162
+ #: custom-field-template/custom-field-template.php:625
163
  msgid "For [cft], [key] will be converted into the value of [key]."
164
  msgstr "[cft]では、[key]は、[key]の値に置換されます。"
165
 
166
+ #: custom-field-template/custom-field-template.php:626
167
  msgid "For [cftsearch], [key] will be converted into the input field."
168
  msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
169
 
170
+ #: custom-field-template/custom-field-template.php:635
171
+ #: custom-field-template/custom-field-template.php:699
172
+ msgid "Use PHP"
173
+ msgstr "PHPを使用する"
174
+
175
+ #: custom-field-template/custom-field-template.php:651
176
  msgid "PHP CODE (Experimental Option)"
177
  msgstr "PHP CODE (Experimental Option)"
178
 
179
+ #: custom-field-template/custom-field-template.php:653
180
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
181
  msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
182
 
183
+ #: custom-field-template/custom-field-template.php:654
184
  msgid "For `text` and `textarea`, you must set $value as an string."
185
  msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
186
 
187
+ #: custom-field-template/custom-field-template.php:656
188
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
189
  msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
190
 
191
+ #: custom-field-template/custom-field-template.php:682
192
  msgid "Auto Hook of `the_content()` (Experimental Option)"
193
  msgstr "Auto Hook of `the_content()` (Experimental Option)"
194
 
195
+ #: custom-field-template/custom-field-template.php:692
196
  msgid "Position"
197
  msgstr "位置"
198
 
199
+ #: custom-field-template/custom-field-template.php:693
200
  msgid "Before the conetnt"
201
  msgstr "コンテンツの前"
202
 
203
+ #: custom-field-template/custom-field-template.php:694
204
  msgid "After the conetnt"
205
  msgstr "コンテンツの後"
206
 
207
+ #: custom-field-template/custom-field-template.php:698
208
  msgid "Content"
209
  msgstr "コンテンツ"
210
 
211
+ #: custom-field-template/custom-field-template.php:715
212
  msgid "Option List"
213
  msgstr "オプションリスト"
214
 
215
+ #: custom-field-template/custom-field-template.php:805
216
  msgid "Reset Options"
217
  msgstr "オプションをリセットする"
218
 
219
+ #: custom-field-template/custom-field-template.php:807
220
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
221
  msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
222
 
223
+ #: custom-field-template/custom-field-template.php:811
224
  msgid "Unset Options »"
225
  msgstr "オプションをリセットする »"
226
 
227
+ #: custom-field-template/custom-field-template.php:821
228
  msgid "Delete Options"
229
  msgstr "オプションを削除する"
230
 
231
+ #: custom-field-template/custom-field-template.php:823
232
  msgid "Are you sure to delete options? Options you set will be deleted."
233
  msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
234
 
235
+ #: custom-field-template/custom-field-template.php:827
236
  msgid "Delete Options »"
237
  msgstr "オプションを削除する »"
238
 
239
+ #: custom-field-template/custom-field-template.php:837
240
  msgid "Donation"
241
  msgstr "寄付"
242
 
243
+ #: custom-field-template/custom-field-template.php:839
244
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
245
  msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
246
 
247
+ #: custom-field-template/custom-field-template.php:1002
248
  msgid "Clear"
249
  msgstr "解除"
250
 
251
+ #: custom-field-template/custom-field-template.php:1069
252
+ msgid "Select"
253
+ msgstr "選択してください"
254
+
255
+ #: custom-field-template/custom-field-template.php:1128
256
  msgid "Add Media"
257
  msgstr ""
258
 
259
+ #: custom-field-template/custom-field-template.php:1130
260
  msgid "Add an Image"
261
  msgstr ""
262
 
263
+ #: custom-field-template/custom-field-template.php:1132
264
  msgid "Add Video"
265
  msgstr ""
266
 
267
+ #: custom-field-template/custom-field-template.php:1134
268
  msgid "Add Audio"
269
  msgstr ""
270
 
271
+ #: custom-field-template/custom-field-template.php:1145
272
  msgid "Toggle"
273
  msgstr "切り替え"
274
 
275
+ #: custom-field-template/custom-field-template.php:1422
276
  msgid "Save"
277
  msgstr "保存"
278
 
279
+ #: custom-field-template/custom-field-template.php:1700
 
280
  msgid "Search »"
281
  msgstr "検索 »"
282
 
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.0.2
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
@@ -30,7 +30,7 @@ class custom_field_template {
30
 
31
  add_filter( 'the_content', array(&$this, 'custom_field_template_the_content') );
32
 
33
- if ( $_REQUEST['cftsearch'] ) :
34
  add_filter( 'posts_where', array(&$this, 'custom_field_template_posts_where') );
35
  endif;
36
 
@@ -42,6 +42,7 @@ class custom_field_template {
42
 
43
  function custom_field_template_init() {
44
  global $wp_version;
 
45
 
46
  if ( function_exists('load_plugin_textdomain') ) {
47
  if ( !defined('WP_PLUGIN_DIR') ) {
@@ -51,15 +52,19 @@ class custom_field_template {
51
  }
52
  }
53
 
54
- if ( is_user_logged_in() && isset($_REQUEST['post']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajax' ) {
55
  if ( $_REQUEST['post'] > 0 )
56
  $this->edit_meta_value( $_REQUEST['post'] );
57
  exit();
58
  }
59
 
60
 
61
- if ( is_user_logged_in() && isset($_REQUEST['id']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' ) {
62
- echo $this->load_custom_field( $_REQUEST['id'] );
 
 
 
 
63
  exit();
64
  }
65
 
@@ -87,6 +92,10 @@ class custom_field_template {
87
  require_once(ABSPATH . 'wp-admin/includes/template.php');
88
  add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'post', 'normal', 'core');
89
  add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'page', 'normal', 'core');
 
 
 
 
90
  }
91
 
92
  }
@@ -113,7 +122,7 @@ class custom_field_template {
113
  '</style>';
114
 
115
  if ( count($options['custom_fields'])>1 ) {
116
- $out .= '<select id="custom_field_template_select" onchange="jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&id=\'+jQuery(this).val()+\'&post=\'+jQuery(this).parent().parent().parent().parent().attr(\'id\').replace(\'edit-\',\'\'), success: function(html) {jQuery(\'#cft\').html(html);}});">';
117
  for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
118
  if ( $i == $options['posts'][$_REQUEST['post']] ) {
119
  $out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
@@ -121,6 +130,7 @@ class custom_field_template {
121
  $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
122
  }
123
  $out .= '</select>';
 
124
  }
125
 
126
  $out .= '<input type="hidden" name="custom-field-template-verify-key" id="custom-field-template-verify-key" value="' . wp_create_nonce('custom-field-template') . '" />';
@@ -209,7 +219,7 @@ class custom_field_template {
209
 
210
  jQuery('.editinline').click(function () {post_id = jQuery(this).parent().parent().parent().parent().attr('id').replace('post-',''); inlineEditPost.cft_load(post_id);});
211
  inlineEditPost.cft_load = function (post_id) {
212
- jQuery.ajax({type: 'GET', url: '?page=custom-field-template/custom-field-template.php&id=0&post='+post_id, success: function(html) {jQuery('#cft').html(html);}});
213
  };
214
  });
215
  //-->
@@ -458,6 +468,7 @@ mediaButton = true';
458
  $options['custom_field_template_use_multiple_insert'] = $_POST['custom_field_template_use_multiple_insert'];
459
  $options['custom_field_template_use_wpautop'] = $_POST['custom_field_template_use_wpautop'];
460
  $options['custom_field_template_use_autosave'] = $_POST['custom_field_template_use_autosave'];
 
461
  for($i=0;$i<count($_POST["custom_field_template_content"]);$i++) {
462
  if( $_POST["custom_field_template_content"][$i] ) {
463
  $options['custom_fields'][$j]['title'] = $_POST["custom_field_template_title"][$i];
@@ -474,10 +485,14 @@ mediaButton = true';
474
  update_option('custom_field_template_data', $options);
475
  $message = __('Options updated.', 'custom-field-template');
476
  elseif ($_POST['custom_field_template_shortcode_format_submit']) :
477
- unset($options['shortcode_format']);
 
478
  for($i=0;$i<count($_POST["custom_field_template_shortcode_format"]);$i++) {
479
- if( $_POST["custom_field_template_shortcode_format"][$i] )
480
- $options['shortcode_format'][] = $_POST["custom_field_template_shortcode_format"][$i];
 
 
 
481
  }
482
  update_option('custom_field_template_data', $options);
483
  $message = __('Options updated.', 'custom-field-template');
@@ -497,6 +512,7 @@ mediaButton = true';
497
  $options['hook'][$j]['position'] = $_POST["custom_field_template_hook_position"][$i];
498
  $options['hook'][$j]['content'] = $_POST["custom_field_template_hook_content"][$i];
499
  $options['hook'][$j]['category'] = preg_replace('/\s/', '', $_POST["custom_field_template_hook_category"][$i]);
 
500
  $j++;
501
  }
502
  }
@@ -524,6 +540,7 @@ mediaButton = true';
524
 
525
  <div id="poststuff" class="meta-box-sortables" style="position: relative; margin-top:10px;">
526
  <div class="postbox">
 
527
  <h3><?php _e('Custom Field Template Options', 'custom-field-template'); ?></h3>
528
  <div class="inside">
529
  <form method="post">
@@ -566,6 +583,11 @@ mediaButton = true';
566
  </td>
567
  </tr>
568
  <tr><td>
 
 
 
 
 
569
  <p><input type="submit" name="custom_field_template_set_options_submit" value="<?php _e('Update Options &raquo;', 'custom-field-template'); ?>" class="button-primary" /></p>
570
  </td></tr>
571
  </tbody>
@@ -608,6 +630,7 @@ mediaButton = true';
608
  <tr><th><strong>FORMAT #<?php echo $i; ?></strong></th></tr>
609
  <tr><td>
610
  <p><textarea name="custom_field_template_shortcode_format[]" rows="10" cols="80"><?php echo stripcslashes($options['shortcode_format'][$i]); ?></textarea></p>
 
611
  </td></tr>
612
  <?php
613
  endfor;
@@ -671,6 +694,7 @@ ex. `radio` and `select`:</dt><dd>$values = array('dog', 'cat', 'monkey'); $defa
671
  <p><label for="custom_field_template_hook_category[<?php echo $i; ?>]"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
672
  <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>
673
  <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>
 
674
  </td></tr>
675
  <?php
676
  endfor;
@@ -725,6 +749,9 @@ hideKey = true<br />
725
  <th>clearButton</th><td></td><td></td><td>clearButton = true</td><td></td><td></td>
726
  </tr>
727
  <tr>
 
 
 
728
  <th>rows</th><td></td><td></td><td></td><td></td><td>rows = 4</td>
729
  </tr>
730
  <tr>
@@ -868,7 +895,7 @@ jQuery(this).addClass("closed");
868
  eval(stripcslashes($options['php'][$code]));
869
  endif;
870
 
871
- if( isset( $_REQUEST[ 'post' ] ) ) {
872
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
873
  if ( $value ) {
874
  $value = $value[ $sid ];
@@ -1000,7 +1027,7 @@ jQuery(this).addClass("closed");
1000
  return $out;
1001
  }
1002
 
1003
- function make_select( $name, $sid, $values, $valueLabel, $default, $hideKey, $label, $code, $class ) {
1004
  $options = $this->get_custom_field_template_data();
1005
 
1006
  $title = $name;
@@ -1032,18 +1059,22 @@ jQuery(this).addClass("closed");
1032
 
1033
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1034
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1035
- $out .= '<select name="' . $name . '[]"' . $class . '>' .
1036
- '<option value="" >Select</option>';
1037
 
1038
- $i = 0;
 
 
 
 
 
1039
  foreach( $values as $val ) {
1040
  $checked = ( trim( $val ) == trim( $selected ) ) ? 'selected="selected"' : '';
1041
 
1042
  $out .= '<option value="' . attribute_escape($val) . '" ' . $checked . ' > ';
1043
  if ( $valueLabel[$i] )
1044
- $out .= $valueLabel[$i];
1045
  else
1046
- $out .= $val;
1047
  $out .= '</option>';
1048
  $i++;
1049
  }
@@ -1064,7 +1095,7 @@ jQuery(this).addClass("closed");
1064
  eval(stripcslashes($options['php'][$code]));
1065
  endif;
1066
 
1067
- if( isset( $_REQUEST[ 'post' ] ) ) {
1068
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
1069
  $value = $value[ $sid ];
1070
  } else {
@@ -1142,10 +1173,16 @@ EOF;
1142
  $options = $this->get_custom_field_template_data();
1143
 
1144
  $fields = $this->get_custom_fields( $id );
1145
-
1146
- if( $fields == null)
1147
  return;
1148
 
 
 
 
 
 
 
1149
  if ( $options['custom_fields'][$id]['instruction'] )
1150
  $out .= '<div id="cft_instruction">' . stripcslashes($options['custom_fields'][$id]['instruction']) . '</div>';
1151
 
@@ -1174,7 +1211,7 @@ EOF;
1174
  else if( $data[$i]['type'] == 'select' ) {
1175
  $out .=
1176
  $this->make_select(
1177
- $title, $i, explode( '#', $data[$i]['value'] ), explode( '#', $data[$i]['valueLabel'] ), $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'] );
1178
  }
1179
  else if( $data[$i]['type'] == 'textarea' ) {
1180
  if ( $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i] ) $data[$i]['rows'] = $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i];
@@ -1311,12 +1348,12 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1311
  $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 = new Array();};';
1312
  if ( $options['custom_field_template_use_autosave'] ) :
1313
  $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1314
- $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajax&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&id=' . $key . '&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {jQuery(\'#cft\').html(html);}});}});';
1315
  else :
1316
- $out .= ' jQuery(\'#custom_field_template_select\').val(\'' . $key . '\');jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&id=' . $key . '&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {jQuery(\'#cft\').html(html);}});';
1317
  endif;
1318
 
1319
- $out .= ' }});' . "\n";
1320
  endif;
1321
  endforeach;
1322
  endif;
@@ -1335,27 +1372,43 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1335
  $out .= $options['css'] . "\n";
1336
  $out .= '-->' . "\n" .
1337
  '</style>';
1338
- $body = $this->load_custom_field();
1339
 
1340
- if ( count($options['custom_fields'])>1 ) {
1341
- $out .= '<select id="custom_field_template_select" onchange="if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID = new Array();};';
1342
- $out .= 'var cftloading_select = function() {jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&id=\'+jQuery(\'#custom_field_template_select\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {jQuery(\'#cft\').html(html);}});};';
1343
- if ( $options['custom_field_template_use_autosave'] ) :
1344
- $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1345
- $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajax&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields, success: cftloading_select});';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1346
  else :
1347
- $out .= 'cftloading_select();';
1348
  endif;
1349
- $out .= '">';
1350
- for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
1351
- if ( $i == $options['posts'][$_REQUEST['post']] ) {
1352
- $out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1353
- $body = $this->load_custom_field($i);
1354
- } else
1355
- $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1356
- }
1357
- $out .= '</select>';
1358
- }
1359
 
1360
  $out .= '<input type="hidden" name="custom-field-template-verify-key" id="custom-field-template-verify-key" value="' . wp_create_nonce('custom-field-template') . '" />';
1361
  $out .= '<div id="cft">';
@@ -1366,7 +1419,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1366
  $out .= '<img class="waiting" style="display:none; vertical-align:middle;" src="images/loading.gif" alt="" id="cftloading_img" /> ';
1367
  $out .= '<input type="button" value="' . __('Save', 'custom-field-template') . '" onclick="';
1368
  $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1369
- $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajax&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields});';
1370
  $out .= '" class="button" style="vertical-align:middle;" />';
1371
  $out .= '</div>';
1372
 
@@ -1385,10 +1438,13 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1385
  $id = $_REQUEST[ 'post_ID' ];
1386
 
1387
  if( !current_user_can('edit_post', $id) )
1388
- return $id;
1389
 
1390
  if( !wp_verify_nonce($_REQUEST['custom-field-template-verify-key'], 'custom-field-template') )
1391
- return $id;
 
 
 
1392
 
1393
  $fields = $this->get_custom_fields($_REQUEST['custom-field-template-id']);
1394
 
@@ -1440,7 +1496,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1440
  if ( substr($wp_version, 0, 3) >= '2.3' )
1441
  wp_set_post_tags( $id, $tags_input );
1442
  endif;
1443
-
1444
  $options['posts'][$id] = $_REQUEST['custom-field-template-id'];
1445
  update_option('custom_field_template_data', $options);
1446
  }
@@ -1549,6 +1605,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1549
 
1550
  if ( is_numeric($format) && $output = $options['shortcode_format'][$format] ) :
1551
  $data = get_post_custom($post_id);
 
1552
 
1553
  if( $data == null)
1554
  return;
@@ -1581,6 +1638,8 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1581
  else :
1582
  $replace_val = '';
1583
  endif;
 
 
1584
  $key = preg_quote($key, '/');
1585
  $output = preg_replace('/\['.$key.'\]/', $replace_val, $output);
1586
  endforeach;
@@ -1634,12 +1693,14 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1634
  $options = $this->get_custom_field_template_data();
1635
 
1636
  extract(shortcode_atts(array(
1637
- 'template' => 0,
1638
- 'format' => ''
 
1639
  ), $attr));
1640
 
1641
 
1642
  if ( is_numeric($format) && $output = $options['shortcode_format'][$format] ) :
 
1643
  $output = '<form method="get" action="/" id="cftsearch">' . "\n" . $output;
1644
 
1645
  $count = count($options['custom_fields']);
@@ -1741,17 +1802,16 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1741
  endswitch;
1742
  endforeach;
1743
 
 
 
1744
  $key = preg_quote($key, '/');
1745
  $output = preg_replace('/\['.$key.'\](?!\[[0-9]+\])/', $replace_val[0], $output);
1746
  $output = preg_replace('/\['.$key.'\]\[([0-9]+)\](?!\[\])/e', '$replace_val[${1}]', $output);
1747
-
1748
- $s_replace = '<p><input type="text" name="s" class="cft_s" value="' . attribute_escape($_REQUEST['s']) .'" /></p>';
1749
- $output = preg_replace('/\[\[searchbox\]\]/', $s_replace, $output);
1750
  endforeach;
1751
  endfor;
1752
  endif;
1753
 
1754
- $output .= '<p><input type="submit" name="cftsearch_submit" value="' . __('Search &raquo;', 'custom-field-template') . '" /></p>' . "\n";
1755
  $output .= '</form>' . "\n";
1756
  else :
1757
  $fields = $this->get_custom_fields( $template );
@@ -1820,7 +1880,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1820
  $output .= '</dl>' ."\n";
1821
  endif;
1822
  endforeach;
1823
- $output .= '<p><input type="submit" name="cftsearch_submit" value="' . __('Search &raquo;', 'custom-field-template') . '" /></p>' . "\n";
1824
  $output .= '</form>' . "\n";
1825
  endif;
1826
 
@@ -1831,10 +1891,12 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1831
  global $wp_query, $wp_version, $wpdb;
1832
  $options = $this->get_custom_field_template_data();
1833
 
1834
- if ( isset($_REQUEST['ss']) ) :
1835
- $wp_query->query_vars['s'] = $_REQUEST['ss'];
1836
- endif;
1837
 
 
 
1838
  $count = count($options['custom_fields']);
1839
  if ( $count ) :
1840
  for ($i=0;$i<$count;$i++) :
@@ -1881,9 +1943,26 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1881
  endforeach;
1882
  endforeach;
1883
  endif;
1884
-
 
 
 
 
 
 
 
 
 
1885
  return $where;
1886
  }
 
 
 
 
 
 
 
 
1887
  }
1888
 
1889
  $custom_field_template = new 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.0.3
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
30
 
31
  add_filter( 'the_content', array(&$this, 'custom_field_template_the_content') );
32
 
33
+ if ( $_REQUEST['cftsearch_submit'] ) :
34
  add_filter( 'posts_where', array(&$this, 'custom_field_template_posts_where') );
35
  endif;
36
 
42
 
43
  function custom_field_template_init() {
44
  global $wp_version;
45
+ $options = $this->get_custom_field_template_data();
46
 
47
  if ( function_exists('load_plugin_textdomain') ) {
48
  if ( !defined('WP_PLUGIN_DIR') ) {
52
  }
53
  }
54
 
55
+ if ( is_user_logged_in() && isset($_REQUEST['post']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxsave' ) {
56
  if ( $_REQUEST['post'] > 0 )
57
  $this->edit_meta_value( $_REQUEST['post'] );
58
  exit();
59
  }
60
 
61
 
62
+ if ( is_user_logged_in() && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxload') {
63
+ if ( isset($_REQUEST['id']) )
64
+ $id = $_REQUEST['id'];
65
+ elseif ( isset($options['posts'][$_REQUEST['post']]) )
66
+ $id = $options['posts'][$_REQUEST['post']];
67
+ echo $this->load_custom_field( $id );
68
  exit();
69
  }
70
 
92
  require_once(ABSPATH . 'wp-admin/includes/template.php');
93
  add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'post', 'normal', 'core');
94
  add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'page', 'normal', 'core');
95
+ if ( function_exists('remove_meta_box') && $options['custom_field_template_disable_default_custom_fields'] ) :
96
+ remove_meta_box('postcustom', 'post', 'normal');
97
+ remove_meta_box('pagecustomdiv', 'page', 'normal');
98
+ endif;
99
  }
100
 
101
  }
122
  '</style>';
123
 
124
  if ( count($options['custom_fields'])>1 ) {
125
+ $out .= '<select id="custom_field_template_select">';
126
  for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
127
  if ( $i == $options['posts'][$_REQUEST['post']] ) {
128
  $out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
130
  $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
131
  }
132
  $out .= '</select>';
133
+ $out .= '<input type="button" class="button" value="' . __('Load', 'custom-field-template') . '" onclick="var post = jQuery(this).parent().parent().parent().parent().attr(\'id\').replace(\'edit-\',\'\'); var cftloading_select = function() {jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=\'+jQuery(\'#custom_field_template_select\').val()+\'&post=\'+post, success: function(html) {jQuery(\'#cft\').html(html);}});};cftloading_select(post);" />';
134
  }
135
 
136
  $out .= '<input type="hidden" name="custom-field-template-verify-key" id="custom-field-template-verify-key" value="' . wp_create_nonce('custom-field-template') . '" />';
219
 
220
  jQuery('.editinline').click(function () {post_id = jQuery(this).parent().parent().parent().parent().attr('id').replace('post-',''); inlineEditPost.cft_load(post_id);});
221
  inlineEditPost.cft_load = function (post_id) {
222
+ jQuery.ajax({type: 'GET', url: '?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&post='+post_id, success: function(html) {jQuery('#cft').html(html);}});
223
  };
224
  });
225
  //-->
468
  $options['custom_field_template_use_multiple_insert'] = $_POST['custom_field_template_use_multiple_insert'];
469
  $options['custom_field_template_use_wpautop'] = $_POST['custom_field_template_use_wpautop'];
470
  $options['custom_field_template_use_autosave'] = $_POST['custom_field_template_use_autosave'];
471
+ $options['custom_field_template_disable_default_custom_fields'] = $_POST['custom_field_template_disable_default_custom_fields'];
472
  for($i=0;$i<count($_POST["custom_field_template_content"]);$i++) {
473
  if( $_POST["custom_field_template_content"][$i] ) {
474
  $options['custom_fields'][$j]['title'] = $_POST["custom_field_template_title"][$i];
485
  update_option('custom_field_template_data', $options);
486
  $message = __('Options updated.', 'custom-field-template');
487
  elseif ($_POST['custom_field_template_shortcode_format_submit']) :
488
+ unset($options['shortcode_format'], $options['shortcode_format_use_php']);
489
+ $j = 0;
490
  for($i=0;$i<count($_POST["custom_field_template_shortcode_format"]);$i++) {
491
+ if( $_POST["custom_field_template_shortcode_format"][$i] ) :
492
+ $options['shortcode_format'][$j] = $_POST["custom_field_template_shortcode_format"][$i];
493
+ $options['shortcode_format_use_php'][$j] = $_POST["custom_field_template_shortcode_format_use_php"][$i];
494
+ $j++;
495
+ endif;
496
  }
497
  update_option('custom_field_template_data', $options);
498
  $message = __('Options updated.', 'custom-field-template');
512
  $options['hook'][$j]['position'] = $_POST["custom_field_template_hook_position"][$i];
513
  $options['hook'][$j]['content'] = $_POST["custom_field_template_hook_content"][$i];
514
  $options['hook'][$j]['category'] = preg_replace('/\s/', '', $_POST["custom_field_template_hook_category"][$i]);
515
+ $options['hook'][$j]['use_php'] = $_POST["custom_field_template_hook_use_php"][$i];
516
  $j++;
517
  }
518
  }
540
 
541
  <div id="poststuff" class="meta-box-sortables" style="position: relative; margin-top:10px;">
542
  <div class="postbox">
543
+ <div class="handlediv" title="<?php _e('Click to toggle', 'custom-field-template'); ?>"><br /></div>
544
  <h3><?php _e('Custom Field Template Options', 'custom-field-template'); ?></h3>
545
  <div class="inside">
546
  <form method="post">
583
  </td>
584
  </tr>
585
  <tr><td>
586
+ <p><label for="custom_field_template_disable_default_custom_fields"><?php _e('In case that you would like to forbid to use the default custom fields.', 'custom-field-template'); ?></label>:<br />
587
+ <input type="checkbox" name="custom_field_template_disable_default_custom_fields" id="custom_field_template_disable_default_custom_fields" value="1" <?php if ($options['custom_field_template_disable_default_custom_fields']) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the default custom fields', 'custom-field-template'); ?></p>
588
+ </td>
589
+ </tr>
590
+ <tr><td>
591
  <p><input type="submit" name="custom_field_template_set_options_submit" value="<?php _e('Update Options &raquo;', 'custom-field-template'); ?>" class="button-primary" /></p>
592
  </td></tr>
593
  </tbody>
630
  <tr><th><strong>FORMAT #<?php echo $i; ?></strong></th></tr>
631
  <tr><td>
632
  <p><textarea name="custom_field_template_shortcode_format[]" rows="10" cols="80"><?php echo stripcslashes($options['shortcode_format'][$i]); ?></textarea></p>
633
+ <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>
634
  </td></tr>
635
  <?php
636
  endfor;
694
  <p><label for="custom_field_template_hook_category[<?php echo $i; ?>]"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
695
  <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>
696
  <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>
697
+ <p><input type="checkbox" name="custom_field_template_hook_use_php[]" id="custom_field_template_hook_use_php[]" value="1" <?php if ($options['hook'][$i]['use_php']) { echo ' checked="checked"'; } ?> /> <?php _e('Use PHP', 'custom-field-template'); ?></p>
698
  </td></tr>
699
  <?php
700
  endfor;
749
  <th>clearButton</th><td></td><td></td><td>clearButton = true</td><td></td><td></td>
750
  </tr>
751
  <tr>
752
+ <th>selectLabel</th><td></td><td></td><td></td><td>selectLabel = Select a fruit</td><td></td>
753
+ </tr>
754
+ <tr>
755
  <th>rows</th><td></td><td></td><td></td><td></td><td>rows = 4</td>
756
  </tr>
757
  <tr>
895
  eval(stripcslashes($options['php'][$code]));
896
  endif;
897
 
898
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
899
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
900
  if ( $value ) {
901
  $value = $value[ $sid ];
1027
  return $out;
1028
  }
1029
 
1030
+ function make_select( $name, $sid, $values, $valueLabel, $default, $hideKey, $label, $code, $class, $selectLabel ) {
1031
  $options = $this->get_custom_field_template_data();
1032
 
1033
  $title = $name;
1059
 
1060
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1061
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1062
+ $out .= '<select name="' . $name . '[]"' . $class . '>';
 
1063
 
1064
+ if ( $selectLabel )
1065
+ $out .= '<option value="" >' . stripcslashes(trim($selectLabel)) . '</option>';
1066
+ else
1067
+ $out .= '<option value="" >' . __('Select', 'custom-field-template') . '</option>';
1068
+
1069
+ $i = 0;
1070
  foreach( $values as $val ) {
1071
  $checked = ( trim( $val ) == trim( $selected ) ) ? 'selected="selected"' : '';
1072
 
1073
  $out .= '<option value="' . attribute_escape($val) . '" ' . $checked . ' > ';
1074
  if ( $valueLabel[$i] )
1075
+ $out .= stripcslashes($valueLabel[$i]);
1076
  else
1077
+ $out .= stripcslashes($val);
1078
  $out .= '</option>';
1079
  $i++;
1080
  }
1095
  eval(stripcslashes($options['php'][$code]));
1096
  endif;
1097
 
1098
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
1099
  $value = get_post_meta( $_REQUEST[ 'post' ], $title );
1100
  $value = $value[ $sid ];
1101
  } else {
1173
  $options = $this->get_custom_field_template_data();
1174
 
1175
  $fields = $this->get_custom_fields( $id );
1176
+
1177
+ if ( $fields == null )
1178
  return;
1179
 
1180
+ if ( (!$_REQUEST['post'] || $_REQUEST['post']<0) && $options['custom_fields'][$id]['category'] && $_REQUEST['cft_mode'] != 'ajaxload' )
1181
+ return;
1182
+
1183
+ if ( $_REQUEST['post'] && $options['custom_fields'][$id]['category'] && !isset($options['posts'][$_REQUEST['post']]) && $options['posts'][$_REQUEST['post']] !== $id && $_REQUEST['cft_mode'] != 'ajaxload' )
1184
+ return;
1185
+
1186
  if ( $options['custom_fields'][$id]['instruction'] )
1187
  $out .= '<div id="cft_instruction">' . stripcslashes($options['custom_fields'][$id]['instruction']) . '</div>';
1188
 
1211
  else if( $data[$i]['type'] == 'select' ) {
1212
  $out .=
1213
  $this->make_select(
1214
+ $title, $i, explode( '#', $data[$i]['value'] ), explode( '#', $data[$i]['valueLabel'] ), $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'], $data[$i]['selectLabel'] );
1215
  }
1216
  else if( $data[$i]['type'] == 'textarea' ) {
1217
  if ( $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i] ) $data[$i]['rows'] = $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i];
1348
  $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 = new Array();};';
1349
  if ( $options['custom_field_template_use_autosave'] ) :
1350
  $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1351
+ $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&id=' . $key . '&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {jQuery(\'#cft\').html(html);}});}});';
1352
  else :
1353
+ $out .= ' 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) {jQuery(\'#cft\').html(html);}});';
1354
  endif;
1355
 
1356
+ $out .= ' }else{jQuery(\'#cft\').html(\'\');}});' . "\n";
1357
  endif;
1358
  endforeach;
1359
  endif;
1372
  $out .= $options['css'] . "\n";
1373
  $out .= '-->' . "\n" .
1374
  '</style>';
1375
+ $body = $this->load_custom_field($init_id);
1376
 
1377
+ if ( count($options['custom_fields'])>1 ) :
1378
+ $flag = 0;
1379
+ for ( $i=0; $i < count($options['custom_fields']); $i++ ) :
1380
+ if ( !$options['custom_fields'][$i]['category'] ) :
1381
+ $flag = 1;
1382
+ break;
1383
+ endif;
1384
+ endfor;
1385
+ if ( $flag ) :
1386
+ $out .= '<select id="custom_field_template_select">';
1387
+ for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
1388
+ if ( $i == $options['posts'][$_REQUEST['post']] && isset($_REQUEST['post']) ) :
1389
+ $out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1390
+ elseif ( $options['custom_fields'][$i]['category'] ) :
1391
+ $out .= '';
1392
+ else :
1393
+ $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
1394
+ endif;
1395
+ }
1396
+ $out .= '</select> ';
1397
+ $out .= '<input type="button" class="button" value="' . __('Load', 'custom-field-template') . '" onclick="if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID = new Array();};';
1398
+ $out .= 'var cftloading_select = function() {jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=\'+jQuery(\'#custom_field_template_select\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {jQuery(\'#cft\').html(html);}});};';
1399
+ if ( $options['custom_field_template_use_autosave'] ) :
1400
+ $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1401
+ $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: cftloading_select});';
1402
+ else :
1403
+ $out .= 'cftloading_select();';
1404
+ endif;
1405
+ $out .= '" />';
1406
  else :
1407
+ $out .= '<div style="height:25px;">&nbsp;</div>';
1408
  endif;
1409
+ else :
1410
+ $out .= '<div style="height:25px;">&nbsp;</div>';
1411
+ endif;
 
 
 
 
 
 
 
1412
 
1413
  $out .= '<input type="hidden" name="custom-field-template-verify-key" id="custom-field-template-verify-key" value="' . wp_create_nonce('custom-field-template') . '" />';
1414
  $out .= '<div id="cft">';
1419
  $out .= '<img class="waiting" style="display:none; vertical-align:middle;" src="images/loading.gif" alt="" id="cftloading_img" /> ';
1420
  $out .= '<input type="button" value="' . __('Save', 'custom-field-template') . '" onclick="';
1421
  $out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
1422
+ $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});';
1423
  $out .= '" class="button" style="vertical-align:middle;" />';
1424
  $out .= '</div>';
1425
 
1438
  $id = $_REQUEST[ 'post_ID' ];
1439
 
1440
  if( !current_user_can('edit_post', $id) )
1441
+ return $id;
1442
 
1443
  if( !wp_verify_nonce($_REQUEST['custom-field-template-verify-key'], 'custom-field-template') )
1444
+ return $id;
1445
+
1446
+ if ( !isset($_REQUEST['custom-field-template-id']) )
1447
+ return $id;
1448
 
1449
  $fields = $this->get_custom_fields($_REQUEST['custom-field-template-id']);
1450
 
1496
  if ( substr($wp_version, 0, 3) >= '2.3' )
1497
  wp_set_post_tags( $id, $tags_input );
1498
  endif;
1499
+
1500
  $options['posts'][$id] = $_REQUEST['custom-field-template-id'];
1501
  update_option('custom_field_template_data', $options);
1502
  }
1605
 
1606
  if ( is_numeric($format) && $output = $options['shortcode_format'][$format] ) :
1607
  $data = get_post_custom($post_id);
1608
+ $output = stripcslashes($output);
1609
 
1610
  if( $data == null)
1611
  return;
1638
  else :
1639
  $replace_val = '';
1640
  endif;
1641
+ if ( $options['shortcode_format_use_php'][$format] )
1642
+ $output = preg_replace_callback("/(<\?php|<\?|< \?php)(.*?)\?>/si", array($this, 'EvalBuffer'), $output);
1643
  $key = preg_quote($key, '/');
1644
  $output = preg_replace('/\['.$key.'\]/', $replace_val, $output);
1645
  endforeach;
1693
  $options = $this->get_custom_field_template_data();
1694
 
1695
  extract(shortcode_atts(array(
1696
+ 'template' => 0,
1697
+ 'format' => '',
1698
+ 'search_label' => __('Search &raquo;', 'custom-field-template')
1699
  ), $attr));
1700
 
1701
 
1702
  if ( is_numeric($format) && $output = $options['shortcode_format'][$format] ) :
1703
+ $output = stripcslashes($output);
1704
  $output = '<form method="get" action="/" id="cftsearch">' . "\n" . $output;
1705
 
1706
  $count = count($options['custom_fields']);
1802
  endswitch;
1803
  endforeach;
1804
 
1805
+ if ( $options['shortcode_format_use_php'][$format] )
1806
+ $output = preg_replace_callback("/(<\?php|<\?|< \?php)(.*?)\?>/si", array($this, 'EvalBuffer'), $output);
1807
  $key = preg_quote($key, '/');
1808
  $output = preg_replace('/\['.$key.'\](?!\[[0-9]+\])/', $replace_val[0], $output);
1809
  $output = preg_replace('/\['.$key.'\]\[([0-9]+)\](?!\[\])/e', '$replace_val[${1}]', $output);
 
 
 
1810
  endforeach;
1811
  endfor;
1812
  endif;
1813
 
1814
+ $output .= '<p><input type="submit" name="cftsearch_submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
1815
  $output .= '</form>' . "\n";
1816
  else :
1817
  $fields = $this->get_custom_fields( $template );
1880
  $output .= '</dl>' ."\n";
1881
  endif;
1882
  endforeach;
1883
+ $output .= '<p><input type="submit" name="cftsearch_submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
1884
  $output .= '</form>' . "\n";
1885
  endif;
1886
 
1891
  global $wp_query, $wp_version, $wpdb;
1892
  $options = $this->get_custom_field_template_data();
1893
 
1894
+ $wp_query->is_search = 1;
1895
+ $wp_query->is_page = '';
1896
+ $wp_query->is_singular = '';
1897
 
1898
+ $where = '';
1899
+
1900
  $count = count($options['custom_fields']);
1901
  if ( $count ) :
1902
  for ($i=0;$i<$count;$i++) :
1943
  endforeach;
1944
  endforeach;
1945
  endif;
1946
+
1947
+ if ( is_array($_REQUEST['cftcategory']) ) :
1948
+ $ids = get_objects_in_term($_REQUEST['cftcategory'], 'category');
1949
+ if ( is_array($ids) && count($ids) > 0 ) :
1950
+ $in_posts = "'" . implode("', '", $ids) . "'";
1951
+ $where .= " AND ID IN (" . $in_posts . ")";
1952
+ endif;
1953
+ $where .= " AND " . $wpdb->posts . ".post_type = 'post'";
1954
+ endif;
1955
+
1956
  return $where;
1957
  }
1958
+
1959
+ function EvalBuffer($string) {
1960
+ ob_start();
1961
+ eval("$string[2];");
1962
+ $ret = ob_get_contents();
1963
+ ob_end_clean();
1964
+ return $ret;
1965
+ }
1966
  }
1967
 
1968
  $custom_field_template = new custom_field_template();
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-01-27 16:11+0900\n"
6
- "PO-Revision-Date: 2009-01-27 16:12+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -13,245 +13,267 @@ msgstr ""
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: custom-field-template\n"
15
 
16
- #: custom-field-template/custom-field-template.php:89
17
- #: custom-field-template/custom-field-template.php:90
18
- #: custom-field-template/custom-field-template.php:413
19
- #: custom-field-template/custom-field-template.php:520
20
- #: custom-field-template/custom-field-template.php:1208
21
  msgid "Custom Field Template"
22
  msgstr ""
23
 
24
- #: custom-field-template/custom-field-template.php:271
 
 
 
 
 
25
  msgid "read more"
26
  msgstr ""
27
 
28
- #: custom-field-template/custom-field-template.php:289
29
- #: custom-field-template/custom-field-template.php:299
30
  msgid "Custom Fields"
31
  msgstr ""
32
 
33
- #: custom-field-template/custom-field-template.php:329
34
  msgid "Settings"
35
  msgstr ""
36
 
37
- #: custom-field-template/custom-field-template.php:341
38
  msgid "Default Template"
39
  msgstr ""
40
 
41
- #: custom-field-template/custom-field-template.php:470
42
- #: custom-field-template/custom-field-template.php:474
43
  #: custom-field-template/custom-field-template.php:482
44
- #: custom-field-template/custom-field-template.php:490
45
- #: custom-field-template/custom-field-template.php:503
 
 
46
  msgid "Options updated."
47
  msgstr ""
48
 
49
- #: custom-field-template/custom-field-template.php:508
50
  msgid "Options resetted."
51
  msgstr ""
52
 
53
- #: custom-field-template/custom-field-template.php:512
54
  msgid "Options deleted."
55
  msgstr ""
56
 
57
- #: custom-field-template/custom-field-template.php:526
 
 
 
 
 
 
 
 
 
 
 
 
58
  msgid "Custom Field Template Options"
59
  msgstr ""
60
 
61
- #: custom-field-template/custom-field-template.php:536
62
  msgid "Template Title"
63
  msgstr ""
64
 
65
- #: custom-field-template/custom-field-template.php:538
66
  msgid "Template Instruction"
67
  msgstr ""
68
 
69
- #: custom-field-template/custom-field-template.php:540
70
- #: custom-field-template/custom-field-template.php:670
71
  msgid "Category ID (comma-deliminated)"
72
  msgstr ""
73
 
74
- #: custom-field-template/custom-field-template.php:542
75
  msgid "Template Content"
76
  msgstr ""
77
 
78
- #: custom-field-template/custom-field-template.php:549
79
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
80
  msgstr ""
81
 
82
- #: custom-field-template/custom-field-template.php:550
83
  msgid "Use multiple image inset"
84
  msgstr ""
85
 
86
- #: custom-field-template/custom-field-template.php:550
87
  msgid "Caution:"
88
  msgstr ""
89
 
90
- #: custom-field-template/custom-field-template.php:550
91
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
92
  msgstr ""
93
 
94
- #: custom-field-template/custom-field-template.php:554
95
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
96
  msgstr ""
97
 
98
- #: custom-field-template/custom-field-template.php:555
99
  msgid "Use labels in place of custom keys"
100
  msgstr ""
101
 
102
- #: custom-field-template/custom-field-template.php:558
103
  msgid "In case that you would like to add p and br tags in textareas automatically"
104
  msgstr ""
105
 
106
- #: custom-field-template/custom-field-template.php:559
107
  msgid "Use wpautop function"
108
  msgstr ""
109
 
110
- #: custom-field-template/custom-field-template.php:563
111
  msgid "In case that you would like to save values automatically in switching templates"
112
  msgstr ""
113
 
114
- #: custom-field-template/custom-field-template.php:564
115
  msgid "Use the auto save in switching templates"
116
  msgstr ""
117
 
118
- #: custom-field-template/custom-field-template.php:568
 
 
 
119
  #: custom-field-template/custom-field-template.php:587
120
- #: custom-field-template/custom-field-template.php:615
121
- #: custom-field-template/custom-field-template.php:646
122
- #: custom-field-template/custom-field-template.php:678
123
- msgid "Update Options &raquo;"
124
  msgstr ""
125
 
126
- #: custom-field-template/custom-field-template.php:577
127
- #: custom-field-template/custom-field-template.php:596
128
- #: custom-field-template/custom-field-template.php:624
129
- #: custom-field-template/custom-field-template.php:655
130
- #: custom-field-template/custom-field-template.php:687
131
- #: custom-field-template/custom-field-template.php:774
132
- #: custom-field-template/custom-field-template.php:790
133
- #: custom-field-template/custom-field-template.php:806
134
- msgid "Click to toggle"
135
  msgstr ""
136
 
137
- #: custom-field-template/custom-field-template.php:578
138
- msgid "CSS"
139
  msgstr ""
140
 
141
- #: custom-field-template/custom-field-template.php:597
142
  msgid "[cft] and [cftsearch] Shortcode Format"
143
  msgstr ""
144
 
145
- #: custom-field-template/custom-field-template.php:600
146
  msgid "For [cft], [key] will be converted into the value of [key]."
147
  msgstr ""
148
 
149
- #: custom-field-template/custom-field-template.php:601
150
  msgid "For [cftsearch], [key] will be converted into the input field."
151
  msgstr ""
152
 
153
- #: custom-field-template/custom-field-template.php:625
 
 
 
 
 
154
  msgid "PHP CODE (Experimental Option)"
155
  msgstr ""
156
 
157
- #: custom-field-template/custom-field-template.php:627
158
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
159
  msgstr ""
160
 
161
- #: custom-field-template/custom-field-template.php:628
162
  msgid "For `text` and `textarea`, you must set $value as an string."
163
  msgstr ""
164
 
165
- #: custom-field-template/custom-field-template.php:630
166
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
167
  msgstr ""
168
 
169
- #: custom-field-template/custom-field-template.php:656
170
  msgid "Auto Hook of `the_content()` (Experimental Option)"
171
  msgstr ""
172
 
173
- #: custom-field-template/custom-field-template.php:666
174
  msgid "Position"
175
  msgstr ""
176
 
177
- #: custom-field-template/custom-field-template.php:667
178
  msgid "Before the conetnt"
179
  msgstr ""
180
 
181
- #: custom-field-template/custom-field-template.php:668
182
  msgid "After the conetnt"
183
  msgstr ""
184
 
185
- #: custom-field-template/custom-field-template.php:672
186
  msgid "Content"
187
  msgstr ""
188
 
189
- #: custom-field-template/custom-field-template.php:688
190
  msgid "Option List"
191
  msgstr ""
192
 
193
- #: custom-field-template/custom-field-template.php:775
194
  msgid "Reset Options"
195
  msgstr ""
196
 
197
- #: custom-field-template/custom-field-template.php:777
198
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
199
  msgstr ""
200
 
201
- #: custom-field-template/custom-field-template.php:781
202
  msgid "Unset Options &raquo;"
203
  msgstr ""
204
 
205
- #: custom-field-template/custom-field-template.php:791
206
  msgid "Delete Options"
207
  msgstr ""
208
 
209
- #: custom-field-template/custom-field-template.php:793
210
  msgid "Are you sure to delete options? Options you set will be deleted."
211
  msgstr ""
212
 
213
- #: custom-field-template/custom-field-template.php:797
214
  msgid "Delete Options &raquo;"
215
  msgstr ""
216
 
217
- #: custom-field-template/custom-field-template.php:807
218
  msgid "Donation"
219
  msgstr ""
220
 
221
- #: custom-field-template/custom-field-template.php:809
222
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
223
  msgstr ""
224
 
225
- #: custom-field-template/custom-field-template.php:972
226
  msgid "Clear"
227
  msgstr ""
228
 
229
- #: custom-field-template/custom-field-template.php:1094
 
 
 
 
230
  msgid "Add Media"
231
  msgstr ""
232
 
233
- #: custom-field-template/custom-field-template.php:1096
234
  msgid "Add an Image"
235
  msgstr ""
236
 
237
- #: custom-field-template/custom-field-template.php:1098
238
  msgid "Add Video"
239
  msgstr ""
240
 
241
- #: custom-field-template/custom-field-template.php:1100
242
  msgid "Add Audio"
243
  msgstr ""
244
 
245
- #: custom-field-template/custom-field-template.php:1111
246
  msgid "Toggle"
247
  msgstr ""
248
 
249
- #: custom-field-template/custom-field-template.php:1366
250
  msgid "Save"
251
  msgstr ""
252
 
253
- #: custom-field-template/custom-field-template.php:1716
254
- #: custom-field-template/custom-field-template.php:1786
255
  msgid "Search &raquo;"
256
  msgstr ""
257
 
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-02-02 18:01+0900\n"
6
+ "PO-Revision-Date: 2009-02-02 18:01+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:93
17
+ #: custom-field-template/custom-field-template.php:94
18
+ #: custom-field-template/custom-field-template.php:424
19
+ #: custom-field-template/custom-field-template.php:537
20
+ #: custom-field-template/custom-field-template.php:1246
21
  msgid "Custom Field Template"
22
  msgstr ""
23
 
24
+ #: custom-field-template/custom-field-template.php:133
25
+ #: custom-field-template/custom-field-template.php:1397
26
+ msgid "Load"
27
+ msgstr ""
28
+
29
+ #: custom-field-template/custom-field-template.php:282
30
  msgid "read more"
31
  msgstr ""
32
 
33
+ #: custom-field-template/custom-field-template.php:300
34
+ #: custom-field-template/custom-field-template.php:310
35
  msgid "Custom Fields"
36
  msgstr ""
37
 
38
+ #: custom-field-template/custom-field-template.php:340
39
  msgid "Settings"
40
  msgstr ""
41
 
42
+ #: custom-field-template/custom-field-template.php:352
43
  msgid "Default Template"
44
  msgstr ""
45
 
 
 
46
  #: custom-field-template/custom-field-template.php:482
47
+ #: custom-field-template/custom-field-template.php:486
48
+ #: custom-field-template/custom-field-template.php:498
49
+ #: custom-field-template/custom-field-template.php:506
50
+ #: custom-field-template/custom-field-template.php:520
51
  msgid "Options updated."
52
  msgstr ""
53
 
54
+ #: custom-field-template/custom-field-template.php:525
55
  msgid "Options resetted."
56
  msgstr ""
57
 
58
+ #: custom-field-template/custom-field-template.php:529
59
  msgid "Options deleted."
60
  msgstr ""
61
 
62
+ #: custom-field-template/custom-field-template.php:543
63
+ #: custom-field-template/custom-field-template.php:600
64
+ #: custom-field-template/custom-field-template.php:619
65
+ #: custom-field-template/custom-field-template.php:648
66
+ #: custom-field-template/custom-field-template.php:679
67
+ #: custom-field-template/custom-field-template.php:712
68
+ #: custom-field-template/custom-field-template.php:802
69
+ #: custom-field-template/custom-field-template.php:818
70
+ #: custom-field-template/custom-field-template.php:834
71
+ msgid "Click to toggle"
72
+ msgstr ""
73
+
74
+ #: custom-field-template/custom-field-template.php:544
75
  msgid "Custom Field Template Options"
76
  msgstr ""
77
 
78
+ #: custom-field-template/custom-field-template.php:554
79
  msgid "Template Title"
80
  msgstr ""
81
 
82
+ #: custom-field-template/custom-field-template.php:556
83
  msgid "Template Instruction"
84
  msgstr ""
85
 
86
+ #: custom-field-template/custom-field-template.php:558
87
+ #: custom-field-template/custom-field-template.php:694
88
  msgid "Category ID (comma-deliminated)"
89
  msgstr ""
90
 
91
+ #: custom-field-template/custom-field-template.php:560
92
  msgid "Template Content"
93
  msgstr ""
94
 
95
+ #: custom-field-template/custom-field-template.php:567
96
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
97
  msgstr ""
98
 
99
+ #: custom-field-template/custom-field-template.php:568
100
  msgid "Use multiple image inset"
101
  msgstr ""
102
 
103
+ #: custom-field-template/custom-field-template.php:568
104
  msgid "Caution:"
105
  msgstr ""
106
 
107
+ #: custom-field-template/custom-field-template.php:568
108
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
109
  msgstr ""
110
 
111
+ #: custom-field-template/custom-field-template.php:572
112
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
113
  msgstr ""
114
 
115
+ #: custom-field-template/custom-field-template.php:573
116
  msgid "Use labels in place of custom keys"
117
  msgstr ""
118
 
119
+ #: custom-field-template/custom-field-template.php:576
120
  msgid "In case that you would like to add p and br tags in textareas automatically"
121
  msgstr ""
122
 
123
+ #: custom-field-template/custom-field-template.php:577
124
  msgid "Use wpautop function"
125
  msgstr ""
126
 
127
+ #: custom-field-template/custom-field-template.php:581
128
  msgid "In case that you would like to save values automatically in switching templates"
129
  msgstr ""
130
 
131
+ #: custom-field-template/custom-field-template.php:582
132
  msgid "Use the auto save in switching templates"
133
  msgstr ""
134
 
135
+ #: custom-field-template/custom-field-template.php:586
136
+ msgid "In case that you would like to forbid to use the default custom fields."
137
+ msgstr ""
138
+
139
  #: custom-field-template/custom-field-template.php:587
140
+ msgid "Disable the default custom fields"
 
 
 
141
  msgstr ""
142
 
143
+ #: custom-field-template/custom-field-template.php:591
144
+ #: custom-field-template/custom-field-template.php:610
145
+ #: custom-field-template/custom-field-template.php:639
146
+ #: custom-field-template/custom-field-template.php:670
147
+ #: custom-field-template/custom-field-template.php:703
148
+ msgid "Update Options &raquo;"
 
 
 
149
  msgstr ""
150
 
151
+ #: custom-field-template/custom-field-template.php:601
152
+ msgid "ADMIN CSS"
153
  msgstr ""
154
 
155
+ #: custom-field-template/custom-field-template.php:620
156
  msgid "[cft] and [cftsearch] Shortcode Format"
157
  msgstr ""
158
 
159
+ #: custom-field-template/custom-field-template.php:623
160
  msgid "For [cft], [key] will be converted into the value of [key]."
161
  msgstr ""
162
 
163
+ #: custom-field-template/custom-field-template.php:624
164
  msgid "For [cftsearch], [key] will be converted into the input field."
165
  msgstr ""
166
 
167
+ #: custom-field-template/custom-field-template.php:633
168
+ #: custom-field-template/custom-field-template.php:697
169
+ msgid "Use PHP"
170
+ msgstr ""
171
+
172
+ #: custom-field-template/custom-field-template.php:649
173
  msgid "PHP CODE (Experimental Option)"
174
  msgstr ""
175
 
176
+ #: custom-field-template/custom-field-template.php:651
177
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
178
  msgstr ""
179
 
180
+ #: custom-field-template/custom-field-template.php:652
181
  msgid "For `text` and `textarea`, you must set $value as an string."
182
  msgstr ""
183
 
184
+ #: custom-field-template/custom-field-template.php:654
185
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
186
  msgstr ""
187
 
188
+ #: custom-field-template/custom-field-template.php:680
189
  msgid "Auto Hook of `the_content()` (Experimental Option)"
190
  msgstr ""
191
 
192
+ #: custom-field-template/custom-field-template.php:690
193
  msgid "Position"
194
  msgstr ""
195
 
196
+ #: custom-field-template/custom-field-template.php:691
197
  msgid "Before the conetnt"
198
  msgstr ""
199
 
200
+ #: custom-field-template/custom-field-template.php:692
201
  msgid "After the conetnt"
202
  msgstr ""
203
 
204
+ #: custom-field-template/custom-field-template.php:696
205
  msgid "Content"
206
  msgstr ""
207
 
208
+ #: custom-field-template/custom-field-template.php:713
209
  msgid "Option List"
210
  msgstr ""
211
 
212
+ #: custom-field-template/custom-field-template.php:803
213
  msgid "Reset Options"
214
  msgstr ""
215
 
216
+ #: custom-field-template/custom-field-template.php:805
217
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
218
  msgstr ""
219
 
220
+ #: custom-field-template/custom-field-template.php:809
221
  msgid "Unset Options &raquo;"
222
  msgstr ""
223
 
224
+ #: custom-field-template/custom-field-template.php:819
225
  msgid "Delete Options"
226
  msgstr ""
227
 
228
+ #: custom-field-template/custom-field-template.php:821
229
  msgid "Are you sure to delete options? Options you set will be deleted."
230
  msgstr ""
231
 
232
+ #: custom-field-template/custom-field-template.php:825
233
  msgid "Delete Options &raquo;"
234
  msgstr ""
235
 
236
+ #: custom-field-template/custom-field-template.php:835
237
  msgid "Donation"
238
  msgstr ""
239
 
240
+ #: custom-field-template/custom-field-template.php:837
241
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
242
  msgstr ""
243
 
244
+ #: custom-field-template/custom-field-template.php:1000
245
  msgid "Clear"
246
  msgstr ""
247
 
248
+ #: custom-field-template/custom-field-template.php:1067
249
+ msgid "Select"
250
+ msgstr ""
251
+
252
+ #: custom-field-template/custom-field-template.php:1126
253
  msgid "Add Media"
254
  msgstr ""
255
 
256
+ #: custom-field-template/custom-field-template.php:1128
257
  msgid "Add an Image"
258
  msgstr ""
259
 
260
+ #: custom-field-template/custom-field-template.php:1130
261
  msgid "Add Video"
262
  msgstr ""
263
 
264
+ #: custom-field-template/custom-field-template.php:1132
265
  msgid "Add Audio"
266
  msgstr ""
267
 
268
+ #: custom-field-template/custom-field-template.php:1143
269
  msgid "Toggle"
270
  msgstr ""
271
 
272
+ #: custom-field-template/custom-field-template.php:1420
273
  msgid "Save"
274
  msgstr ""
275
 
276
+ #: custom-field-template/custom-field-template.php:1698
 
277
  msgid "Search &raquo;"
278
  msgstr ""
279
 
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
7
- Stable tag: 1.0.2
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
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
7
+ Stable tag: 1.0.3
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10