Custom Field Template - Version 1.1

Version Description

Download this release

Release Info

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

Code changes from version 1.0.8 to 1.1

custom-field-template-it_IT.mo CHANGED
Binary file
custom-field-template-it_IT.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template in italiano\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-03-06 03:23+0900\n"
6
- "PO-Revision-Date: 2009-03-05 23:59+0100\n"
7
  "Last-Translator: Gianni Diurno (aka gidibao) <gidibao@gmail.com>\n"
8
  "Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -16,321 +16,329 @@ msgstr ""
16
  "X-Poedit-Basepath: ../\n"
17
  "X-Poedit-SearchPath-0: custom-field-template\n"
18
 
19
- #: custom-field-template/custom-field-template.php:98
20
- #: custom-field-template/custom-field-template.php:99
21
- #: custom-field-template/custom-field-template.php:429
22
- #: custom-field-template/custom-field-template.php:551
23
- #: custom-field-template/custom-field-template.php:1324
24
- #: custom-field-template/custom-field-template.php:1444
25
  msgid "Custom Field Template"
26
  msgstr "Custom Field Template"
27
 
28
- #: custom-field-template/custom-field-template.php:138
29
- #: custom-field-template/custom-field-template.php:1494
30
  msgid "Load"
31
  msgstr "Carica"
32
 
33
- #: custom-field-template/custom-field-template.php:287
34
  msgid "read more"
35
  msgstr "prosegui"
36
 
37
- #: custom-field-template/custom-field-template.php:305
38
- #: custom-field-template/custom-field-template.php:315
39
  msgid "Custom Fields"
40
  msgstr "Campi personalizzati"
41
 
42
- #: custom-field-template/custom-field-template.php:345
43
  msgid "Settings"
44
  msgstr "Impostazioni"
45
 
46
- #: custom-field-template/custom-field-template.php:357
47
  msgid "Default Template"
48
  msgstr "Template predefinito"
49
 
50
- #: custom-field-template/custom-field-template.php:492
51
  #: custom-field-template/custom-field-template.php:496
52
- #: custom-field-template/custom-field-template.php:508
53
- #: custom-field-template/custom-field-template.php:516
54
- #: custom-field-template/custom-field-template.php:530
 
55
  msgid "Options updated."
56
  msgstr "Le opzioni sono state aggiornate."
57
 
58
- #: custom-field-template/custom-field-template.php:534
59
  msgid "Value Counts rebuilt."
60
  msgstr "Value Counts rigenerati. "
61
 
62
- #: custom-field-template/custom-field-template.php:539
63
  msgid "Options resetted."
64
  msgstr "Le opzioni sono state ripristinate."
65
 
66
- #: custom-field-template/custom-field-template.php:543
67
  msgid "Options deleted."
68
  msgstr "Le opzioni sini state cancellate:"
69
 
70
- #: custom-field-template/custom-field-template.php:557
71
- #: custom-field-template/custom-field-template.php:629
72
- #: custom-field-template/custom-field-template.php:648
73
- #: custom-field-template/custom-field-template.php:677
74
- #: custom-field-template/custom-field-template.php:708
75
- #: custom-field-template/custom-field-template.php:741
76
- #: custom-field-template/custom-field-template.php:761
77
- #: custom-field-template/custom-field-template.php:857
78
- #: custom-field-template/custom-field-template.php:873
79
- #: custom-field-template/custom-field-template.php:889
80
  msgid "Click to toggle"
81
  msgstr "Clicca per commutare"
82
 
83
- #: custom-field-template/custom-field-template.php:558
84
  msgid "Custom Field Template Options"
85
  msgstr "Opzioni template campi personalizzati"
86
 
87
- #: custom-field-template/custom-field-template.php:568
88
  msgid "Template Title"
89
  msgstr "Nome del template:"
90
 
91
- #: custom-field-template/custom-field-template.php:570
92
  msgid "Template Instruction"
93
  msgstr "Allestimento template"
94
 
95
- #: custom-field-template/custom-field-template.php:572
96
  msgid "Post Type"
97
  msgstr "Tipo di articolo"
98
 
99
- #: custom-field-template/custom-field-template.php:574
100
  msgid "Both"
101
  msgstr "Entrambi"
102
 
103
- #: custom-field-template/custom-field-template.php:575
104
  msgid "Post"
105
  msgstr "Articolo"
106
 
107
- #: custom-field-template/custom-field-template.php:576
108
  msgid "Page"
109
  msgstr "Pagina"
110
 
111
- #: custom-field-template/custom-field-template.php:577
112
- #: custom-field-template/custom-field-template.php:723
113
  msgid "Category ID (comma-deliminated)"
114
  msgstr "ID categoria (separa con una virgola)"
115
 
116
- #: custom-field-template/custom-field-template.php:579
117
  msgid "Template Content"
118
  msgstr "Contenuti template"
119
 
120
- #: custom-field-template/custom-field-template.php:586
121
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
122
  msgstr "Nel caso in cui desiderassi inserire più immagini contemporaneamente utilizza i pulsanti media del campo personalizzato"
123
 
124
- #: custom-field-template/custom-field-template.php:587
125
  msgid "Use multiple image inset"
126
  msgstr "Inserisci più immagini contemporaneamente"
127
 
128
- #: custom-field-template/custom-field-template.php:587
129
  msgid "Caution:"
130
  msgstr "Attenzione:"
131
 
132
- #: custom-field-template/custom-field-template.php:587
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 "E' necessario modificare `wp-admin/includes/media.php`. Cancella o disabilita il codice nella funzione media_send_to_editor."
135
 
136
- #: custom-field-template/custom-field-template.php:591
137
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
138
  msgstr "Nel caso in cui desiderassi sostituire le chiavi personalizzate con le etichette qualora fosse stato impostato `label`"
139
 
140
- #: custom-field-template/custom-field-template.php:592
141
  msgid "Use labels in place of custom keys"
142
  msgstr "Utilizza le etichette al posto delle chiavi personalizzate"
143
 
144
- #: custom-field-template/custom-field-template.php:595
145
  msgid "In case that you would like to add p and br tags in textareas automatically"
146
  msgstr "Nel caso in cui desiderassi aggiungere automaticamente i tag p e br nell'area di testo"
147
 
148
- #: custom-field-template/custom-field-template.php:596
149
  msgid "Use wpautop function"
150
  msgstr "Usa funzione wpautop"
151
 
152
- #: custom-field-template/custom-field-template.php:600
153
  msgid "In case that you would like to save values automatically in switching templates"
154
  msgstr "Nel caso in cui desiderassi salvare automaticamente i valori durante il cambio dei template"
155
 
156
- #: custom-field-template/custom-field-template.php:601
157
  msgid "Use the auto save in switching templates"
158
  msgstr "Salva in automatico al cambio dei template"
159
 
160
- #: custom-field-template/custom-field-template.php:605
161
  msgid "In case that you would like to forbid to use the default custom fields."
162
  msgstr "Nel caso in cui desiderassi impedire l'utilizzo dei campi personalizzati predefiniti."
163
 
164
- #: custom-field-template/custom-field-template.php:606
165
  msgid "Disable the default custom fields"
166
  msgstr "Disattiva i campi personalizzati predefiniti"
167
 
168
- #: custom-field-template/custom-field-template.php:610
169
  msgid "In case that you would like to forbid to use the quick edit."
170
  msgstr "Nel caso in cui desiderassi impedire l'utilizzo dell'editor veloce."
171
 
172
- #: custom-field-template/custom-field-template.php:611
173
  msgid "Disable the quick edit"
174
  msgstr "Disattiva l'editor veloce"
175
 
176
- #: custom-field-template/custom-field-template.php:615
177
  msgid "In case that you would like to replace the box title with the template title."
178
  msgstr "Nel caso in cui desiderassi sostituire il titolo della casella con il titolo del template."
179
 
180
- #: custom-field-template/custom-field-template.php:616
181
  msgid "Replace the box title"
182
  msgstr "Sostituisci il titolo della casella"
183
 
184
- #: custom-field-template/custom-field-template.php:620
185
- #: custom-field-template/custom-field-template.php:639
186
- #: custom-field-template/custom-field-template.php:668
187
- #: custom-field-template/custom-field-template.php:699
188
- #: custom-field-template/custom-field-template.php:732
 
 
 
 
 
 
 
 
189
  msgid "Update Options &raquo;"
190
  msgstr "Aggiorna le opzioni &raquo;"
191
 
192
- #: custom-field-template/custom-field-template.php:630
193
  msgid "ADMIN CSS"
194
  msgstr "CSS AMMINISTRAZIONE"
195
 
196
- #: custom-field-template/custom-field-template.php:649
197
  msgid "[cft] and [cftsearch] Shortcode Format"
198
  msgstr "Formato Shortcode [cft] e [cftsearch]"
199
 
200
- #: custom-field-template/custom-field-template.php:652
201
  msgid "For [cft], [key] will be converted into the value of [key]."
202
  msgstr "[key] verrà convertito nel valore di [key]."
203
 
204
- #: custom-field-template/custom-field-template.php:653
205
  msgid "For [cftsearch], [key] will be converted into the input field."
206
  msgstr "[cftsearch], [key] verrà convertito nell'input del campo."
207
 
208
- #: custom-field-template/custom-field-template.php:662
209
- #: custom-field-template/custom-field-template.php:726
210
  msgid "Use PHP"
211
  msgstr "Usa PHP"
212
 
213
- #: custom-field-template/custom-field-template.php:678
214
  msgid "PHP CODE (Experimental Option)"
215
  msgstr "CODICE PHP CODE (opzione sperimentale)"
216
 
217
- #: custom-field-template/custom-field-template.php:680
218
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
219
  msgstr "Sei certo di volere salvare dei codici PHP? Se sì, fallo a tuo rischio."
220
 
221
- #: custom-field-template/custom-field-template.php:681
222
  msgid "For `text` and `textarea`, you must set $value as an string."
223
  msgstr "`text` e `textarea`, dovrai impostare come stringa $value."
224
 
225
- #: custom-field-template/custom-field-template.php:683
226
  msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
227
  msgstr "`checkbox`, `radio`, e `select`, dovrai impostare come array $values."
228
 
229
- #: custom-field-template/custom-field-template.php:709
230
  msgid "Auto Hook of `the_content()` (Experimental Option)"
231
  msgstr "Hook automatico di `the_content()` (opzione sperimentale)"
232
 
233
- #: custom-field-template/custom-field-template.php:719
234
  msgid "Position"
235
  msgstr "Posizione"
236
 
237
- #: custom-field-template/custom-field-template.php:720
238
  msgid "Before the conetnt"
239
  msgstr "Davanti ai contenuti"
240
 
241
- #: custom-field-template/custom-field-template.php:721
242
  msgid "After the conetnt"
243
  msgstr "A seguire i contenuti"
244
 
245
- #: custom-field-template/custom-field-template.php:725
246
  msgid "Content"
247
  msgstr "Contenuti"
248
 
249
- #: custom-field-template/custom-field-template.php:742
250
  msgid "Rebuild Value Counts"
251
  msgstr "Rigenera Value Counts"
252
 
253
- #: custom-field-template/custom-field-template.php:744
254
  msgid "Are you sure to rebuild all value counts?"
255
  msgstr "Sei certo di volere rigenerare tutti i value counts?"
256
 
257
- #: custom-field-template/custom-field-template.php:748
258
  msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
259
  msgstr "I Value Counts sono utilizzati per il salvataggio temporaneo dei valori per ogni chiave. Imposta dentro ai campi `valueCount = true`."
260
 
261
- #: custom-field-template/custom-field-template.php:752
262
  msgid "Rebuild Value Counts &raquo;"
263
  msgstr "Rigenera Value Counts &raquo;"
264
 
265
- #: custom-field-template/custom-field-template.php:762
266
  msgid "Option List"
267
  msgstr "Lista opzione"
268
 
269
- #: custom-field-template/custom-field-template.php:858
270
  msgid "Reset Options"
271
  msgstr "Ripristina le opzioni"
272
 
273
- #: custom-field-template/custom-field-template.php:860
274
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
275
  msgstr "Sei certo di volere ripristinare le opzioni? Le opzioni personalizzate verranno ripristinate alle predefinite."
276
 
277
- #: custom-field-template/custom-field-template.php:864
278
  msgid "Unset Options &raquo;"
279
  msgstr "Procedi &raquo;"
280
 
281
- #: custom-field-template/custom-field-template.php:874
282
  msgid "Delete Options"
283
  msgstr "Cancella le opzioni"
284
 
285
- #: custom-field-template/custom-field-template.php:876
286
  msgid "Are you sure to delete options? Options you set will be deleted."
287
  msgstr "Sei certo di volere cancellare le opzioni? Le opzioni personalizzate verranno cancellate."
288
 
289
- #: custom-field-template/custom-field-template.php:880
290
  msgid "Delete Options &raquo;"
291
  msgstr "Cancella le opzioni &raquo;"
292
 
293
- #: custom-field-template/custom-field-template.php:890
294
  msgid "Donation"
295
  msgstr "Fai una donazione"
296
 
297
- #: custom-field-template/custom-field-template.php:892
298
  msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
299
  msgstr "Qualora avesi gradito questo plugin, effettua una donazione via paypal! Grazie."
300
 
301
- #: custom-field-template/custom-field-template.php:1055
302
  msgid "Clear"
303
  msgstr "Pulisci"
304
 
305
- #: custom-field-template/custom-field-template.php:1122
306
  msgid "Select"
307
  msgstr "Seleziona"
308
 
309
- #: custom-field-template/custom-field-template.php:1180
310
  msgid "Add Media"
311
  msgstr "Aggiungi media"
312
 
313
- #: custom-field-template/custom-field-template.php:1182
314
  msgid "Add an Image"
315
  msgstr "Aggiungi immagine"
316
 
317
- #: custom-field-template/custom-field-template.php:1184
318
  msgid "Add Video"
319
  msgstr "Aggiungi video"
320
 
321
- #: custom-field-template/custom-field-template.php:1186
322
  msgid "Add Audio"
323
  msgstr "Aggiungi audio"
324
 
325
- #: custom-field-template/custom-field-template.php:1197
326
  msgid "Toggle"
327
  msgstr "Commuta"
328
 
329
- #: custom-field-template/custom-field-template.php:1521
330
  msgid "Save"
331
  msgstr "Salva"
332
 
333
- #: custom-field-template/custom-field-template.php:1828
334
  msgid "Search &raquo;"
335
  msgstr "Cerca &raquo;"
336
 
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template in italiano\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 11:39+0100\n"
7
  "Last-Translator: Gianni Diurno (aka gidibao) <gidibao@gmail.com>\n"
8
  "Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\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: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 "Custom Field Template"
27
 
28
+ #: custom-field-template/custom-field-template.php:141
29
+ #: custom-field-template/custom-field-template.php:1503
30
  msgid "Load"
31
  msgstr "Carica"
32
 
33
+ #: custom-field-template/custom-field-template.php:290
34
  msgid "read more"
35
  msgstr "prosegui"
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 "Campi personalizzati"
41
 
42
+ #: custom-field-template/custom-field-template.php:348
43
  msgid "Settings"
44
  msgstr "Impostazioni"
45
 
46
+ #: custom-field-template/custom-field-template.php:360
47
  msgid "Default Template"
48
  msgstr "Template predefinito"
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 "Le opzioni sono state aggiornate."
57
 
58
+ #: custom-field-template/custom-field-template.php:538
59
  msgid "Value Counts rebuilt."
60
  msgstr "Value Counts rigenerati. "
61
 
62
+ #: custom-field-template/custom-field-template.php:543
63
  msgid "Options resetted."
64
  msgstr "Le opzioni sono state ripristinate."
65
 
66
+ #: custom-field-template/custom-field-template.php:547
67
  msgid "Options deleted."
68
  msgstr "Le opzioni sini state cancellate:"
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 "Clicca per commutare"
82
 
83
+ #: custom-field-template/custom-field-template.php:562
84
  msgid "Custom Field Template Options"
85
  msgstr "Opzioni template campi personalizzati"
86
 
87
+ #: custom-field-template/custom-field-template.php:572
88
  msgid "Template Title"
89
  msgstr "Nome del template:"
90
 
91
+ #: custom-field-template/custom-field-template.php:574
92
  msgid "Template Instruction"
93
  msgstr "Allestimento template"
94
 
95
+ #: custom-field-template/custom-field-template.php:576
96
  msgid "Post Type"
97
  msgstr "Tipo di articolo"
98
 
99
+ #: custom-field-template/custom-field-template.php:578
100
  msgid "Both"
101
  msgstr "Entrambi"
102
 
103
+ #: custom-field-template/custom-field-template.php:579
104
  msgid "Post"
105
  msgstr "Articolo"
106
 
107
+ #: custom-field-template/custom-field-template.php:580
108
  msgid "Page"
109
  msgstr "Pagina"
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 categoria (separa con una virgola)"
115
 
116
+ #: custom-field-template/custom-field-template.php:583
117
  msgid "Template Content"
118
  msgstr "Contenuti template"
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 "Nel caso in cui desiderassi inserire più immagini contemporaneamente utilizza i pulsanti media del campo personalizzato"
123
 
124
+ #: custom-field-template/custom-field-template.php:591
125
  msgid "Use multiple image inset"
126
  msgstr "Inserisci più immagini contemporaneamente"
127
 
128
+ #: custom-field-template/custom-field-template.php:591
129
  msgid "Caution:"
130
  msgstr "Attenzione:"
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 "E' necessario modificare `wp-admin/includes/media.php`. Cancella o disabilita il codice nella funzione 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 "Nel caso in cui desiderassi sostituire le chiavi personalizzate con le etichette qualora fosse stato impostato `label`"
139
 
140
+ #: custom-field-template/custom-field-template.php:596
141
  msgid "Use labels in place of custom keys"
142
  msgstr "Utilizza le etichette al posto delle chiavi personalizzate"
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 "Nel caso in cui desiderassi aggiungere automaticamente i tag p e br nell'area di testo"
147
 
148
+ #: custom-field-template/custom-field-template.php:600
149
  msgid "Use wpautop function"
150
  msgstr "Usa funzione 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 "Nel caso in cui desiderassi salvare automaticamente i valori durante il cambio dei template"
155
 
156
+ #: custom-field-template/custom-field-template.php:605
157
  msgid "Use the auto save in switching templates"
158
  msgstr "Salva in automatico al cambio dei template"
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 "Nel caso in cui desiderassi impedire l'utilizzo dei campi personalizzati predefiniti."
163
 
164
+ #: custom-field-template/custom-field-template.php:610
165
  msgid "Disable the default custom fields"
166
  msgstr "Disattiva i campi personalizzati predefiniti"
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 "Nel caso in cui desiderassi impedire l'utilizzo dell'editor veloce."
171
 
172
+ #: custom-field-template/custom-field-template.php:615
173
  msgid "Disable the quick edit"
174
  msgstr "Disattiva l'editor veloce"
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 "Nel caso in cui desiderassi sostituire il titolo della casella con il titolo del template."
179
 
180
+ #: custom-field-template/custom-field-template.php:620
181
  msgid "Replace the box title"
182
  msgstr "Sostituisci il titolo della casella"
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 "Nel caso in cui desiderassi utilizzare lo shortcode nel widget"
187
+
188
+ #: custom-field-template/custom-field-template.php:625
189
+ msgid "Use the shortcode in the widget"
190
+ msgstr "Utilizza lo shortcode nel widget"
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 &raquo;"
198
  msgstr "Aggiorna le opzioni &raquo;"
199
 
200
+ #: custom-field-template/custom-field-template.php:639
201
  msgid "ADMIN CSS"
202
  msgstr "CSS AMMINISTRAZIONE"
203
 
204
+ #: custom-field-template/custom-field-template.php:658
205
  msgid "[cft] and [cftsearch] Shortcode Format"
206
  msgstr "Formato Shortcode [cft] e [cftsearch]"
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 "[key] verrà convertito nel valore di [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] verrà convertito nell'input del campo."
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 "Usa PHP"
220
 
221
+ #: custom-field-template/custom-field-template.php:687
222
  msgid "PHP CODE (Experimental Option)"
223
  msgstr "CODICE PHP CODE (opzione sperimentale)"
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 "Sei certo di volere salvare dei codici PHP? Se sì, fallo a tuo rischio."
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` e `textarea`, dovrai impostare come stringa $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`, e `select`, dovrai impostare come array $values."
236
 
237
+ #: custom-field-template/custom-field-template.php:718
238
  msgid "Auto Hook of `the_content()` (Experimental Option)"
239
  msgstr "Hook automatico di `the_content()` (opzione sperimentale)"
240
 
241
+ #: custom-field-template/custom-field-template.php:728
242
  msgid "Position"
243
  msgstr "Posizione"
244
 
245
+ #: custom-field-template/custom-field-template.php:729
246
  msgid "Before the conetnt"
247
  msgstr "Davanti ai contenuti"
248
 
249
+ #: custom-field-template/custom-field-template.php:730
250
  msgid "After the conetnt"
251
  msgstr "A seguire i contenuti"
252
 
253
+ #: custom-field-template/custom-field-template.php:734
254
  msgid "Content"
255
  msgstr "Contenuti"
256
 
257
+ #: custom-field-template/custom-field-template.php:751
258
  msgid "Rebuild Value Counts"
259
  msgstr "Rigenera Value Counts"
260
 
261
+ #: custom-field-template/custom-field-template.php:753
262
  msgid "Are you sure to rebuild all value counts?"
263
  msgstr "Sei certo di volere rigenerare tutti i value counts?"
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 "I Value Counts sono utilizzati per il salvataggio temporaneo dei valori per ogni chiave. Imposta dentro ai campi `valueCount = true`."
268
 
269
+ #: custom-field-template/custom-field-template.php:761
270
  msgid "Rebuild Value Counts &raquo;"
271
  msgstr "Rigenera Value Counts &raquo;"
272
 
273
+ #: custom-field-template/custom-field-template.php:771
274
  msgid "Option List"
275
  msgstr "Lista opzione"
276
 
277
+ #: custom-field-template/custom-field-template.php:867
278
  msgid "Reset Options"
279
  msgstr "Ripristina le opzioni"
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 "Sei certo di volere ripristinare le opzioni? Le opzioni personalizzate verranno ripristinate alle predefinite."
284
 
285
+ #: custom-field-template/custom-field-template.php:873
286
  msgid "Unset Options &raquo;"
287
  msgstr "Procedi &raquo;"
288
 
289
+ #: custom-field-template/custom-field-template.php:883
290
  msgid "Delete Options"
291
  msgstr "Cancella le opzioni"
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 "Sei certo di volere cancellare le opzioni? Le opzioni personalizzate verranno cancellate."
296
 
297
+ #: custom-field-template/custom-field-template.php:889
298
  msgid "Delete Options &raquo;"
299
  msgstr "Cancella le opzioni &raquo;"
300
 
301
+ #: custom-field-template/custom-field-template.php:899
302
  msgid "Donation"
303
  msgstr "Fai una donazione"
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 "Qualora avesi gradito questo plugin, effettua una donazione via paypal! Grazie."
308
 
309
+ #: custom-field-template/custom-field-template.php:1064
310
  msgid "Clear"
311
  msgstr "Pulisci"
312
 
313
+ #: custom-field-template/custom-field-template.php:1131
314
  msgid "Select"
315
  msgstr "Seleziona"
316
 
317
+ #: custom-field-template/custom-field-template.php:1189
318
  msgid "Add Media"
319
  msgstr "Aggiungi media"
320
 
321
+ #: custom-field-template/custom-field-template.php:1191
322
  msgid "Add an Image"
323
  msgstr "Aggiungi immagine"
324
 
325
+ #: custom-field-template/custom-field-template.php:1193
326
  msgid "Add Video"
327
  msgstr "Aggiungi video"
328
 
329
+ #: custom-field-template/custom-field-template.php:1195
330
  msgid "Add Audio"
331
  msgstr "Aggiungi audio"
332
 
333
+ #: custom-field-template/custom-field-template.php:1206
334
  msgid "Toggle"
335
  msgstr "Commuta"
336
 
337
+ #: custom-field-template/custom-field-template.php:1530
338
  msgid "Save"
339
  msgstr "Salva"
340
 
341
+ #: custom-field-template/custom-field-template.php:1837
342
  msgid "Search &raquo;"
343
  msgstr "Cerca &raquo;"
344
 
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.8
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
@@ -33,6 +33,8 @@ class custom_field_template {
33
  add_filter( 'the_content', array(&$this, 'custom_field_template_the_content') );
34
 
35
  if ( $_REQUEST['cftsearch_submit'] ) :
 
 
36
  add_filter( 'posts_join', array(&$this, 'custom_field_template_posts_join') );
37
  add_filter( 'posts_where', array(&$this, 'custom_field_template_posts_where') );
38
  add_filter( 'posts_orderby', array(&$this, 'custom_field_template_posts_orderby' ) );
@@ -857,6 +859,9 @@ hideKey = true<br />
857
  <tr>
858
  <th>valueCount</th><td>valueCount = true</td><td>valueCount = true</td><td>valueCount = true</td><td>valueCount = true</td><td>valueCount = true</td>
859
  </tr>
 
 
 
860
  </tbody>
861
  </table>
862
  </div>
@@ -949,7 +954,8 @@ jQuery(this).addClass("closed");
949
  return $custom_fields;
950
  }
951
 
952
- function make_textfield( $name, $sid, $size = 25, $default, $hideKey, $label, $code, $class ) {
 
953
  $options = $this->get_custom_field_template_data();
954
 
955
  $title = $name;
@@ -978,6 +984,13 @@ jQuery(this).addClass("closed");
978
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
979
  $title = stripcslashes($label);
980
 
 
 
 
 
 
 
 
981
  $out .=
982
  '<dl>' .
983
  '<dt><span' . $hide . '>' . $title . '</span></dt>' .
@@ -985,12 +998,13 @@ jQuery(this).addClass("closed");
985
 
986
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
987
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
988
- $out .= '<input id="' . $name . '" name="' . $name . '[]" value="' . attribute_escape($value) . '" type="text" size="' . $size . '"' . $class . ' /></dd>' .
989
  '</dl>';
990
  return $out;
991
  }
992
 
993
- function make_checkbox( $name, $sid, $value, $valueLabel, $checked, $hideKey, $label, $code, $class ) {
 
994
  $options = $this->get_custom_field_template_data();
995
 
996
  $title = $name;
@@ -1012,6 +1026,13 @@ jQuery(this).addClass("closed");
1012
 
1013
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1014
  $title = stripcslashes($label);
 
 
 
 
 
 
 
1015
 
1016
  $out .=
1017
  '<dl>' .
@@ -1020,7 +1041,7 @@ jQuery(this).addClass("closed");
1020
 
1021
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1022
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1023
- $out .= '<label for="' . $id . '" class="selectit"><input name="' . $name . '[' . $sid . ']" value="' . attribute_escape($value) . '" ' . $checked . ' type="checkbox"' . $class . ' /> ';
1024
  if ( $valueLabel )
1025
  $out .= stripcslashes($valueLabel);
1026
  else
@@ -1032,7 +1053,8 @@ jQuery(this).addClass("closed");
1032
  return $out;
1033
  }
1034
 
1035
- function make_radio( $name, $sid, $values, $valueLabel, $clearButton, $default, $hideKey, $label, $code, $class ) {
 
1036
  $options = $this->get_custom_field_template_data();
1037
 
1038
  $title = $name;
@@ -1055,6 +1077,13 @@ jQuery(this).addClass("closed");
1055
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1056
  $title = stripcslashes($label);
1057
 
 
 
 
 
 
 
 
1058
  $out .=
1059
  '<dl>' .
1060
  '<dt><span' . $hide . '>' . $title . '</span>';
@@ -1078,7 +1107,7 @@ jQuery(this).addClass("closed");
1078
  $checked = ( trim( $val ) == trim( $selected ) ) ? 'checked="checked"' : '';
1079
 
1080
  $out .=
1081
- '<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . ']" value="' . attribute_escape($val) . '" ' . $checked . ' type="radio"' . $class . ' /> ';
1082
  if ( $valueLabel[$i] )
1083
  $out .= stripcslashes($valueLabel[$i]);
1084
  else
@@ -1091,7 +1120,8 @@ jQuery(this).addClass("closed");
1091
  return $out;
1092
  }
1093
 
1094
- function make_select( $name, $sid, $values, $valueLabel, $default, $hideKey, $label, $code, $class, $selectLabel ) {
 
1095
  $options = $this->get_custom_field_template_data();
1096
 
1097
  $title = $name;
@@ -1115,7 +1145,14 @@ jQuery(this).addClass("closed");
1115
 
1116
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1117
  $title = stripcslashes($label);
1118
-
 
 
 
 
 
 
 
1119
  $out .=
1120
  '<dl>' .
1121
  '<dt><span' . $hide . '>' . $title . '</span></dt>' .
@@ -1123,7 +1160,7 @@ jQuery(this).addClass("closed");
1123
 
1124
  if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1125
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1126
- $out .= '<select name="' . $name . '[]"' . $class . '>';
1127
 
1128
  if ( $selectLabel )
1129
  $out .= '<option value="" >' . stripcslashes(trim($selectLabel)) . '</option>';
@@ -1147,7 +1184,8 @@ jQuery(this).addClass("closed");
1147
  return $out;
1148
  }
1149
 
1150
- function make_textarea( $name, $sid, $rows, $cols, $tinyMCE, $htmlEditor, $mediaButton, $default, $hideKey, $label, $code, $class ) {
 
1151
  $options = $this->get_custom_field_template_data();
1152
 
1153
  global $wp_version;
@@ -1218,6 +1256,13 @@ EOF;
1218
 
1219
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1220
  $title = stripcslashes($label);
 
 
 
 
 
 
 
1221
 
1222
  $out .=
1223
  '<dl>' .
@@ -1234,7 +1279,7 @@ EOF;
1234
  $editorcontainer_class .= ' class="editorcontainer"';
1235
  endif;
1236
 
1237
- $out .= '<div' . $editorcontainer_class . ' id="editorcontainer_' . $name . $rand . '"><textarea id="' . $name . $rand . '" name="' . $name . '[' . $sid . ']" rows="' .$rows. '" cols="' . $cols . '" style="color:#000000"' . $content_class . '>' . attribute_escape($value) . '</textarea><input type="hidden" name="'.$name.'_rand['.$sid.']" value="'.$rand.'" /></div>';
1238
  if ( $htmlEditor == true ) $out .= '</div>';
1239
  $out .= '</dd></dl>';
1240
 
@@ -1259,7 +1304,7 @@ EOF;
1259
  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')) )
1260
  return;
1261
  endif;
1262
-
1263
  if ( $options['custom_fields'][$id]['category'] && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php')) )
1264
  return;
1265
 
@@ -1284,26 +1329,31 @@ EOF;
1284
  $out .= '</div><div' . $class . '>';
1285
  }
1286
  else if( $data[$i]['type'] == 'textfield' || $data[$i]['type'] == 'text' ) {
1287
- $out .= $this->make_textfield( $title, $i, $data[$i]['size'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'] );
 
1288
  }
1289
  else if( $data[$i]['type'] == 'checkbox' ) {
1290
  $out .=
1291
- $this->make_checkbox( $title, $i, $data[$i]['value'], $data[$i]['valueLabel'], $data[$i]['checked'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'] );
 
1292
  }
1293
  else if( $data[$i]['type'] == 'radio' ) {
1294
  $out .=
1295
  $this->make_radio(
1296
- $title, $i, explode( '#', $data[$i]['value'] ), explode( '#', $data[$i]['valueLabel'] ), $data[$i]['clearButton'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'] );
 
1297
  }
1298
  else if( $data[$i]['type'] == 'select' ) {
1299
  $out .=
1300
  $this->make_select(
1301
- $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'] );
 
1302
  }
1303
  else if( $data[$i]['type'] == 'textarea' ) {
1304
  if ( $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i] ) $data[$i]['rows'] = $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i];
1305
  $out .=
1306
- $this->make_textarea( $title, $i, $data[$i]['rows'], $data[$i]['cols'], $data[$i]['tinyMCE'], $data[$i]['htmlEditor'], $data[$i]['mediaButton'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'] );
 
1307
  }
1308
  }
1309
  }
@@ -1559,8 +1609,11 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1559
  if( !wp_verify_nonce($_REQUEST['custom-field-template-verify-key'], 'custom-field-template') )
1560
  return $id;
1561
 
1562
- if ( !isset($_REQUEST['custom-field-template-id']) )
 
 
1563
  return $id;
 
1564
 
1565
  $fields = $this->get_custom_fields($_REQUEST['custom-field-template-id']);
1566
 
@@ -1755,10 +1808,18 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1755
  $fields = $this->get_custom_fields( $i );
1756
  foreach ( $fields as $key => $val ) :
1757
  if ( count($data[$key]) > 1 ) :
1758
- if ( $val[0]['sort'] == 'asc' )
1759
  sort($data[$key]);
1760
- elseif ( $val[0]['sort'] == 'desc' )
1761
  rsort($data[$key]);
 
 
 
 
 
 
 
 
1762
  $replace_val = '<ul>';
1763
  foreach ( $data[$key] as $val2 ) :
1764
  $value = $val2;
@@ -1794,10 +1855,18 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1794
  foreach ( $fields as $key => $val ) :
1795
  $values = get_post_meta( $post_id, $key );
1796
  if ($values):
1797
- if ( $val[0]['sort'] == 'asc' )
1798
  sort($values);
1799
- elseif ( $val[0]['sort'] == 'desc' )
1800
  rsort($values);
 
 
 
 
 
 
 
 
1801
  foreach ( $val as $key2 => $val2 ) :
1802
  $hide = '';
1803
  if ( $val2['output'] == true ) :
@@ -1847,7 +1916,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1847
  for ($i=0;$i<$count;$i++) :
1848
  $fields = $this->get_custom_fields( $i );
1849
  foreach ( $fields as $key => $val ) :
1850
-
1851
  $replace[0] = $val;
1852
 
1853
  $search = array();
@@ -1855,6 +1924,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1855
  if($val[0]['searchValue']) eval('$search["value"] =' . stripslashes($val[0]['searchValue']));
1856
  if($val[0]['searchOperator']) eval('$search["operator"] =' . stripslashes($val[0]['searchOperator']));
1857
  if($val[0]['searchValueLabel']) eval('$search["valueLabel"] =' . stripslashes($val[0]['searchValueLabel']));
 
1858
 
1859
  foreach ( $search as $skey => $sval ) :
1860
  $j = 1;
@@ -1862,7 +1932,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1862
  $replace[$j][0][$skey] = $sval2;
1863
  $j++;
1864
  endforeach;
1865
- endforeach;
1866
 
1867
  foreach( $replace as $rkey => $rval ) :
1868
  $replace_val[$rkey] = "";
@@ -1872,7 +1942,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1872
  case 'textfield':
1873
  case 'textarea':
1874
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
1875
- $replace_val[$rkey] .= '<input type="text" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($_REQUEST['cftsearch'][urlencode($key)]) . '"' . $class . ' />';
1876
  break;
1877
  case 'checkbox':
1878
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
@@ -1885,17 +1955,30 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1885
  else :
1886
  $values = explode( '#', $rval[0]['value'] );
1887
  $valueLabels = explode( '#', $rval[0]['valueLabel'] );
 
1888
  endif;
1889
  if ( count($values) > 1 ) :
1890
  $replace_val[$rkey] .= '<ul>';
1891
  $j=0;
1892
  foreach( $values as $metavalue ) :
1893
- $replace_val[$rkey] .= '<li><input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metavalue) . '"' . $class . ' /> ';
 
 
 
 
 
 
 
 
 
 
 
1894
  if ( $valueLabels[$j] ) $replace_val[$rkey] .= stripcslashes($valueLabels[$j]);
1895
  else $replace_val[$rkey] .= stripcslashes($metavalue);
1896
  $replace_val[$rkey] .= '</li>';
1897
  $j++;
1898
  endforeach;
 
1899
  else :
1900
  $replace_val[$rkey] .= '<input type="checkbox" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape(trim($values[0])) . '"' . $class . ' /> ';
1901
  if ( $valueLabel[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[0]));
@@ -1906,17 +1989,28 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1906
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
1907
  $values = explode( '#', $rval[0]['value'] );
1908
  $valueLabels = explode( '#', $rval[0]['valueLabel'] );
 
1909
  if ( count($values) > 1 ) :
1910
  $replace_val[$rkey] .= '<ul>';
1911
  $j=0;
1912
- foreach ( $values as $metaval ) :
1913
- $metaval = trim($metaval);
1914
- $replace_val[$rkey] .= '<li><input type="radio" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($metaval) . '"' . $class . ' /> ';
 
 
 
 
 
 
 
 
 
1915
  if ( $valueLabels[$j] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[$j]));
1916
- else $replace_val[$rkey] .= stripcslashes($metaval);
1917
  $replace_val[$rkey] .= '</li>';
1918
  $j++;
1919
  endforeach;
 
1920
  else :
1921
  $replace_val[$rkey] .= '<input type="radio" name="cftsearch[' . urlencode($key) . '][]" value="' . attribute_escape(trim($values[0])) . '"' . $class . ' /> ';
1922
  if ( $valueLabels[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabels[0]));
@@ -1927,12 +2021,16 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1927
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
1928
  $values = explode( '#', $rval[0]['value'] );
1929
  $valueLabels = explode( '#', $rval[0]['valueLabel'] );
 
1930
  $replace_val[$rkey] .= '<select name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]"' . $class . '>';
1931
  $replace_val[$rkey] .= '<option value=""></option>';
1932
  $j=0;
1933
  foreach ( $values as $metaval ) :
1934
  $metaval = trim($metaval);
1935
- if ( $_REQUEST['cftsearch'][urlencode($key)] == $metaval ) $selected = ' selected="selected"';
 
 
 
1936
  else $selected = "";
1937
  $replace_val[$rkey] .= '<option value="' . attribute_escape($metaval) . '"' . $selected . '>';
1938
  if ( $valueLabels[$j] )
@@ -2105,6 +2203,8 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2105
  endif;
2106
  $where .= " AND " . $wpdb->posts . ".post_type = 'post'";
2107
  endif;
 
 
2108
 
2109
  return $where;
2110
  }
@@ -2225,6 +2325,21 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
2225
  endif;
2226
  update_option('custom_field_template_data', $options);
2227
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2228
  }
2229
 
2230
  $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.1
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
33
  add_filter( 'the_content', array(&$this, 'custom_field_template_the_content') );
34
 
35
  if ( $_REQUEST['cftsearch_submit'] ) :
36
+ if ( $_REQUEST['limit'] )
37
+ add_action( 'post_limits', array(&$this, 'custom_field_template_post_limits'));
38
  add_filter( 'posts_join', array(&$this, 'custom_field_template_posts_join') );
39
  add_filter( 'posts_where', array(&$this, 'custom_field_template_posts_where') );
40
  add_filter( 'posts_orderby', array(&$this, 'custom_field_template_posts_orderby' ) );
859
  <tr>
860
  <th>valueCount</th><td>valueCount = true</td><td>valueCount = true</td><td>valueCount = true</td><td>valueCount = true</td><td>valueCount = true</td>
861
  </tr>
862
+ <tr>
863
+ <th>JavaScript Event Handlers</th><td>onclick = alert('ok');</td><td>onchange = alert('ok');</td><td>onchange = alert('ok');</td><td>onchange = alert('ok');</td><td>onfocus = alert('ok');</td>
864
+ </tr>
865
  </tbody>
866
  </table>
867
  </div>
954
  return $custom_fields;
955
  }
956
 
957
+ function make_textfield( $name, $sid, $size = 25, $default, $hideKey, $label, $code, $class,
958
+ $onclick, $ondblclick, $onkeydown, $onkeypress, $onkeyup, $onmousedown, $onmouseup, $onmouseover, $onmouseout, $onmousemove, $onfocus, $onblur, $onchange, $onselect ) {
959
  $options = $this->get_custom_field_template_data();
960
 
961
  $title = $name;
984
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
985
  $title = stripcslashes($label);
986
 
987
+ $event = array('onclick' => $onclick, 'ondblclick' => $ondblclick, 'onkeydown' => $onkeydown, 'onkeypress' => $onkeypress, 'onkeyup' => $onkeyup, 'onmousedown' => $onmousedown, 'onmouseup' => $onmouseup, 'onmouseover' => $onmouseover, 'onmouseout' => $onmouseout, 'onmousemove' => $onmousemove, 'onfocus' => $onfocus, 'onblur' => $onblur, 'onchange' => $onchange, 'onselect' => $onselect);
988
+ $event_output = "";
989
+ foreach($event as $key => $val) :
990
+ if ( $val )
991
+ $event_output .= " " . $key . '="' . stripcslashes($val) . '"';
992
+ endforeach;
993
+
994
  $out .=
995
  '<dl>' .
996
  '<dt><span' . $hide . '>' . $title . '</span></dt>' .
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
  }
1005
 
1006
+ function make_checkbox( $name, $sid, $value, $valueLabel, $checked, $hideKey, $label, $code, $class,
1007
+ $onclick, $ondblclick, $onkeydown, $onkeypress, $onkeyup, $onmousedown, $onmouseup, $onmouseover, $onmouseout, $onmousemove, $onfocus, $onblur, $onchange, $onselect ) {
1008
  $options = $this->get_custom_field_template_data();
1009
 
1010
  $title = $name;
1026
 
1027
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1028
  $title = stripcslashes($label);
1029
+
1030
+ $event = array('onclick' => $onclick, 'ondblclick' => $ondblclick, 'onkeydown' => $onkeydown, 'onkeypress' => $onkeypress, 'onkeyup' => $onkeyup, 'onmousedown' => $onmousedown, 'onmouseup' => $onmouseup, 'onmouseover' => $onmouseover, 'onmouseout' => $onmouseout, 'onmousemove' => $onmousemove, 'onfocus' => $onfocus, 'onblur' => $onblur, 'onchange' => $onchange, 'onselect' => $onselect);
1031
+ $event_output = "";
1032
+ foreach($event as $key => $val) :
1033
+ if ( $val )
1034
+ $event_output .= " " . $key . '="' . stripcslashes($val) . '"';
1035
+ endforeach;
1036
 
1037
  $out .=
1038
  '<dl>' .
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
1053
  return $out;
1054
  }
1055
 
1056
+ function make_radio( $name, $sid, $values, $valueLabel, $clearButton, $default, $hideKey, $label, $code, $class,
1057
+ $onclick, $ondblclick, $onkeydown, $onkeypress, $onkeyup, $onmousedown, $onmouseup, $onmouseover, $onmouseout, $onmousemove, $onfocus, $onblur, $onchange, $onselect ) {
1058
  $options = $this->get_custom_field_template_data();
1059
 
1060
  $title = $name;
1077
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1078
  $title = stripcslashes($label);
1079
 
1080
+ $event = array('onclick' => $onclick, 'ondblclick' => $ondblclick, 'onkeydown' => $onkeydown, 'onkeypress' => $onkeypress, 'onkeyup' => $onkeyup, 'onmousedown' => $onmousedown, 'onmouseup' => $onmouseup, 'onmouseover' => $onmouseover, 'onmouseout' => $onmouseout, 'onmousemove' => $onmousemove, 'onfocus' => $onfocus, 'onblur' => $onblur, 'onchange' => $onchange, 'onselect' => $onselect);
1081
+ $event_output = "";
1082
+ foreach($event as $key => $val) :
1083
+ if ( $val )
1084
+ $event_output .= " " . $key . '="' . stripcslashes($val) . '"';
1085
+ endforeach;
1086
+
1087
  $out .=
1088
  '<dl>' .
1089
  '<dt><span' . $hide . '>' . $title . '</span>';
1107
  $checked = ( trim( $val ) == trim( $selected ) ) ? 'checked="checked"' : '';
1108
 
1109
  $out .=
1110
+ '<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . ']" value="' . attribute_escape($val) . '" ' . $checked . ' type="radio"' . $class . $event_output . ' /> ';
1111
  if ( $valueLabel[$i] )
1112
  $out .= stripcslashes($valueLabel[$i]);
1113
  else
1120
  return $out;
1121
  }
1122
 
1123
+ function make_select( $name, $sid, $values, $valueLabel, $default, $hideKey, $label, $code, $class, $selectLabel,
1124
+ $onclick, $ondblclick, $onkeydown, $onkeypress, $onkeyup, $onmousedown, $onmouseup, $onmouseover, $onmouseout, $onmousemove, $onfocus, $onblur, $onchange, $onselect ) {
1125
  $options = $this->get_custom_field_template_data();
1126
 
1127
  $title = $name;
1145
 
1146
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1147
  $title = stripcslashes($label);
1148
+
1149
+ $event = array('onclick' => $onclick, 'ondblclick' => $ondblclick, 'onkeydown' => $onkeydown, 'onkeypress' => $onkeypress, 'onkeyup' => $onkeyup, 'onmousedown' => $onmousedown, 'onmouseup' => $onmouseup, 'onmouseover' => $onmouseover, 'onmouseout' => $onmouseout, 'onmousemove' => $onmousemove, 'onfocus' => $onfocus, 'onblur' => $onblur, 'onchange' => $onchange, 'onselect' => $onselect);
1150
+ $event_output = "";
1151
+ foreach($event as $key => $val) :
1152
+ if ( $val )
1153
+ $event_output .= " " . $key . '="' . stripcslashes($val) . '"';
1154
+ endforeach;
1155
+
1156
  $out .=
1157
  '<dl>' .
1158
  '<dt><span' . $hide . '>' . $title . '</span></dt>' .
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>';
1184
  return $out;
1185
  }
1186
 
1187
+ function make_textarea( $name, $sid, $rows, $cols, $tinyMCE, $htmlEditor, $mediaButton, $default, $hideKey, $label, $code, $class,
1188
+ $onclick, $ondblclick, $onkeydown, $onkeypress, $onkeyup, $onmousedown, $onmouseup, $onmouseover, $onmouseout, $onmousemove, $onfocus, $onblur, $onchange, $onselect ) {
1189
  $options = $this->get_custom_field_template_data();
1190
 
1191
  global $wp_version;
1256
 
1257
  if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1258
  $title = stripcslashes($label);
1259
+
1260
+ $event = array('onclick' => $onclick, 'ondblclick' => $ondblclick, 'onkeydown' => $onkeydown, 'onkeypress' => $onkeypress, 'onkeyup' => $onkeyup, 'onmousedown' => $onmousedown, 'onmouseup' => $onmouseup, 'onmouseover' => $onmouseover, 'onmouseout' => $onmouseout, 'onmousemove' => $onmousemove, 'onfocus' => $onfocus, 'onblur' => $onblur, 'onchange' => $onchange, 'onselect' => $onselect);
1261
+ $event_output = "";
1262
+ foreach($event as $key => $val) :
1263
+ if ( $val )
1264
+ $event_output .= " " . $key . '="' . stripcslashes($val) . '"';
1265
+ endforeach;
1266
 
1267
  $out .=
1268
  '<dl>' .
1279
  $editorcontainer_class .= ' class="editorcontainer"';
1280
  endif;
1281
 
1282
+ $out .= '<div' . $editorcontainer_class . ' id="editorcontainer_' . $name . $rand . '"><textarea id="' . $name . $rand . '" name="' . $name . '[' . $sid . ']" rows="' .$rows. '" cols="' . $cols . '" style="color:#000000"' . $content_class . $event_output . '>' . attribute_escape($value) . '</textarea><input type="hidden" name="'.$name.'_rand['.$sid.']" value="'.$rand.'" /></div>';
1283
  if ( $htmlEditor == true ) $out .= '</div>';
1284
  $out .= '</dd></dl>';
1285
 
1304
  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')) )
1305
  return;
1306
  endif;
1307
+
1308
  if ( $options['custom_fields'][$id]['category'] && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php')) )
1309
  return;
1310
 
1329
  $out .= '</div><div' . $class . '>';
1330
  }
1331
  else if( $data[$i]['type'] == 'textfield' || $data[$i]['type'] == 'text' ) {
1332
+ $out .= $this->make_textfield( $title, $i, $data[$i]['size'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'],
1333
+ $data[$i]['onclick'], $data[$i]['ondblclick'], $data[$i]['onkeydown'], $data[$i]['onkeypress'], $data[$i]['onkeyup'], $data[$i]['onmousedown'], $data[$i]['onmouseup'], $data[$i]['onmouseover'], $data[$i]['onmouseout'], $data[$i]['onmousemove'], $data[$i]['onfocus'], $data[$i]['onblur'], $data[$i]['onchange'], $data[$i]['onselect'] );
1334
  }
1335
  else if( $data[$i]['type'] == 'checkbox' ) {
1336
  $out .=
1337
+ $this->make_checkbox( $title, $i, $data[$i]['value'], $data[$i]['valueLabel'], $data[$i]['checked'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'],
1338
+ $data[$i]['onclick'], $data[$i]['ondblclick'], $data[$i]['onkeydown'], $data[$i]['onkeypress'], $data[$i]['onkeyup'], $data[$i]['onmousedown'], $data[$i]['onmouseup'], $data[$i]['onmouseover'], $data[$i]['onmouseout'], $data[$i]['onmousemove'], $data[$i]['onfocus'], $data[$i]['onblur'], $data[$i]['onchange'], $data[$i]['onselect'] );
1339
  }
1340
  else if( $data[$i]['type'] == 'radio' ) {
1341
  $out .=
1342
  $this->make_radio(
1343
+ $title, $i, explode( '#', $data[$i]['value'] ), explode( '#', $data[$i]['valueLabel'] ), $data[$i]['clearButton'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'],
1344
+ $data[$i]['onclick'], $data[$i]['ondblclick'], $data[$i]['onkeydown'], $data[$i]['onkeypress'], $data[$i]['onkeyup'], $data[$i]['onmousedown'], $data[$i]['onmouseup'], $data[$i]['onmouseover'], $data[$i]['onmouseout'], $data[$i]['onmousemove'], $data[$i]['onfocus'], $data[$i]['onblur'], $data[$i]['onchange'], $data[$i]['onselect'] );
1345
  }
1346
  else if( $data[$i]['type'] == 'select' ) {
1347
  $out .=
1348
  $this->make_select(
1349
+ $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'],
1350
+ $data[$i]['onclick'], $data[$i]['ondblclick'], $data[$i]['onkeydown'], $data[$i]['onkeypress'], $data[$i]['onkeyup'], $data[$i]['onmousedown'], $data[$i]['onmouseup'], $data[$i]['onmouseover'], $data[$i]['onmouseout'], $data[$i]['onmousemove'], $data[$i]['onfocus'], $data[$i]['onblur'], $data[$i]['onchange'], $data[$i]['onselect'] );
1351
  }
1352
  else if( $data[$i]['type'] == 'textarea' ) {
1353
  if ( $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i] ) $data[$i]['rows'] = $options['tinyMCE'][$_REQUEST['post']][$this->sanitize_name($title)][$i];
1354
  $out .=
1355
+ $this->make_textarea( $title, $i, $data[$i]['rows'], $data[$i]['cols'], $data[$i]['tinyMCE'], $data[$i]['htmlEditor'], $data[$i]['mediaButton'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'],
1356
+ $data[$i]['onclick'], $data[$i]['ondblclick'], $data[$i]['onkeydown'], $data[$i]['onkeypress'], $data[$i]['onkeyup'], $data[$i]['onmousedown'], $data[$i]['onmouseup'], $data[$i]['onmouseover'], $data[$i]['onmouseout'], $data[$i]['onmousemove'], $data[$i]['onfocus'], $data[$i]['onblur'], $data[$i]['onchange'], $data[$i]['onselect'] );
1357
  }
1358
  }
1359
  }
1609
  if( !wp_verify_nonce($_REQUEST['custom-field-template-verify-key'], 'custom-field-template') )
1610
  return $id;
1611
 
1612
+ if ( !isset($_REQUEST['custom-field-template-id']) ) :
1613
+ unset($options['posts'][$id]);
1614
+ update_option('custom_field_template_data', $options);
1615
  return $id;
1616
+ endif;
1617
 
1618
  $fields = $this->get_custom_fields($_REQUEST['custom-field-template-id']);
1619
 
1808
  $fields = $this->get_custom_fields( $i );
1809
  foreach ( $fields as $key => $val ) :
1810
  if ( count($data[$key]) > 1 ) :
1811
+ if ( $val[0]['sort'] == 'asc' ) :
1812
  sort($data[$key]);
1813
+ elseif ( $val[0]['sort'] == 'desc' ) :
1814
  rsort($data[$key]);
1815
+ elseif ( $val[0]['sort'] == 'order' ) :
1816
+ $tmpdata = array();
1817
+ for( $j=0; $j<count($val); $j++) :
1818
+ if ( in_array($val[$j]['value'], $data[$key]) )
1819
+ $tmpdata[] = $val[$j]['value'];
1820
+ endfor;
1821
+ $data[$key] = $tmpdata;
1822
+ endif;
1823
  $replace_val = '<ul>';
1824
  foreach ( $data[$key] as $val2 ) :
1825
  $value = $val2;
1855
  foreach ( $fields as $key => $val ) :
1856
  $values = get_post_meta( $post_id, $key );
1857
  if ($values):
1858
+ if ( $val[0]['sort'] == 'asc' ) :
1859
  sort($values);
1860
+ elseif ( $val[0]['sort'] == 'desc' ) :
1861
  rsort($values);
1862
+ elseif ( $val[0]['sort'] == 'order' ) :
1863
+ $tmpdata = array();
1864
+ for( $j=0; $j<count($val); $j++) :
1865
+ if ( in_array($val[$j]['value'], $data[$key]) )
1866
+ $tmpdata[] = $val[$j]['value'];
1867
+ endfor;
1868
+ $values = $tmpdata;
1869
+ endif;
1870
  foreach ( $val as $key2 => $val2 ) :
1871
  $hide = '';
1872
  if ( $val2['output'] == true ) :
1916
  for ($i=0;$i<$count;$i++) :
1917
  $fields = $this->get_custom_fields( $i );
1918
  foreach ( $fields as $key => $val ) :
1919
+ unset($replace);
1920
  $replace[0] = $val;
1921
 
1922
  $search = array();
1924
  if($val[0]['searchValue']) eval('$search["value"] =' . stripslashes($val[0]['searchValue']));
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;
1932
  $replace[$j][0][$skey] = $sval2;
1933
  $j++;
1934
  endforeach;
1935
+ endforeach;
1936
 
1937
  foreach( $replace as $rkey => $rval ) :
1938
  $replace_val[$rkey] = "";
1942
  case 'textfield':
1943
  case 'textarea':
1944
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
1945
+ $replace_val[$rkey] .= '<input type="text" name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]" value="' . attribute_escape($_REQUEST['cftsearch'][urlencode($key)][$rkey][0]) . '"' . $class . ' />';
1946
  break;
1947
  case 'checkbox':
1948
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
1955
  else :
1956
  $values = explode( '#', $rval[0]['value'] );
1957
  $valueLabels = explode( '#', $rval[0]['valueLabel'] );
1958
+ $default = explode( '#', $rval[0]['default'] );
1959
  endif;
1960
  if ( count($values) > 1 ) :
1961
  $replace_val[$rkey] .= '<ul>';
1962
  $j=0;
1963
  foreach( $values as $metavalue ) :
1964
+ $checked = '';
1965
+ $metavalue = trim($metavalue);
1966
+ if ( is_array($_REQUEST['cftsearch'][urlencode($key)][$rkey]) ) :
1967
+ if ( in_array($metavalue, $_REQUEST['cftsearch'][urlencode($key)][$rkey]) )
1968
+ $checked = ' checked="checked"';
1969
+ else
1970
+ $checked = '';
1971
+ endif;
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]));
1989
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
1990
  $values = explode( '#', $rval[0]['value'] );
1991
  $valueLabels = explode( '#', $rval[0]['valueLabel'] );
1992
+ $default = explode( '#', $rval[0]['default'] );
1993
  if ( count($values) > 1 ) :
1994
  $replace_val[$rkey] .= '<ul>';
1995
  $j=0;
1996
+ foreach ( $values as $metavalue ) :
1997
+ $checked = '';
1998
+ $metavalue = trim($metavalue);
1999
+ if ( is_array($_REQUEST['cftsearch'][urlencode($key)][$rkey]) ) :
2000
+ if ( in_array($metavalue, $_REQUEST['cftsearch'][urlencode($key)][$rkey]) )
2001
+ $checked = ' checked="checked"';
2002
+ else
2003
+ $checked = '';
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]));
2021
  if ( $rval[0]['class'] ) $class = ' class="' . $rval[0]['class'] . '"';
2022
  $values = explode( '#', $rval[0]['value'] );
2023
  $valueLabels = explode( '#', $rval[0]['valueLabel'] );
2024
+ $default = explode( '#', $rval[0]['default'] );
2025
  $replace_val[$rkey] .= '<select name="cftsearch[' . urlencode($key) . '][' . $rkey . '][]"' . $class . '>';
2026
  $replace_val[$rkey] .= '<option value=""></option>';
2027
  $j=0;
2028
  foreach ( $values as $metaval ) :
2029
  $metaval = trim($metaval);
2030
+ if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][urlencode($key)][$rkey] )
2031
+ $checked = ' checked="checked"';
2032
+
2033
+ if ( $_REQUEST['cftsearch'][urlencode($key)][$rkey][0] == $metaval ) $selected = ' selected="selected"';
2034
  else $selected = "";
2035
  $replace_val[$rkey] .= '<option value="' . attribute_escape($metaval) . '"' . $selected . '>';
2036
  if ( $valueLabels[$j] )
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
  }
2325
  endif;
2326
  update_option('custom_field_template_data', $options);
2327
  }
2328
+
2329
+ function custom_field_template_post_limits($sql_limit) {
2330
+ global $wp_query;
2331
+
2332
+ if ( !$sql_limit ) return;
2333
+ list($offset, $old_limit) = explode(',', $sql_limit);
2334
+ $limit = (int)$_REQUEST['limit'];
2335
+ if ( !$limit )
2336
+ $limit = trim($old_limit);
2337
+ $wp_query->query_vars['posts_per_page'] = $limit;
2338
+ $offset = ($wp_query->query_vars['paged'] - 1) * $limit;
2339
+ if ( $offset < 0 ) $offset = 0;
2340
+
2341
+ return ( $limit ? "LIMIT $offset, $limit" : '' );
2342
+ }
2343
  }
2344
 
2345
  $custom_field_template = new custom_field_template();
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.0.8
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -31,7 +31,7 @@ The Custom Field Template plugin adds the default custom fields on the Write Pos
31
  * Adds the blank option. (`blank = true`)
32
  * Adds the break type. Set CSS of '#cft div'. (`type = break`)
33
  * Adds [cft] Shortcode Format.
34
- * Adds the sort option. (`sort = asc` or `sort = desc`)
35
  * Support for Quick Edit of custom fields. (tinyMCE and mediaButton are not supported yet)
36
  * Support for the custom field search. (only shows the attributes which have `search = true`.)
37
  * Adds [cftsearch] Shortcode Format. (under development)
@@ -45,6 +45,7 @@ The Custom Field Template plugin adds the default custom fields on the Write Pos
45
  * Adds the select option of the post type.
46
  * Adds the value count option.
47
  * Adds the option to use the shortcode in the widhet.
 
48
 
49
  Localization
50
 
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
 
31
  * Adds the blank option. (`blank = true`)
32
  * Adds the break type. Set CSS of '#cft div'. (`type = break`)
33
  * Adds [cft] Shortcode Format.
34
+ * Adds the sort option. (`sort = asc`, `sort = desc`, `sort = order`)
35
  * Support for Quick Edit of custom fields. (tinyMCE and mediaButton are not supported yet)
36
  * Support for the custom field search. (only shows the attributes which have `search = true`.)
37
  * Adds [cftsearch] Shortcode Format. (under development)
45
  * Adds the select option of the post type.
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