Version Description
- Form validation with the jQuery validatation plugin. You need to check
Use the jQuery validation
in the global settings. ex) class
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Custom Field Template |
Version | 1.8.4 |
Comparing to | |
See all releases |
Code changes from version 1.8.3 to 1.8.4
- custom-field-template-cs_CZ.mo +0 -0
- custom-field-template-cs_CZ.po +509 -0
- custom-field-template-es_ES.mo +0 -0
- custom-field-template-es_ES.po +190 -151
- custom-field-template-ja.mo +0 -0
- custom-field-template-ja.po +166 -157
- custom-field-template.php +390 -280
- custom-field-template.pot +168 -159
- js/additional-methods.js +280 -0
- js/jquery.validate.js +1159 -0
- js/messages_ca.js +23 -0
- js/messages_de.js +20 -0
- js/messages_es.js +23 -0
- js/messages_fr.js +23 -0
- js/messages_hu.js +20 -0
- js/messages_it.js +23 -0
- js/messages_ja.js +23 -0
- js/messages_nl.js +23 -0
- js/messages_ru.js +23 -0
- js/messages_tr.js +23 -0
- readme.txt +12 -5
custom-field-template-cs_CZ.mo
ADDED
Binary file
|
custom-field-template-cs_CZ.po
ADDED
@@ -0,0 +1,509 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Custom Field Template\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-08-05 23:15+0900\n"
|
6 |
+
"PO-Revision-Date: 2011-02-08 09:32+0100\n"
|
7 |
+
"Last-Translator: Jakub Machala <jakubmachala@webees.cz>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_c\n"
|
13 |
+
"X-Poedit-Basepath: ../\n"
|
14 |
+
"X-Poedit-SearchPath-0: custom-field-template\n"
|
15 |
+
|
16 |
+
#: custom-field-template/custom-field-template.php:144
|
17 |
+
#: custom-field-template/custom-field-template.php:145
|
18 |
+
#: custom-field-template/custom-field-template.php:165
|
19 |
+
#: custom-field-template/custom-field-template.php:607
|
20 |
+
#: custom-field-template/custom-field-template.php:877
|
21 |
+
#: custom-field-template/custom-field-template.php:2165
|
22 |
+
#: custom-field-template/custom-field-template.php:2301
|
23 |
+
msgid "Custom Field Template"
|
24 |
+
msgstr "Vlastní uživatelská pole"
|
25 |
+
|
26 |
+
#: custom-field-template/custom-field-template.php:183
|
27 |
+
msgid "Media Picker"
|
28 |
+
msgstr "Výběr médií"
|
29 |
+
|
30 |
+
#: custom-field-template/custom-field-template.php:185
|
31 |
+
msgid "Use this"
|
32 |
+
msgstr "Použít toto"
|
33 |
+
|
34 |
+
#: custom-field-template/custom-field-template.php:287
|
35 |
+
#: custom-field-template/custom-field-template.php:2504
|
36 |
+
msgid "Load"
|
37 |
+
msgstr "Nahrát"
|
38 |
+
|
39 |
+
#: custom-field-template/custom-field-template.php:443
|
40 |
+
msgid "read more"
|
41 |
+
msgstr "číst více"
|
42 |
+
|
43 |
+
#: custom-field-template/custom-field-template.php:461
|
44 |
+
#: custom-field-template/custom-field-template.php:471
|
45 |
+
msgid "Custom Fields"
|
46 |
+
msgstr "Uživatelská pole"
|
47 |
+
|
48 |
+
#: custom-field-template/custom-field-template.php:502
|
49 |
+
msgid "Settings"
|
50 |
+
msgstr "Nastavení"
|
51 |
+
|
52 |
+
#: custom-field-template/custom-field-template.php:527
|
53 |
+
msgid "Default Template"
|
54 |
+
msgstr "Výchozí šablona"
|
55 |
+
|
56 |
+
#: custom-field-template/custom-field-template.php:738
|
57 |
+
msgid "You can not use the following words as the field key: `content`, `post_title`, and `excerpt`."
|
58 |
+
msgstr "Tato slova nelze použít jako klíč pole: `content`, `post_title`, and `excerpt`."
|
59 |
+
|
60 |
+
#: custom-field-template/custom-field-template.php:753
|
61 |
+
#: custom-field-template/custom-field-template.php:773
|
62 |
+
#: custom-field-template/custom-field-template.php:777
|
63 |
+
#: custom-field-template/custom-field-template.php:789
|
64 |
+
#: custom-field-template/custom-field-template.php:797
|
65 |
+
#: custom-field-template/custom-field-template.php:814
|
66 |
+
msgid "Options updated."
|
67 |
+
msgstr "Nastavení aktualizováno."
|
68 |
+
|
69 |
+
#: custom-field-template/custom-field-template.php:818
|
70 |
+
msgid "Value Counts rebuilt."
|
71 |
+
msgstr "Počítadla hodnot byla přepsána."
|
72 |
+
|
73 |
+
#: custom-field-template/custom-field-template.php:821
|
74 |
+
msgid "Tags rebuilt."
|
75 |
+
msgstr "Tagy byly přepsány."
|
76 |
+
|
77 |
+
#: custom-field-template/custom-field-template.php:830
|
78 |
+
msgid "Options imported."
|
79 |
+
msgstr "Nastavení bylo importováno."
|
80 |
+
|
81 |
+
#: custom-field-template/custom-field-template.php:837
|
82 |
+
msgid "Options resetted."
|
83 |
+
msgstr "Nastavení bylo obnoveno."
|
84 |
+
|
85 |
+
#: custom-field-template/custom-field-template.php:841
|
86 |
+
msgid "Options deleted."
|
87 |
+
msgstr "Nastavení bylo smazáno."
|
88 |
+
|
89 |
+
#: custom-field-template/custom-field-template.php:883
|
90 |
+
#: custom-field-template/custom-field-template.php:929
|
91 |
+
#: custom-field-template/custom-field-template.php:1030
|
92 |
+
#: custom-field-template/custom-field-template.php:1049
|
93 |
+
#: custom-field-template/custom-field-template.php:1078
|
94 |
+
#: custom-field-template/custom-field-template.php:1109
|
95 |
+
#: custom-field-template/custom-field-template.php:1150
|
96 |
+
#: custom-field-template/custom-field-template.php:1171
|
97 |
+
#: custom-field-template/custom-field-template.php:1188
|
98 |
+
#: custom-field-template/custom-field-template.php:1353
|
99 |
+
#: custom-field-template/custom-field-template.php:1369
|
100 |
+
#: custom-field-template/custom-field-template.php:1385
|
101 |
+
#: custom-field-template/custom-field-template.php:1401
|
102 |
+
#: custom-field-template/custom-field-template.php:1417
|
103 |
+
msgid "Click to toggle"
|
104 |
+
msgstr "Klikněte pro rozbalení"
|
105 |
+
|
106 |
+
#: custom-field-template/custom-field-template.php:884
|
107 |
+
msgid "Custom Field Template Options"
|
108 |
+
msgstr "Vlastní uživatelská pole Nastavení"
|
109 |
+
|
110 |
+
#: custom-field-template/custom-field-template.php:894
|
111 |
+
#: custom-field-template/custom-field-template.php:2350
|
112 |
+
#: custom-field-template/custom-field-template.php:2351
|
113 |
+
msgid "Disable"
|
114 |
+
msgstr "Deaktivovat"
|
115 |
+
|
116 |
+
#: custom-field-template/custom-field-template.php:896
|
117 |
+
msgid "Template Title"
|
118 |
+
msgstr "Název šablony"
|
119 |
+
|
120 |
+
#: custom-field-template/custom-field-template.php:898
|
121 |
+
msgid "Template Instruction"
|
122 |
+
msgstr "Popis šablony"
|
123 |
+
|
124 |
+
#: custom-field-template/custom-field-template.php:900
|
125 |
+
#: custom-field-template/custom-field-template.php:1125
|
126 |
+
msgid "Post Type"
|
127 |
+
msgstr "Typ obsahu"
|
128 |
+
|
129 |
+
#: custom-field-template/custom-field-template.php:902
|
130 |
+
#: custom-field-template/custom-field-template.php:1126
|
131 |
+
msgid "Both"
|
132 |
+
msgstr "Obojí"
|
133 |
+
|
134 |
+
#: custom-field-template/custom-field-template.php:903
|
135 |
+
#: custom-field-template/custom-field-template.php:1127
|
136 |
+
msgid "Post"
|
137 |
+
msgstr "Příspěvek"
|
138 |
+
|
139 |
+
#: custom-field-template/custom-field-template.php:904
|
140 |
+
#: custom-field-template/custom-field-template.php:1128
|
141 |
+
msgid "Page"
|
142 |
+
msgstr "Stránka"
|
143 |
+
|
144 |
+
#: custom-field-template/custom-field-template.php:905
|
145 |
+
#: custom-field-template/custom-field-template.php:1129
|
146 |
+
msgid "Custom Post Type (comma-deliminated)"
|
147 |
+
msgstr "Vlastní typ obsahu (odděleno čárkami)"
|
148 |
+
|
149 |
+
#: custom-field-template/custom-field-template.php:907
|
150 |
+
msgid "Post ID (comma-deliminated)"
|
151 |
+
msgstr "ID příspěvku (odděleno čárkami)"
|
152 |
+
|
153 |
+
#: custom-field-template/custom-field-template.php:909
|
154 |
+
#: custom-field-template/custom-field-template.php:1131
|
155 |
+
msgid "Category ID (comma-deliminated)"
|
156 |
+
msgstr "ID rubriky (odděleno čárkami)"
|
157 |
+
|
158 |
+
#: custom-field-template/custom-field-template.php:911
|
159 |
+
msgid "Page Template file name(s) (comma-deliminated)"
|
160 |
+
msgstr "Názvy souborů šablon stránek (odděleno čárkami)"
|
161 |
+
|
162 |
+
#: custom-field-template/custom-field-template.php:913
|
163 |
+
msgid "Template Content"
|
164 |
+
msgstr "Obsah šablony"
|
165 |
+
|
166 |
+
#: custom-field-template/custom-field-template.php:920
|
167 |
+
#: custom-field-template/custom-field-template.php:1021
|
168 |
+
#: custom-field-template/custom-field-template.php:1040
|
169 |
+
#: custom-field-template/custom-field-template.php:1069
|
170 |
+
#: custom-field-template/custom-field-template.php:1100
|
171 |
+
#: custom-field-template/custom-field-template.php:1141
|
172 |
+
msgid "Update Options »"
|
173 |
+
msgstr "Aktualizovat nastavení »"
|
174 |
+
|
175 |
+
#: custom-field-template/custom-field-template.php:930
|
176 |
+
msgid "Global Settings"
|
177 |
+
msgstr "Globální nastavení"
|
178 |
+
|
179 |
+
#: custom-field-template/custom-field-template.php:945
|
180 |
+
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
181 |
+
msgstr "V případě, že chcete zobrazovat místo klíčů polí jejich názvy (jsou-li nastaveny)"
|
182 |
+
|
183 |
+
#: custom-field-template/custom-field-template.php:946
|
184 |
+
msgid "Use labels in place of custom keys"
|
185 |
+
msgstr "Použít názvy místo klíčů polí"
|
186 |
+
|
187 |
+
#: custom-field-template/custom-field-template.php:949
|
188 |
+
msgid "In case that you would like to add p and br tags in textareas automatically"
|
189 |
+
msgstr "V případě, že chcete automaticky přidat tagy p a br do polí textarea"
|
190 |
+
|
191 |
+
#: custom-field-template/custom-field-template.php:950
|
192 |
+
msgid "Use wpautop function"
|
193 |
+
msgstr "Použít wpautop funkci"
|
194 |
+
|
195 |
+
#: custom-field-template/custom-field-template.php:954
|
196 |
+
msgid "In case that you would like to save values automatically in switching templates"
|
197 |
+
msgstr "V případě, že chce automaticky ukládat hodnoty v přepínaných šablonách"
|
198 |
+
|
199 |
+
#: custom-field-template/custom-field-template.php:955
|
200 |
+
msgid "Use the auto save in switching templates"
|
201 |
+
msgstr "Automaticky uložit při přepínaní šablon"
|
202 |
+
|
203 |
+
#: custom-field-template/custom-field-template.php:959
|
204 |
+
msgid "In case that you would like to disable input fields of the custom field template temporarily"
|
205 |
+
msgstr "V případě, že chcete dočasně deaktivovat všechna pole vlastních šablon"
|
206 |
+
|
207 |
+
#: custom-field-template/custom-field-template.php:960
|
208 |
+
msgid "Use the `Disable` button. The default custom fields will be superseded."
|
209 |
+
msgstr "Použít tlačítko `Deaktivovat`. Výchozí uživatelská pole budou vyřazena."
|
210 |
+
|
211 |
+
#: custom-field-template/custom-field-template.php:964
|
212 |
+
msgid "In case that you would like to forbid to use the initialize button."
|
213 |
+
msgstr "V případě, že chcete zakázat užití inicializačního tlačítka."
|
214 |
+
|
215 |
+
#: custom-field-template/custom-field-template.php:965
|
216 |
+
msgid "Disable the initialize button"
|
217 |
+
msgstr "Deaktivovat inicializační tlačítko"
|
218 |
+
|
219 |
+
#: custom-field-template/custom-field-template.php:969
|
220 |
+
msgid "In case that you would like to forbid to use the save button."
|
221 |
+
msgstr "V případě, že chcete zakázat užití tlačítka pro uložení."
|
222 |
+
|
223 |
+
#: custom-field-template/custom-field-template.php:970
|
224 |
+
msgid "Disable the save button"
|
225 |
+
msgstr "Deaktivovat tlačítko pro uložení"
|
226 |
+
|
227 |
+
#: custom-field-template/custom-field-template.php:974
|
228 |
+
msgid "In case that you would like to forbid to use the default custom fields."
|
229 |
+
msgstr "V případě, že chcete zakázat užití výchozích uživatelských polí."
|
230 |
+
|
231 |
+
#: custom-field-template/custom-field-template.php:975
|
232 |
+
msgid "Disable the default custom fields"
|
233 |
+
msgstr "Deaktivovat výchozí uživatelská pole"
|
234 |
+
|
235 |
+
#: custom-field-template/custom-field-template.php:979
|
236 |
+
msgid "In case that you would like to forbid to use the quick edit."
|
237 |
+
msgstr "V případě, že chcete zakázat užití rychlé editace."
|
238 |
+
|
239 |
+
#: custom-field-template/custom-field-template.php:980
|
240 |
+
msgid "Disable the quick edit"
|
241 |
+
msgstr "Deaktivovat rychlou editaci"
|
242 |
+
|
243 |
+
#: custom-field-template/custom-field-template.php:984
|
244 |
+
msgid "In case that you would like to forbid to display the custom field column on the edit post list page."
|
245 |
+
msgstr "V případě, že chcete zakázat zobrazování sloupce uživatelských polí na editační stránce."
|
246 |
+
|
247 |
+
#: custom-field-template/custom-field-template.php:985
|
248 |
+
msgid "Disable the custom field column (The quick edit also does not work.)"
|
249 |
+
msgstr "Deaktivovat sloupec uživatelských polí (přestane fungovat také rychlá úprava)"
|
250 |
+
|
251 |
+
#: custom-field-template/custom-field-template.php:989
|
252 |
+
msgid "In case that you would like to replace the box title with the template title."
|
253 |
+
msgstr "V případě, že chcete nahradit název boxu názvem šablony."
|
254 |
+
|
255 |
+
#: custom-field-template/custom-field-template.php:990
|
256 |
+
msgid "Replace the box title"
|
257 |
+
msgstr "Nahradit název boxu"
|
258 |
+
|
259 |
+
#: custom-field-template/custom-field-template.php:994
|
260 |
+
msgid "In case that you would like to use the shortcode in the widget."
|
261 |
+
msgstr "V případě, že chcete ve widgetu použít shortcode."
|
262 |
+
|
263 |
+
#: custom-field-template/custom-field-template.php:995
|
264 |
+
msgid "Use the shortcode in the widget"
|
265 |
+
msgstr "Použít ve widgetu shortcode"
|
266 |
+
|
267 |
+
#: custom-field-template/custom-field-template.php:999
|
268 |
+
msgid "In case that you would like to use the shortcode in the excerpt."
|
269 |
+
msgstr "V případě, že chce použít shortcode v úryvku (excerpt)."
|
270 |
+
|
271 |
+
#: custom-field-template/custom-field-template.php:1000
|
272 |
+
msgid "Use the shortcode in the excerpt"
|
273 |
+
msgstr "Použít shortcode v úryvku"
|
274 |
+
|
275 |
+
#: custom-field-template/custom-field-template.php:1010
|
276 |
+
msgid "Text to place before every list which is called by the cft shortcode"
|
277 |
+
msgstr "Text vkládaný před každý seznam volaný ctf shortcodem"
|
278 |
+
|
279 |
+
#: custom-field-template/custom-field-template.php:1012
|
280 |
+
msgid "Text to place after every list which is called by the cft shortcode"
|
281 |
+
msgstr "Text vkládaný za každý seznam volaný ctf shortcodem"
|
282 |
+
|
283 |
+
#: custom-field-template/custom-field-template.php:1014
|
284 |
+
msgid "Text to place before every value which is called by the cft shortcode"
|
285 |
+
msgstr "Text vkládaný před každou hodnotu volaný ctf shortcodem"
|
286 |
+
|
287 |
+
#: custom-field-template/custom-field-template.php:1016
|
288 |
+
msgid "Text to place after every value which is called by the cft shortcode"
|
289 |
+
msgstr "Text vkládaný za každou hodnotu volaný ctf shortcodem"
|
290 |
+
|
291 |
+
#: custom-field-template/custom-field-template.php:1031
|
292 |
+
msgid "ADMIN CSS"
|
293 |
+
msgstr "Spravovat CSS"
|
294 |
+
|
295 |
+
#: custom-field-template/custom-field-template.php:1050
|
296 |
+
msgid "[cft] and [cftsearch] Shortcode Format"
|
297 |
+
msgstr "[cft] a [cftsearch] formát shortcodů"
|
298 |
+
|
299 |
+
#: custom-field-template/custom-field-template.php:1053
|
300 |
+
msgid "For [cft], [key] will be converted into the value of [key]."
|
301 |
+
msgstr "Pro [cft], [key] budou konvertovány do hodnot [key]."
|
302 |
+
|
303 |
+
#: custom-field-template/custom-field-template.php:1054
|
304 |
+
msgid "For [cftsearch], [key] will be converted into the input field."
|
305 |
+
msgstr "Pro [cftsearch], [key] bude konvertováno v vkládací pole."
|
306 |
+
|
307 |
+
#: custom-field-template/custom-field-template.php:1063
|
308 |
+
#: custom-field-template/custom-field-template.php:1134
|
309 |
+
msgid "Use PHP"
|
310 |
+
msgstr "Použít PHP"
|
311 |
+
|
312 |
+
#: custom-field-template/custom-field-template.php:1079
|
313 |
+
msgid "PHP CODE (Experimental Option)"
|
314 |
+
msgstr "PHP kód (experimentální funkce)"
|
315 |
+
|
316 |
+
#: custom-field-template/custom-field-template.php:1081
|
317 |
+
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
318 |
+
msgstr "Určitě chcete uložit PHP kódy? Používejte prosím s opatrností."
|
319 |
+
|
320 |
+
#: custom-field-template/custom-field-template.php:1082
|
321 |
+
msgid "For `text` and `textarea`, you must set $value as an string."
|
322 |
+
msgstr "Pro `text` a `textarea`, musíte nastavit $value jako řetězec."
|
323 |
+
|
324 |
+
#: custom-field-template/custom-field-template.php:1084
|
325 |
+
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
326 |
+
msgstr "Pro `checkbox`, `radio`, a `select`, musíte nastavit $values jako pole."
|
327 |
+
|
328 |
+
#: custom-field-template/custom-field-template.php:1110
|
329 |
+
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
330 |
+
msgstr "Automaticky vložit `the_content()` (experimentální funkce)"
|
331 |
+
|
332 |
+
#: custom-field-template/custom-field-template.php:1120
|
333 |
+
msgid "Position"
|
334 |
+
msgstr "Pozice"
|
335 |
+
|
336 |
+
#: custom-field-template/custom-field-template.php:1121
|
337 |
+
msgid "Before the content"
|
338 |
+
msgstr "Před obsahem"
|
339 |
+
|
340 |
+
#: custom-field-template/custom-field-template.php:1122
|
341 |
+
msgid "After the content"
|
342 |
+
msgstr "Za obsahem"
|
343 |
+
|
344 |
+
#: custom-field-template/custom-field-template.php:1123
|
345 |
+
#, php-format
|
346 |
+
msgid "Inside the content ([cfthook hook=%d])"
|
347 |
+
msgstr "Uvnitř obsahu ([cfthook hook=%d])"
|
348 |
+
|
349 |
+
#: custom-field-template/custom-field-template.php:1133
|
350 |
+
msgid "Content"
|
351 |
+
msgstr "Obsah"
|
352 |
+
|
353 |
+
#: custom-field-template/custom-field-template.php:1135
|
354 |
+
msgid "Apply to feeds"
|
355 |
+
msgstr "Aplikovat na zdroje"
|
356 |
+
|
357 |
+
#: custom-field-template/custom-field-template.php:1151
|
358 |
+
msgid "Rebuild Value Counts"
|
359 |
+
msgstr "Přepsat počítadla hodnot"
|
360 |
+
|
361 |
+
#: custom-field-template/custom-field-template.php:1153
|
362 |
+
msgid "Are you sure to rebuild all value counts?"
|
363 |
+
msgstr "Určitě chcete přepsat počítadla hodnot?"
|
364 |
+
|
365 |
+
#: custom-field-template/custom-field-template.php:1157
|
366 |
+
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
367 |
+
msgstr "Počítadla hodnot jsou používána pro dočasné uložení počtu hodnot v každém klíči. Nastavte `valueCount = true` do polí."
|
368 |
+
|
369 |
+
#: custom-field-template/custom-field-template.php:1161
|
370 |
+
msgid "Rebuild Value Counts »"
|
371 |
+
msgstr "Přepsat počítadla hodnot »"
|
372 |
+
|
373 |
+
#: custom-field-template/custom-field-template.php:1172
|
374 |
+
msgid "Rebuild Tags"
|
375 |
+
msgstr "Přepsat tagy"
|
376 |
+
|
377 |
+
#: custom-field-template/custom-field-template.php:1174
|
378 |
+
msgid "Are you sure to rebuild tags?"
|
379 |
+
msgstr "Určitě chcete přepsat tagy?"
|
380 |
+
|
381 |
+
#: custom-field-template/custom-field-template.php:1178
|
382 |
+
msgid "Rebuild Tags »"
|
383 |
+
msgstr "Přepsat tagy »"
|
384 |
+
|
385 |
+
#: custom-field-template/custom-field-template.php:1189
|
386 |
+
msgid "Option List"
|
387 |
+
msgstr "Seznam nastavení"
|
388 |
+
|
389 |
+
#: custom-field-template/custom-field-template.php:1354
|
390 |
+
msgid "Export Options"
|
391 |
+
msgstr "Exportovat nastavení"
|
392 |
+
|
393 |
+
#: custom-field-template/custom-field-template.php:1360
|
394 |
+
msgid "Export Options »"
|
395 |
+
msgstr "Exportovat nastavení »"
|
396 |
+
|
397 |
+
#: custom-field-template/custom-field-template.php:1370
|
398 |
+
msgid "Import Options"
|
399 |
+
msgstr "Importovat nastavení"
|
400 |
+
|
401 |
+
#: custom-field-template/custom-field-template.php:1372
|
402 |
+
msgid "Are you sure to import options? Options you set will be overwritten."
|
403 |
+
msgstr "Určitě chcete importovat nastavení? Současné nastavení bude přepsáno."
|
404 |
+
|
405 |
+
#: custom-field-template/custom-field-template.php:1376
|
406 |
+
msgid "Import Options »"
|
407 |
+
msgstr "Importovat nastavení »"
|
408 |
+
|
409 |
+
#: custom-field-template/custom-field-template.php:1386
|
410 |
+
msgid "Reset Options"
|
411 |
+
msgstr "Obnovit nastavení"
|
412 |
+
|
413 |
+
#: custom-field-template/custom-field-template.php:1388
|
414 |
+
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
415 |
+
msgstr "Určitě chcete obnovit nastavení? Současné nastavení bude přepsáno do výchozích hodnot."
|
416 |
+
|
417 |
+
#: custom-field-template/custom-field-template.php:1392
|
418 |
+
msgid "Reset Options »"
|
419 |
+
msgstr "Obnovit nastavení »"
|
420 |
+
|
421 |
+
#: custom-field-template/custom-field-template.php:1402
|
422 |
+
msgid "Delete Options"
|
423 |
+
msgstr "Smazat nastavneí"
|
424 |
+
|
425 |
+
#: custom-field-template/custom-field-template.php:1404
|
426 |
+
msgid "Are you sure to delete options? Options you set will be deleted."
|
427 |
+
msgstr "Určitě chcete smazat nastavení? Vaše nastavení bude kompletně smazáno."
|
428 |
+
|
429 |
+
#: custom-field-template/custom-field-template.php:1408
|
430 |
+
msgid "Delete Options »"
|
431 |
+
msgstr "Smazat nastavení »"
|
432 |
+
|
433 |
+
#: custom-field-template/custom-field-template.php:1418
|
434 |
+
msgid "Donation"
|
435 |
+
msgstr "Podpořit"
|
436 |
+
|
437 |
+
#: custom-field-template/custom-field-template.php:1420
|
438 |
+
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
439 |
+
msgstr "Pokud se vám tento plugin líbí, podpořte jej prosím přes PayPal! Každý částka je vítána. Vaše pomoc bude velmi oceněna."
|
440 |
+
|
441 |
+
#: custom-field-template/custom-field-template.php:1516
|
442 |
+
#: custom-field-template/custom-field-template.php:1637
|
443 |
+
#: custom-field-template/custom-field-template.php:1717
|
444 |
+
#: custom-field-template/custom-field-template.php:1891
|
445 |
+
#: custom-field-template/custom-field-template.php:2090
|
446 |
+
msgid "Add New"
|
447 |
+
msgstr "Přidat nový"
|
448 |
+
|
449 |
+
#: custom-field-template/custom-field-template.php:1647
|
450 |
+
msgid "Clear"
|
451 |
+
msgstr "Vyčistit"
|
452 |
+
|
453 |
+
#: custom-field-template/custom-field-template.php:1733
|
454 |
+
msgid "Select"
|
455 |
+
msgstr "Vybrat"
|
456 |
+
|
457 |
+
#: custom-field-template/custom-field-template.php:1798
|
458 |
+
msgid "Add an Image"
|
459 |
+
msgstr "Přidat obrázek"
|
460 |
+
|
461 |
+
#: custom-field-template/custom-field-template.php:1803
|
462 |
+
msgid "Add Video"
|
463 |
+
msgstr "Přidat video"
|
464 |
+
|
465 |
+
#: custom-field-template/custom-field-template.php:1808
|
466 |
+
msgid "Add Audio"
|
467 |
+
msgstr "Přidat audio"
|
468 |
+
|
469 |
+
#: custom-field-template/custom-field-template.php:1812
|
470 |
+
msgid "Add Media"
|
471 |
+
msgstr "Přidat média"
|
472 |
+
|
473 |
+
#: custom-field-template/custom-field-template.php:1819
|
474 |
+
msgid "Toggle"
|
475 |
+
msgstr "Přepnout"
|
476 |
+
|
477 |
+
#: custom-field-template/custom-field-template.php:1901
|
478 |
+
msgid " OR "
|
479 |
+
msgstr " NEBO "
|
480 |
+
|
481 |
+
#: custom-field-template/custom-field-template.php:1902
|
482 |
+
msgid "Select by Media Picker"
|
483 |
+
msgstr "Vybrat výběrem médií"
|
484 |
+
|
485 |
+
#: custom-field-template/custom-field-template.php:1925
|
486 |
+
#: custom-field-template/custom-field-template.php:2092
|
487 |
+
msgid "Delete"
|
488 |
+
msgstr "Smazat"
|
489 |
+
|
490 |
+
#: custom-field-template/custom-field-template.php:2351
|
491 |
+
msgid "Enable"
|
492 |
+
msgstr "Aktivovat"
|
493 |
+
|
494 |
+
#: custom-field-template/custom-field-template.php:2355
|
495 |
+
msgid "Initialize"
|
496 |
+
msgstr "Inicializovat"
|
497 |
+
|
498 |
+
#: custom-field-template/custom-field-template.php:2356
|
499 |
+
msgid "Are you sure to reset current values? Default values will be loaded."
|
500 |
+
msgstr "Opravdu chcete přepsat aktuální hodnoty? Budou načteny výchozí hodnoty."
|
501 |
+
|
502 |
+
#: custom-field-template/custom-field-template.php:2361
|
503 |
+
msgid "Save"
|
504 |
+
msgstr "Uložit"
|
505 |
+
|
506 |
+
#: custom-field-template/custom-field-template.php:3014
|
507 |
+
msgid "Search »"
|
508 |
+
msgstr "Hledat »"
|
509 |
+
|
custom-field-template-es_ES.mo
CHANGED
Binary file
|
custom-field-template-es_ES.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:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: Darío Ferrer <wp@darioferrer.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -16,458 +16,497 @@ msgstr ""
|
|
16 |
"X-Poedit-Basepath: ../\n"
|
17 |
"X-Poedit-SearchPath-0: custom-field-template\n"
|
18 |
|
19 |
-
#: custom-field-template/custom-field-template.php:
|
20 |
-
#: custom-field-template/custom-field-template.php:
|
21 |
-
#: custom-field-template/custom-field-template.php:
|
22 |
-
#: custom-field-template/custom-field-template.php:
|
23 |
-
#: custom-field-template/custom-field-template.php:
|
24 |
-
#: custom-field-template/custom-field-template.php:
|
25 |
-
#: custom-field-template/custom-field-template.php:
|
26 |
msgid "Custom Field Template"
|
27 |
msgstr "Custom Field Template"
|
28 |
|
29 |
-
#: custom-field-template/custom-field-template.php:
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
msgid "Load"
|
32 |
msgstr "Cargar"
|
33 |
|
34 |
-
#: custom-field-template/custom-field-template.php:
|
35 |
msgid "read more"
|
36 |
msgstr "leer más"
|
37 |
|
38 |
-
#: custom-field-template/custom-field-template.php:
|
39 |
-
#: custom-field-template/custom-field-template.php:
|
40 |
msgid "Custom Fields"
|
41 |
msgstr "Campos Personalizados"
|
42 |
|
43 |
-
#: custom-field-template/custom-field-template.php:
|
44 |
msgid "Settings"
|
45 |
msgstr "Configuración"
|
46 |
|
47 |
-
#: custom-field-template/custom-field-template.php:
|
48 |
msgid "Default Template"
|
49 |
msgstr "Plantilla predeterminada"
|
50 |
|
51 |
-
#: custom-field-template/custom-field-template.php:
|
52 |
-
msgid "You can not use the following words as the field key: `content`, `post_title`, and `excerpt`."
|
53 |
-
msgstr "No puedes utilizar las siguientes palabras como claves: `content`, `post_title`
|
54 |
|
55 |
-
#: custom-field-template/custom-field-template.php:
|
56 |
-
#: custom-field-template/custom-field-template.php:739
|
57 |
-
#: custom-field-template/custom-field-template.php:751
|
58 |
-
#: custom-field-template/custom-field-template.php:759
|
59 |
#: custom-field-template/custom-field-template.php:776
|
|
|
|
|
|
|
|
|
60 |
msgid "Options updated."
|
61 |
msgstr "Opciones actualizadas exitosamente"
|
62 |
|
63 |
-
#: custom-field-template/custom-field-template.php:
|
64 |
msgid "Value Counts rebuilt."
|
65 |
msgstr "Conteo de valores reconstruido"
|
66 |
|
67 |
-
#: custom-field-template/custom-field-template.php:
|
68 |
msgid "Tags rebuilt."
|
69 |
msgstr "Etiquetas reconstruidas"
|
70 |
|
71 |
-
#: custom-field-template/custom-field-template.php:
|
72 |
msgid "Options imported."
|
73 |
msgstr "Opciones importadas"
|
74 |
|
75 |
-
#: custom-field-template/custom-field-template.php:
|
76 |
msgid "Options resetted."
|
77 |
msgstr "Opciones reiniciadas exitosamente"
|
78 |
|
79 |
-
#: custom-field-template/custom-field-template.php:
|
80 |
msgid "Options deleted."
|
81 |
msgstr "Opciones eliminadas exitosamente"
|
82 |
|
83 |
-
#: custom-field-template/custom-field-template.php:
|
84 |
#: custom-field-template/custom-field-template.php:932
|
85 |
-
#: custom-field-template/custom-field-template.php:
|
86 |
-
#: custom-field-template/custom-field-template.php:980
|
87 |
-
#: custom-field-template/custom-field-template.php:1011
|
88 |
#: custom-field-template/custom-field-template.php:1052
|
89 |
-
#: custom-field-template/custom-field-template.php:
|
90 |
-
#: custom-field-template/custom-field-template.php:
|
91 |
-
#: custom-field-template/custom-field-template.php:
|
92 |
-
#: custom-field-template/custom-field-template.php:
|
93 |
-
#: custom-field-template/custom-field-template.php:
|
94 |
-
#: custom-field-template/custom-field-template.php:
|
95 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
|
|
|
|
96 |
msgid "Click to toggle"
|
97 |
msgstr "Haz clic para intercambiar"
|
98 |
|
99 |
-
#: custom-field-template/custom-field-template.php:
|
100 |
msgid "Custom Field Template Options"
|
101 |
msgstr "Opciones de campos personalizados"
|
102 |
|
103 |
-
#: custom-field-template/custom-field-template.php:
|
104 |
-
#: custom-field-template/custom-field-template.php:
|
105 |
-
#: custom-field-template/custom-field-template.php:
|
106 |
msgid "Disable"
|
107 |
msgstr "Deshabilitar"
|
108 |
|
109 |
-
#: custom-field-template/custom-field-template.php:
|
110 |
msgid "Template Title"
|
111 |
msgstr "Título de la plantilla"
|
112 |
|
113 |
-
#: custom-field-template/custom-field-template.php:
|
114 |
msgid "Template Instruction"
|
115 |
msgstr "Instrucciones de la plantilla"
|
116 |
|
117 |
-
#: custom-field-template/custom-field-template.php:
|
118 |
-
#: custom-field-template/custom-field-template.php:
|
119 |
msgid "Post Type"
|
120 |
msgstr "Tipo de publicación"
|
121 |
|
122 |
-
#: custom-field-template/custom-field-template.php:
|
123 |
-
#: custom-field-template/custom-field-template.php:
|
124 |
msgid "Both"
|
125 |
msgstr "Ambos"
|
126 |
|
127 |
-
#: custom-field-template/custom-field-template.php:
|
128 |
-
#: custom-field-template/custom-field-template.php:
|
129 |
msgid "Post"
|
130 |
msgstr "Entrada"
|
131 |
|
132 |
-
#: custom-field-template/custom-field-template.php:
|
133 |
-
#: custom-field-template/custom-field-template.php:
|
134 |
msgid "Page"
|
135 |
msgstr "Página"
|
136 |
|
137 |
-
#: custom-field-template/custom-field-template.php:
|
138 |
-
#: custom-field-template/custom-field-template.php:
|
139 |
msgid "Custom Post Type (comma-deliminated)"
|
140 |
msgstr "Tipo de Entrada (Delimitado por comas)"
|
141 |
|
142 |
-
#: custom-field-template/custom-field-template.php:
|
143 |
msgid "Post ID (comma-deliminated)"
|
144 |
msgstr "ID de entrada (Delimitado por comas)"
|
145 |
|
146 |
-
#: custom-field-template/custom-field-template.php:
|
147 |
-
#: custom-field-template/custom-field-template.php:
|
148 |
msgid "Category ID (comma-deliminated)"
|
149 |
msgstr "ID de Categoría (Delimitado por comas)"
|
150 |
|
151 |
-
#: custom-field-template/custom-field-template.php:
|
152 |
msgid "Page Template file name(s) (comma-deliminated)"
|
153 |
msgstr "Nombre(s) de Archivo(s) de Plantilla(s) (Delimitado por comas)"
|
154 |
|
155 |
-
#: custom-field-template/custom-field-template.php:
|
156 |
msgid "Template Content"
|
157 |
msgstr "Contenido de la plantilla"
|
158 |
|
159 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
161 |
msgstr "En caso de que desees reemplazar claves personalizadas por etiquetas si 'etiqueta' está configurado"
|
162 |
|
163 |
-
#: custom-field-template/custom-field-template.php:
|
164 |
msgid "Use labels in place of custom keys"
|
165 |
msgstr "Usar etiquetas en lugar de claves personalizadas"
|
166 |
|
167 |
-
#: custom-field-template/custom-field-template.php:
|
168 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
169 |
msgstr "En caso de que desees añadir etiquetas 'p' y 'br' automáticamente en áreas de texto"
|
170 |
|
171 |
-
#: custom-field-template/custom-field-template.php:
|
172 |
msgid "Use wpautop function"
|
173 |
msgstr "Usar función 'wpautop'"
|
174 |
|
175 |
-
#: custom-field-template/custom-field-template.php:
|
176 |
msgid "In case that you would like to save values automatically in switching templates"
|
177 |
msgstr "En caso de que desees guardar valores automáticamente en la conmutación de plantillas"
|
178 |
|
179 |
-
#: custom-field-template/custom-field-template.php:
|
180 |
msgid "Use the auto save in switching templates"
|
181 |
msgstr "Usar auto-guardado al conmutar plantillas"
|
182 |
|
183 |
-
#: custom-field-template/custom-field-template.php:
|
184 |
msgid "In case that you would like to disable input fields of the custom field template temporarily"
|
185 |
msgstr "En caso de que desees deshabilitar temporalmente los campos personalizados."
|
186 |
|
187 |
-
#: custom-field-template/custom-field-template.php:
|
188 |
msgid "Use the `Disable` button. The default custom fields will be superseded."
|
189 |
msgstr "Usar el botón `Deshabilitar`. Los campos predeterminados serán sustituidos"
|
190 |
|
191 |
-
#: custom-field-template/custom-field-template.php:
|
192 |
msgid "In case that you would like to forbid to use the initialize button."
|
193 |
msgstr "En caso de que desees prohibir la el botón Inicializar"
|
194 |
|
195 |
-
#: custom-field-template/custom-field-template.php:
|
196 |
msgid "Disable the initialize button"
|
197 |
msgstr "Deshabilitar el botón Inicializar"
|
198 |
|
199 |
-
#: custom-field-template/custom-field-template.php:
|
200 |
msgid "In case that you would like to forbid to use the save button."
|
201 |
msgstr "En caso de que desees prohibir el botón Guardar"
|
202 |
|
203 |
-
#: custom-field-template/custom-field-template.php:
|
204 |
msgid "Disable the save button"
|
205 |
msgstr "Deshabilitar el botón Guardar"
|
206 |
|
207 |
-
#: custom-field-template/custom-field-template.php:
|
208 |
msgid "In case that you would like to forbid to use the default custom fields."
|
209 |
msgstr "En caso de que desees prohibir el uso de los campos predeterminados"
|
210 |
|
211 |
-
#: custom-field-template/custom-field-template.php:
|
212 |
msgid "Disable the default custom fields"
|
213 |
msgstr "Deshabilitar campos predeterminados"
|
214 |
|
215 |
-
#: custom-field-template/custom-field-template.php:
|
216 |
msgid "In case that you would like to forbid to use the quick edit."
|
217 |
msgstr "En caso de que desees prohibir la edición rápida"
|
218 |
|
219 |
-
#: custom-field-template/custom-field-template.php:
|
220 |
msgid "Disable the quick edit"
|
221 |
msgstr "Deshabilitar edición rápida"
|
222 |
|
223 |
-
#: custom-field-template/custom-field-template.php:
|
224 |
msgid "In case that you would like to forbid to display the custom field column on the edit post list page."
|
225 |
msgstr "En caso de que desees ocultar la columna Campos Personalizados de la lista de entradas"
|
226 |
|
227 |
-
#: custom-field-template/custom-field-template.php:
|
228 |
msgid "Disable the custom field column (The quick edit also does not work.)"
|
229 |
msgstr "Deshabilitar la columna Campos Personalizados (La edición rápida también se desactivará)"
|
230 |
|
231 |
-
#: custom-field-template/custom-field-template.php:
|
232 |
msgid "In case that you would like to replace the box title with the template title."
|
233 |
msgstr "En caso de que desees reemplazar el título de la caja por el título de la plantilla"
|
234 |
|
235 |
-
#: custom-field-template/custom-field-template.php:
|
236 |
msgid "Replace the box title"
|
237 |
msgstr "Reemplazar caja de título"
|
238 |
|
239 |
-
#: custom-field-template/custom-field-template.php:
|
240 |
msgid "In case that you would like to use the shortcode in the widget."
|
241 |
msgstr "En caso de que desees utilizar abreviación de código en el widget"
|
242 |
|
243 |
-
#: custom-field-template/custom-field-template.php:
|
244 |
msgid "Use the shortcode in the widget"
|
245 |
msgstr "Utilizar abreviaciones de código en el widget"
|
246 |
|
247 |
-
#: custom-field-template/custom-field-template.php:
|
248 |
msgid "In case that you would like to use the shortcode in the excerpt."
|
249 |
msgstr "En caso de que desees utilizar abreviación de código en el extracto"
|
250 |
|
251 |
-
#: custom-field-template/custom-field-template.php:
|
252 |
msgid "Use the shortcode in the excerpt"
|
253 |
msgstr "Utilizar abreviaciones de código en el extracto"
|
254 |
|
255 |
-
#: custom-field-template/custom-field-template.php:
|
256 |
-
|
257 |
-
|
258 |
-
#: custom-field-template/custom-field-template.php:1002
|
259 |
-
#: custom-field-template/custom-field-template.php:1043
|
260 |
-
msgid "Update Options »"
|
261 |
-
msgstr "Actualizar opciones »"
|
262 |
|
263 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
msgid "ADMIN CSS"
|
265 |
msgstr "ADMIN CSS"
|
266 |
|
267 |
-
#: custom-field-template/custom-field-template.php:
|
268 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
269 |
msgstr "Abreviaciones de código [cft] y [cftsearch]"
|
270 |
|
271 |
-
#: custom-field-template/custom-field-template.php:
|
272 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
273 |
msgstr "Para [cft], [key] se convertirá en un valor de [key]."
|
274 |
|
275 |
-
#: custom-field-template/custom-field-template.php:
|
276 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
277 |
msgstr "Para [cftsearch], [key] se convertirá en campo de entrada."
|
278 |
|
279 |
-
#: custom-field-template/custom-field-template.php:
|
280 |
-
#: custom-field-template/custom-field-template.php:
|
281 |
msgid "Use PHP"
|
282 |
msgstr "Usar PHP"
|
283 |
|
284 |
-
#: custom-field-template/custom-field-template.php:
|
285 |
msgid "PHP CODE (Experimental Option)"
|
286 |
msgstr "CÓDIGO PHP (Opción en Experimentación)"
|
287 |
|
288 |
-
#: custom-field-template/custom-field-template.php:
|
289 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
290 |
msgstr "¿Estás seguro de querer guardar los códigos PHP? Házlo a tu propio riesgo"
|
291 |
|
292 |
-
#: custom-field-template/custom-field-template.php:
|
293 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
294 |
msgstr "Para `text` y `textarea`, debes configurar $value como una cadena."
|
295 |
|
296 |
-
#: custom-field-template/custom-field-template.php:
|
297 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
298 |
msgstr "Para `checkbox`, `radio`, y `select`, debes configurar tus $valores como un array"
|
299 |
|
300 |
-
#: custom-field-template/custom-field-template.php:
|
301 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
302 |
msgstr "Auto Hook para `the_content()` (Opción experimental)"
|
303 |
|
304 |
-
#: custom-field-template/custom-field-template.php:
|
305 |
msgid "Position"
|
306 |
msgstr "Posición"
|
307 |
|
308 |
-
#: custom-field-template/custom-field-template.php:
|
309 |
-
msgid "Before the
|
310 |
msgstr "Antes del contenido"
|
311 |
|
312 |
-
#: custom-field-template/custom-field-template.php:
|
313 |
-
msgid "After the
|
314 |
msgstr "Después del contenido"
|
315 |
|
316 |
-
#: custom-field-template/custom-field-template.php:
|
317 |
#, php-format
|
318 |
-
msgid "Inside the
|
319 |
msgstr "Dentro del contenido ([cfthook hook=%d])"
|
320 |
|
321 |
-
#: custom-field-template/custom-field-template.php:
|
322 |
msgid "Content"
|
323 |
msgstr "Contenido"
|
324 |
|
325 |
-
#: custom-field-template/custom-field-template.php:
|
326 |
msgid "Apply to feeds"
|
327 |
msgstr "Aplicar a los avances"
|
328 |
|
329 |
-
#: custom-field-template/custom-field-template.php:
|
330 |
msgid "Rebuild Value Counts"
|
331 |
msgstr "Reconstruir Conteo de Valores"
|
332 |
|
333 |
-
#: custom-field-template/custom-field-template.php:
|
334 |
msgid "Are you sure to rebuild all value counts?"
|
335 |
msgstr "¿Seguro que deseas reconstruir los Conteos de Valores?"
|
336 |
|
337 |
-
#: custom-field-template/custom-field-template.php:
|
338 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
339 |
msgstr "Los Conteos de Valores son utilizados para guardar temporalmente los valores en cada clave. Ajusta `valueCount = true` en los campos."
|
340 |
|
341 |
-
#: custom-field-template/custom-field-template.php:
|
342 |
msgid "Rebuild Value Counts »"
|
343 |
msgstr "Actualizar Conteo de Valores $raquo;"
|
344 |
|
345 |
-
#: custom-field-template/custom-field-template.php:
|
346 |
msgid "Rebuild Tags"
|
347 |
msgstr "Reconstruir etiquetas"
|
348 |
|
349 |
-
#: custom-field-template/custom-field-template.php:
|
350 |
msgid "Are you sure to rebuild tags?"
|
351 |
msgstr "¿Seguro que deseas reconstruir las etiquetas?"
|
352 |
|
353 |
-
#: custom-field-template/custom-field-template.php:
|
354 |
msgid "Rebuild Tags »"
|
355 |
msgstr "Actualizar Etiquetas $raquo;"
|
356 |
|
357 |
-
#: custom-field-template/custom-field-template.php:
|
358 |
msgid "Option List"
|
359 |
msgstr "Lista de opciones"
|
360 |
|
361 |
-
#: custom-field-template/custom-field-template.php:
|
362 |
msgid "Export Options"
|
363 |
msgstr "Opciones de Exportación"
|
364 |
|
365 |
-
#: custom-field-template/custom-field-template.php:
|
366 |
msgid "Export Options »"
|
367 |
msgstr "Opciones de Exportación »"
|
368 |
|
369 |
-
#: custom-field-template/custom-field-template.php:
|
370 |
msgid "Import Options"
|
371 |
msgstr "Opciones de Importación"
|
372 |
|
373 |
-
#: custom-field-template/custom-field-template.php:
|
374 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
375 |
msgstr "¿Estás seguro de importar opciones? Las que hayas configurado serán sobreescritas"
|
376 |
|
377 |
-
#: custom-field-template/custom-field-template.php:
|
378 |
msgid "Import Options »"
|
379 |
msgstr "Opciones de Importación »"
|
380 |
|
381 |
-
#: custom-field-template/custom-field-template.php:
|
382 |
msgid "Reset Options"
|
383 |
msgstr "Reiniciar opciones"
|
384 |
|
385 |
-
#: custom-field-template/custom-field-template.php:
|
386 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
387 |
msgstr "¿Estás seguro de querer reiniciar las opciones?. Las opciones que habías configurado serán reiniciadas a la configuración predeterminada."
|
388 |
|
389 |
-
#: custom-field-template/custom-field-template.php:
|
390 |
msgid "Reset Options »"
|
391 |
msgstr "Reiniciar Opciones »"
|
392 |
|
393 |
-
#: custom-field-template/custom-field-template.php:
|
394 |
msgid "Delete Options"
|
395 |
msgstr "Eliminar opciones"
|
396 |
|
397 |
-
#: custom-field-template/custom-field-template.php:
|
398 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
399 |
msgstr "¿Estás seguro de querer eliminar las opciones?. Tus configuraciones serán suprimidas."
|
400 |
|
401 |
-
#: custom-field-template/custom-field-template.php:
|
402 |
msgid "Delete Options »"
|
403 |
msgstr "Eliminar opciones »"
|
404 |
|
405 |
-
#: custom-field-template/custom-field-template.php:
|
406 |
msgid "Donation"
|
407 |
msgstr "Donaciones"
|
408 |
|
409 |
-
#: custom-field-template/custom-field-template.php:
|
410 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
411 |
msgstr "Si te agrada este plugin, por favor efectúa una donación vía paypal. Cualquier cantidad será bien recibida y agradecida. Tu apoyo será muy bien apreciado."
|
412 |
|
413 |
-
#: custom-field-template/custom-field-template.php:
|
414 |
-
#: custom-field-template/custom-field-template.php:
|
415 |
-
#: custom-field-template/custom-field-template.php:
|
416 |
-
#: custom-field-template/custom-field-template.php:
|
417 |
-
#: custom-field-template/custom-field-template.php:
|
418 |
msgid "Add New"
|
419 |
msgstr "Añadir Nuevo"
|
420 |
|
421 |
-
#: custom-field-template/custom-field-template.php:
|
422 |
msgid "Clear"
|
423 |
msgstr "Borrar"
|
424 |
|
425 |
-
#: custom-field-template/custom-field-template.php:
|
426 |
msgid "Select"
|
427 |
msgstr "Seleccionar"
|
428 |
|
429 |
-
#: custom-field-template/custom-field-template.php:
|
430 |
msgid "Add an Image"
|
431 |
msgstr "Añadir una Imagen"
|
432 |
|
433 |
-
#: custom-field-template/custom-field-template.php:
|
434 |
msgid "Add Video"
|
435 |
msgstr "Añadir Video"
|
436 |
|
437 |
-
#: custom-field-template/custom-field-template.php:
|
438 |
msgid "Add Audio"
|
439 |
msgstr "Añadir Audio"
|
440 |
|
441 |
-
#: custom-field-template/custom-field-template.php:
|
442 |
msgid "Add Media"
|
443 |
msgstr "Añadir Media"
|
444 |
|
445 |
-
#: custom-field-template/custom-field-template.php:
|
446 |
msgid "Toggle"
|
447 |
msgstr "Intercambiar"
|
448 |
|
449 |
-
#: custom-field-template/custom-field-template.php:
|
450 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
msgid "Delete"
|
452 |
msgstr "Eliminar"
|
453 |
|
454 |
-
#: custom-field-template/custom-field-template.php:
|
455 |
msgid "Enable"
|
456 |
msgstr "Habilitar"
|
457 |
|
458 |
-
#: custom-field-template/custom-field-template.php:
|
459 |
msgid "Initialize"
|
460 |
msgstr "Inicializar"
|
461 |
|
462 |
-
#: custom-field-template/custom-field-template.php:
|
463 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
464 |
msgstr "¿Estás seguro de reiniciar los valores actuales? Los valores predeterminados será cargados"
|
465 |
|
466 |
-
#: custom-field-template/custom-field-template.php:
|
467 |
msgid "Save"
|
468 |
msgstr "Guardar"
|
469 |
|
470 |
-
#: custom-field-template/custom-field-template.php:
|
471 |
msgid "Search »"
|
472 |
msgstr "Buscar »"
|
473 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-02-25 11:20-0400\n"
|
6 |
+
"PO-Revision-Date: 2011-02-25 11:26-0400\n"
|
7 |
"Last-Translator: Darío Ferrer <wp@darioferrer.com>\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:145
|
20 |
+
#: custom-field-template/custom-field-template.php:146
|
21 |
+
#: custom-field-template/custom-field-template.php:166
|
22 |
+
#: custom-field-template/custom-field-template.php:610
|
23 |
+
#: custom-field-template/custom-field-template.php:880
|
24 |
+
#: custom-field-template/custom-field-template.php:2174
|
25 |
+
#: custom-field-template/custom-field-template.php:2310
|
26 |
msgid "Custom Field Template"
|
27 |
msgstr "Custom Field Template"
|
28 |
|
29 |
+
#: custom-field-template/custom-field-template.php:182
|
30 |
+
msgid "Media Picker"
|
31 |
+
msgstr "Selector de Media"
|
32 |
+
|
33 |
+
#: custom-field-template/custom-field-template.php:184
|
34 |
+
msgid "Use this"
|
35 |
+
msgstr "Utiliza esto"
|
36 |
+
|
37 |
+
#: custom-field-template/custom-field-template.php:286
|
38 |
+
#: custom-field-template/custom-field-template.php:2515
|
39 |
msgid "Load"
|
40 |
msgstr "Cargar"
|
41 |
|
42 |
+
#: custom-field-template/custom-field-template.php:442
|
43 |
msgid "read more"
|
44 |
msgstr "leer más"
|
45 |
|
46 |
+
#: custom-field-template/custom-field-template.php:460
|
47 |
+
#: custom-field-template/custom-field-template.php:470
|
48 |
msgid "Custom Fields"
|
49 |
msgstr "Campos Personalizados"
|
50 |
|
51 |
+
#: custom-field-template/custom-field-template.php:502
|
52 |
msgid "Settings"
|
53 |
msgstr "Configuración"
|
54 |
|
55 |
+
#: custom-field-template/custom-field-template.php:530
|
56 |
msgid "Default Template"
|
57 |
msgstr "Plantilla predeterminada"
|
58 |
|
59 |
+
#: custom-field-template/custom-field-template.php:741
|
60 |
+
msgid "You can not use the following words as the field key: `content`, `post_title`, and `excerpt`, and `action`."
|
61 |
+
msgstr "No puedes utilizar las siguientes palabras como claves: `content`, `post_title`, `excerpt`y `action`."
|
62 |
|
63 |
+
#: custom-field-template/custom-field-template.php:756
|
|
|
|
|
|
|
64 |
#: custom-field-template/custom-field-template.php:776
|
65 |
+
#: custom-field-template/custom-field-template.php:780
|
66 |
+
#: custom-field-template/custom-field-template.php:792
|
67 |
+
#: custom-field-template/custom-field-template.php:800
|
68 |
+
#: custom-field-template/custom-field-template.php:817
|
69 |
msgid "Options updated."
|
70 |
msgstr "Opciones actualizadas exitosamente"
|
71 |
|
72 |
+
#: custom-field-template/custom-field-template.php:821
|
73 |
msgid "Value Counts rebuilt."
|
74 |
msgstr "Conteo de valores reconstruido"
|
75 |
|
76 |
+
#: custom-field-template/custom-field-template.php:824
|
77 |
msgid "Tags rebuilt."
|
78 |
msgstr "Etiquetas reconstruidas"
|
79 |
|
80 |
+
#: custom-field-template/custom-field-template.php:833
|
81 |
msgid "Options imported."
|
82 |
msgstr "Opciones importadas"
|
83 |
|
84 |
+
#: custom-field-template/custom-field-template.php:840
|
85 |
msgid "Options resetted."
|
86 |
msgstr "Opciones reiniciadas exitosamente"
|
87 |
|
88 |
+
#: custom-field-template/custom-field-template.php:844
|
89 |
msgid "Options deleted."
|
90 |
msgstr "Opciones eliminadas exitosamente"
|
91 |
|
92 |
+
#: custom-field-template/custom-field-template.php:886
|
93 |
#: custom-field-template/custom-field-template.php:932
|
94 |
+
#: custom-field-template/custom-field-template.php:1033
|
|
|
|
|
95 |
#: custom-field-template/custom-field-template.php:1052
|
96 |
+
#: custom-field-template/custom-field-template.php:1081
|
97 |
+
#: custom-field-template/custom-field-template.php:1112
|
98 |
+
#: custom-field-template/custom-field-template.php:1153
|
99 |
+
#: custom-field-template/custom-field-template.php:1174
|
100 |
+
#: custom-field-template/custom-field-template.php:1191
|
101 |
+
#: custom-field-template/custom-field-template.php:1362
|
102 |
+
#: custom-field-template/custom-field-template.php:1378
|
103 |
+
#: custom-field-template/custom-field-template.php:1394
|
104 |
+
#: custom-field-template/custom-field-template.php:1410
|
105 |
+
#: custom-field-template/custom-field-template.php:1426
|
106 |
msgid "Click to toggle"
|
107 |
msgstr "Haz clic para intercambiar"
|
108 |
|
109 |
+
#: custom-field-template/custom-field-template.php:887
|
110 |
msgid "Custom Field Template Options"
|
111 |
msgstr "Opciones de campos personalizados"
|
112 |
|
113 |
+
#: custom-field-template/custom-field-template.php:897
|
114 |
+
#: custom-field-template/custom-field-template.php:2361
|
115 |
+
#: custom-field-template/custom-field-template.php:2362
|
116 |
msgid "Disable"
|
117 |
msgstr "Deshabilitar"
|
118 |
|
119 |
+
#: custom-field-template/custom-field-template.php:899
|
120 |
msgid "Template Title"
|
121 |
msgstr "Título de la plantilla"
|
122 |
|
123 |
+
#: custom-field-template/custom-field-template.php:901
|
124 |
msgid "Template Instruction"
|
125 |
msgstr "Instrucciones de la plantilla"
|
126 |
|
127 |
+
#: custom-field-template/custom-field-template.php:903
|
128 |
+
#: custom-field-template/custom-field-template.php:1128
|
129 |
msgid "Post Type"
|
130 |
msgstr "Tipo de publicación"
|
131 |
|
132 |
+
#: custom-field-template/custom-field-template.php:905
|
133 |
+
#: custom-field-template/custom-field-template.php:1129
|
134 |
msgid "Both"
|
135 |
msgstr "Ambos"
|
136 |
|
137 |
+
#: custom-field-template/custom-field-template.php:906
|
138 |
+
#: custom-field-template/custom-field-template.php:1130
|
139 |
msgid "Post"
|
140 |
msgstr "Entrada"
|
141 |
|
142 |
+
#: custom-field-template/custom-field-template.php:907
|
143 |
+
#: custom-field-template/custom-field-template.php:1131
|
144 |
msgid "Page"
|
145 |
msgstr "Página"
|
146 |
|
147 |
+
#: custom-field-template/custom-field-template.php:908
|
148 |
+
#: custom-field-template/custom-field-template.php:1132
|
149 |
msgid "Custom Post Type (comma-deliminated)"
|
150 |
msgstr "Tipo de Entrada (Delimitado por comas)"
|
151 |
|
152 |
+
#: custom-field-template/custom-field-template.php:910
|
153 |
msgid "Post ID (comma-deliminated)"
|
154 |
msgstr "ID de entrada (Delimitado por comas)"
|
155 |
|
156 |
+
#: custom-field-template/custom-field-template.php:912
|
157 |
+
#: custom-field-template/custom-field-template.php:1134
|
158 |
msgid "Category ID (comma-deliminated)"
|
159 |
msgstr "ID de Categoría (Delimitado por comas)"
|
160 |
|
161 |
+
#: custom-field-template/custom-field-template.php:914
|
162 |
msgid "Page Template file name(s) (comma-deliminated)"
|
163 |
msgstr "Nombre(s) de Archivo(s) de Plantilla(s) (Delimitado por comas)"
|
164 |
|
165 |
+
#: custom-field-template/custom-field-template.php:916
|
166 |
msgid "Template Content"
|
167 |
msgstr "Contenido de la plantilla"
|
168 |
|
169 |
+
#: custom-field-template/custom-field-template.php:923
|
170 |
+
#: custom-field-template/custom-field-template.php:1024
|
171 |
+
#: custom-field-template/custom-field-template.php:1043
|
172 |
+
#: custom-field-template/custom-field-template.php:1072
|
173 |
+
#: custom-field-template/custom-field-template.php:1103
|
174 |
+
#: custom-field-template/custom-field-template.php:1144
|
175 |
+
msgid "Update Options »"
|
176 |
+
msgstr "Actualizar opciones »"
|
177 |
+
|
178 |
+
#: custom-field-template/custom-field-template.php:933
|
179 |
+
msgid "Global Settings"
|
180 |
+
msgstr "Ajustes Globales"
|
181 |
+
|
182 |
+
#: custom-field-template/custom-field-template.php:948
|
183 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
184 |
msgstr "En caso de que desees reemplazar claves personalizadas por etiquetas si 'etiqueta' está configurado"
|
185 |
|
186 |
+
#: custom-field-template/custom-field-template.php:949
|
187 |
msgid "Use labels in place of custom keys"
|
188 |
msgstr "Usar etiquetas en lugar de claves personalizadas"
|
189 |
|
190 |
+
#: custom-field-template/custom-field-template.php:952
|
191 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
192 |
msgstr "En caso de que desees añadir etiquetas 'p' y 'br' automáticamente en áreas de texto"
|
193 |
|
194 |
+
#: custom-field-template/custom-field-template.php:953
|
195 |
msgid "Use wpautop function"
|
196 |
msgstr "Usar función 'wpautop'"
|
197 |
|
198 |
+
#: custom-field-template/custom-field-template.php:957
|
199 |
msgid "In case that you would like to save values automatically in switching templates"
|
200 |
msgstr "En caso de que desees guardar valores automáticamente en la conmutación de plantillas"
|
201 |
|
202 |
+
#: custom-field-template/custom-field-template.php:958
|
203 |
msgid "Use the auto save in switching templates"
|
204 |
msgstr "Usar auto-guardado al conmutar plantillas"
|
205 |
|
206 |
+
#: custom-field-template/custom-field-template.php:962
|
207 |
msgid "In case that you would like to disable input fields of the custom field template temporarily"
|
208 |
msgstr "En caso de que desees deshabilitar temporalmente los campos personalizados."
|
209 |
|
210 |
+
#: custom-field-template/custom-field-template.php:963
|
211 |
msgid "Use the `Disable` button. The default custom fields will be superseded."
|
212 |
msgstr "Usar el botón `Deshabilitar`. Los campos predeterminados serán sustituidos"
|
213 |
|
214 |
+
#: custom-field-template/custom-field-template.php:967
|
215 |
msgid "In case that you would like to forbid to use the initialize button."
|
216 |
msgstr "En caso de que desees prohibir la el botón Inicializar"
|
217 |
|
218 |
+
#: custom-field-template/custom-field-template.php:968
|
219 |
msgid "Disable the initialize button"
|
220 |
msgstr "Deshabilitar el botón Inicializar"
|
221 |
|
222 |
+
#: custom-field-template/custom-field-template.php:972
|
223 |
msgid "In case that you would like to forbid to use the save button."
|
224 |
msgstr "En caso de que desees prohibir el botón Guardar"
|
225 |
|
226 |
+
#: custom-field-template/custom-field-template.php:973
|
227 |
msgid "Disable the save button"
|
228 |
msgstr "Deshabilitar el botón Guardar"
|
229 |
|
230 |
+
#: custom-field-template/custom-field-template.php:977
|
231 |
msgid "In case that you would like to forbid to use the default custom fields."
|
232 |
msgstr "En caso de que desees prohibir el uso de los campos predeterminados"
|
233 |
|
234 |
+
#: custom-field-template/custom-field-template.php:978
|
235 |
msgid "Disable the default custom fields"
|
236 |
msgstr "Deshabilitar campos predeterminados"
|
237 |
|
238 |
+
#: custom-field-template/custom-field-template.php:982
|
239 |
msgid "In case that you would like to forbid to use the quick edit."
|
240 |
msgstr "En caso de que desees prohibir la edición rápida"
|
241 |
|
242 |
+
#: custom-field-template/custom-field-template.php:983
|
243 |
msgid "Disable the quick edit"
|
244 |
msgstr "Deshabilitar edición rápida"
|
245 |
|
246 |
+
#: custom-field-template/custom-field-template.php:987
|
247 |
msgid "In case that you would like to forbid to display the custom field column on the edit post list page."
|
248 |
msgstr "En caso de que desees ocultar la columna Campos Personalizados de la lista de entradas"
|
249 |
|
250 |
+
#: custom-field-template/custom-field-template.php:988
|
251 |
msgid "Disable the custom field column (The quick edit also does not work.)"
|
252 |
msgstr "Deshabilitar la columna Campos Personalizados (La edición rápida también se desactivará)"
|
253 |
|
254 |
+
#: custom-field-template/custom-field-template.php:992
|
255 |
msgid "In case that you would like to replace the box title with the template title."
|
256 |
msgstr "En caso de que desees reemplazar el título de la caja por el título de la plantilla"
|
257 |
|
258 |
+
#: custom-field-template/custom-field-template.php:993
|
259 |
msgid "Replace the box title"
|
260 |
msgstr "Reemplazar caja de título"
|
261 |
|
262 |
+
#: custom-field-template/custom-field-template.php:997
|
263 |
msgid "In case that you would like to use the shortcode in the widget."
|
264 |
msgstr "En caso de que desees utilizar abreviación de código en el widget"
|
265 |
|
266 |
+
#: custom-field-template/custom-field-template.php:998
|
267 |
msgid "Use the shortcode in the widget"
|
268 |
msgstr "Utilizar abreviaciones de código en el widget"
|
269 |
|
270 |
+
#: custom-field-template/custom-field-template.php:1002
|
271 |
msgid "In case that you would like to use the shortcode in the excerpt."
|
272 |
msgstr "En caso de que desees utilizar abreviación de código en el extracto"
|
273 |
|
274 |
+
#: custom-field-template/custom-field-template.php:1003
|
275 |
msgid "Use the shortcode in the excerpt"
|
276 |
msgstr "Utilizar abreviaciones de código en el extracto"
|
277 |
|
278 |
+
#: custom-field-template/custom-field-template.php:1013
|
279 |
+
msgid "Text to place before every list which is called by the cft shortcode"
|
280 |
+
msgstr "Texto a colocar antes de que cada lista sea llamada por el shortcode CTF"
|
|
|
|
|
|
|
|
|
281 |
|
282 |
+
#: custom-field-template/custom-field-template.php:1015
|
283 |
+
msgid "Text to place after every list which is called by the cft shortcode"
|
284 |
+
msgstr "Texto a colocar después de que cada lista sea llamada por el shortcode CTF"
|
285 |
+
|
286 |
+
#: custom-field-template/custom-field-template.php:1017
|
287 |
+
msgid "Text to place before every value which is called by the cft shortcode"
|
288 |
+
msgstr "Texto a colocar antes de que cada valor sea llamado por el shortcode CTF"
|
289 |
+
|
290 |
+
#: custom-field-template/custom-field-template.php:1019
|
291 |
+
msgid "Text to place after every value which is called by the cft shortcode"
|
292 |
+
msgstr "Texto a colocar después de que cada valor sea llamado por el shortcode CTF"
|
293 |
+
|
294 |
+
#: custom-field-template/custom-field-template.php:1034
|
295 |
msgid "ADMIN CSS"
|
296 |
msgstr "ADMIN CSS"
|
297 |
|
298 |
+
#: custom-field-template/custom-field-template.php:1053
|
299 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
300 |
msgstr "Abreviaciones de código [cft] y [cftsearch]"
|
301 |
|
302 |
+
#: custom-field-template/custom-field-template.php:1056
|
303 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
304 |
msgstr "Para [cft], [key] se convertirá en un valor de [key]."
|
305 |
|
306 |
+
#: custom-field-template/custom-field-template.php:1057
|
307 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
308 |
msgstr "Para [cftsearch], [key] se convertirá en campo de entrada."
|
309 |
|
310 |
+
#: custom-field-template/custom-field-template.php:1066
|
311 |
+
#: custom-field-template/custom-field-template.php:1137
|
312 |
msgid "Use PHP"
|
313 |
msgstr "Usar PHP"
|
314 |
|
315 |
+
#: custom-field-template/custom-field-template.php:1082
|
316 |
msgid "PHP CODE (Experimental Option)"
|
317 |
msgstr "CÓDIGO PHP (Opción en Experimentación)"
|
318 |
|
319 |
+
#: custom-field-template/custom-field-template.php:1084
|
320 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
321 |
msgstr "¿Estás seguro de querer guardar los códigos PHP? Házlo a tu propio riesgo"
|
322 |
|
323 |
+
#: custom-field-template/custom-field-template.php:1085
|
324 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
325 |
msgstr "Para `text` y `textarea`, debes configurar $value como una cadena."
|
326 |
|
327 |
+
#: custom-field-template/custom-field-template.php:1087
|
328 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
329 |
msgstr "Para `checkbox`, `radio`, y `select`, debes configurar tus $valores como un array"
|
330 |
|
331 |
+
#: custom-field-template/custom-field-template.php:1113
|
332 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
333 |
msgstr "Auto Hook para `the_content()` (Opción experimental)"
|
334 |
|
335 |
+
#: custom-field-template/custom-field-template.php:1123
|
336 |
msgid "Position"
|
337 |
msgstr "Posición"
|
338 |
|
339 |
+
#: custom-field-template/custom-field-template.php:1124
|
340 |
+
msgid "Before the content"
|
341 |
msgstr "Antes del contenido"
|
342 |
|
343 |
+
#: custom-field-template/custom-field-template.php:1125
|
344 |
+
msgid "After the content"
|
345 |
msgstr "Después del contenido"
|
346 |
|
347 |
+
#: custom-field-template/custom-field-template.php:1126
|
348 |
#, php-format
|
349 |
+
msgid "Inside the content ([cfthook hook=%d])"
|
350 |
msgstr "Dentro del contenido ([cfthook hook=%d])"
|
351 |
|
352 |
+
#: custom-field-template/custom-field-template.php:1136
|
353 |
msgid "Content"
|
354 |
msgstr "Contenido"
|
355 |
|
356 |
+
#: custom-field-template/custom-field-template.php:1138
|
357 |
msgid "Apply to feeds"
|
358 |
msgstr "Aplicar a los avances"
|
359 |
|
360 |
+
#: custom-field-template/custom-field-template.php:1154
|
361 |
msgid "Rebuild Value Counts"
|
362 |
msgstr "Reconstruir Conteo de Valores"
|
363 |
|
364 |
+
#: custom-field-template/custom-field-template.php:1156
|
365 |
msgid "Are you sure to rebuild all value counts?"
|
366 |
msgstr "¿Seguro que deseas reconstruir los Conteos de Valores?"
|
367 |
|
368 |
+
#: custom-field-template/custom-field-template.php:1160
|
369 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
370 |
msgstr "Los Conteos de Valores son utilizados para guardar temporalmente los valores en cada clave. Ajusta `valueCount = true` en los campos."
|
371 |
|
372 |
+
#: custom-field-template/custom-field-template.php:1164
|
373 |
msgid "Rebuild Value Counts »"
|
374 |
msgstr "Actualizar Conteo de Valores $raquo;"
|
375 |
|
376 |
+
#: custom-field-template/custom-field-template.php:1175
|
377 |
msgid "Rebuild Tags"
|
378 |
msgstr "Reconstruir etiquetas"
|
379 |
|
380 |
+
#: custom-field-template/custom-field-template.php:1177
|
381 |
msgid "Are you sure to rebuild tags?"
|
382 |
msgstr "¿Seguro que deseas reconstruir las etiquetas?"
|
383 |
|
384 |
+
#: custom-field-template/custom-field-template.php:1181
|
385 |
msgid "Rebuild Tags »"
|
386 |
msgstr "Actualizar Etiquetas $raquo;"
|
387 |
|
388 |
+
#: custom-field-template/custom-field-template.php:1192
|
389 |
msgid "Option List"
|
390 |
msgstr "Lista de opciones"
|
391 |
|
392 |
+
#: custom-field-template/custom-field-template.php:1363
|
393 |
msgid "Export Options"
|
394 |
msgstr "Opciones de Exportación"
|
395 |
|
396 |
+
#: custom-field-template/custom-field-template.php:1369
|
397 |
msgid "Export Options »"
|
398 |
msgstr "Opciones de Exportación »"
|
399 |
|
400 |
+
#: custom-field-template/custom-field-template.php:1379
|
401 |
msgid "Import Options"
|
402 |
msgstr "Opciones de Importación"
|
403 |
|
404 |
+
#: custom-field-template/custom-field-template.php:1381
|
405 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
406 |
msgstr "¿Estás seguro de importar opciones? Las que hayas configurado serán sobreescritas"
|
407 |
|
408 |
+
#: custom-field-template/custom-field-template.php:1385
|
409 |
msgid "Import Options »"
|
410 |
msgstr "Opciones de Importación »"
|
411 |
|
412 |
+
#: custom-field-template/custom-field-template.php:1395
|
413 |
msgid "Reset Options"
|
414 |
msgstr "Reiniciar opciones"
|
415 |
|
416 |
+
#: custom-field-template/custom-field-template.php:1397
|
417 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
418 |
msgstr "¿Estás seguro de querer reiniciar las opciones?. Las opciones que habías configurado serán reiniciadas a la configuración predeterminada."
|
419 |
|
420 |
+
#: custom-field-template/custom-field-template.php:1401
|
421 |
msgid "Reset Options »"
|
422 |
msgstr "Reiniciar Opciones »"
|
423 |
|
424 |
+
#: custom-field-template/custom-field-template.php:1411
|
425 |
msgid "Delete Options"
|
426 |
msgstr "Eliminar opciones"
|
427 |
|
428 |
+
#: custom-field-template/custom-field-template.php:1413
|
429 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
430 |
msgstr "¿Estás seguro de querer eliminar las opciones?. Tus configuraciones serán suprimidas."
|
431 |
|
432 |
+
#: custom-field-template/custom-field-template.php:1417
|
433 |
msgid "Delete Options »"
|
434 |
msgstr "Eliminar opciones »"
|
435 |
|
436 |
+
#: custom-field-template/custom-field-template.php:1427
|
437 |
msgid "Donation"
|
438 |
msgstr "Donaciones"
|
439 |
|
440 |
+
#: custom-field-template/custom-field-template.php:1429
|
441 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
442 |
msgstr "Si te agrada este plugin, por favor efectúa una donación vía paypal. Cualquier cantidad será bien recibida y agradecida. Tu apoyo será muy bien apreciado."
|
443 |
|
444 |
+
#: custom-field-template/custom-field-template.php:1525
|
445 |
+
#: custom-field-template/custom-field-template.php:1646
|
446 |
+
#: custom-field-template/custom-field-template.php:1726
|
447 |
+
#: custom-field-template/custom-field-template.php:1900
|
448 |
+
#: custom-field-template/custom-field-template.php:2099
|
449 |
msgid "Add New"
|
450 |
msgstr "Añadir Nuevo"
|
451 |
|
452 |
+
#: custom-field-template/custom-field-template.php:1656
|
453 |
msgid "Clear"
|
454 |
msgstr "Borrar"
|
455 |
|
456 |
+
#: custom-field-template/custom-field-template.php:1742
|
457 |
msgid "Select"
|
458 |
msgstr "Seleccionar"
|
459 |
|
460 |
+
#: custom-field-template/custom-field-template.php:1807
|
461 |
msgid "Add an Image"
|
462 |
msgstr "Añadir una Imagen"
|
463 |
|
464 |
+
#: custom-field-template/custom-field-template.php:1812
|
465 |
msgid "Add Video"
|
466 |
msgstr "Añadir Video"
|
467 |
|
468 |
+
#: custom-field-template/custom-field-template.php:1817
|
469 |
msgid "Add Audio"
|
470 |
msgstr "Añadir Audio"
|
471 |
|
472 |
+
#: custom-field-template/custom-field-template.php:1821
|
473 |
msgid "Add Media"
|
474 |
msgstr "Añadir Media"
|
475 |
|
476 |
+
#: custom-field-template/custom-field-template.php:1828
|
477 |
msgid "Toggle"
|
478 |
msgstr "Intercambiar"
|
479 |
|
480 |
+
#: custom-field-template/custom-field-template.php:1910
|
481 |
+
msgid " OR "
|
482 |
+
msgstr "O"
|
483 |
+
|
484 |
+
#: custom-field-template/custom-field-template.php:1911
|
485 |
+
msgid "Select by Media Picker"
|
486 |
+
msgstr "Elegir por el Selector de Media"
|
487 |
+
|
488 |
+
#: custom-field-template/custom-field-template.php:1934
|
489 |
+
#: custom-field-template/custom-field-template.php:2101
|
490 |
msgid "Delete"
|
491 |
msgstr "Eliminar"
|
492 |
|
493 |
+
#: custom-field-template/custom-field-template.php:2362
|
494 |
msgid "Enable"
|
495 |
msgstr "Habilitar"
|
496 |
|
497 |
+
#: custom-field-template/custom-field-template.php:2366
|
498 |
msgid "Initialize"
|
499 |
msgstr "Inicializar"
|
500 |
|
501 |
+
#: custom-field-template/custom-field-template.php:2367
|
502 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
503 |
msgstr "¿Estás seguro de reiniciar los valores actuales? Los valores predeterminados será cargados"
|
504 |
|
505 |
+
#: custom-field-template/custom-field-template.php:2372
|
506 |
msgid "Save"
|
507 |
msgstr "Guardar"
|
508 |
|
509 |
+
#: custom-field-template/custom-field-template.php:3060
|
510 |
msgid "Search »"
|
511 |
msgstr "Buscar »"
|
512 |
|
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: 2011-
|
6 |
-
"PO-Revision-Date: 2011-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -18,495 +18,504 @@ msgstr ""
|
|
18 |
|
19 |
#: custom-field-template/custom-field-template.php:145
|
20 |
#: custom-field-template/custom-field-template.php:146
|
21 |
-
#: custom-field-template/custom-field-template.php:
|
22 |
-
#: custom-field-template/custom-field-template.php:
|
23 |
-
#: custom-field-template/custom-field-template.php:
|
24 |
-
#: custom-field-template/custom-field-template.php:
|
25 |
-
#: custom-field-template/custom-field-template.php:
|
26 |
msgid "Custom Field Template"
|
27 |
msgstr "カスタムフィールドテンプレート"
|
28 |
|
29 |
-
#: custom-field-template/custom-field-template.php:
|
30 |
msgid "Media Picker"
|
31 |
msgstr "メディアピッカー"
|
32 |
|
33 |
-
#: custom-field-template/custom-field-template.php:
|
34 |
msgid "Use this"
|
35 |
msgstr "これを使用する"
|
36 |
|
37 |
-
#: custom-field-template/custom-field-template.php:
|
38 |
-
#: custom-field-template/custom-field-template.php:
|
39 |
msgid "Load"
|
40 |
msgstr "読込"
|
41 |
|
42 |
-
#: custom-field-template/custom-field-template.php:
|
43 |
msgid "read more"
|
44 |
msgstr "続きを表示"
|
45 |
|
46 |
-
#: custom-field-template/custom-field-template.php:
|
47 |
-
#: custom-field-template/custom-field-template.php:
|
48 |
msgid "Custom Fields"
|
49 |
msgstr "カスタムフィールド"
|
50 |
|
51 |
-
#: custom-field-template/custom-field-template.php:
|
52 |
msgid "Settings"
|
53 |
msgstr "設定"
|
54 |
|
55 |
-
#: custom-field-template/custom-field-template.php:
|
56 |
msgid "Default Template"
|
57 |
msgstr "デフォルトテンプレート"
|
58 |
|
59 |
-
#: custom-field-template/custom-field-template.php:
|
60 |
msgid "You can not use the following words as the field key: `content`, `post_title`, and `excerpt`, and `action`."
|
61 |
msgstr "次のキーワードはフィールドキーとして使用できません。 `content`、`post_title`、`excerpt`、`action`"
|
62 |
|
63 |
-
#: custom-field-template/custom-field-template.php:
|
64 |
-
#: custom-field-template/custom-field-template.php:
|
65 |
-
#: custom-field-template/custom-field-template.php:
|
66 |
-
#: custom-field-template/custom-field-template.php:
|
67 |
-
#: custom-field-template/custom-field-template.php:
|
68 |
-
#: custom-field-template/custom-field-template.php:
|
69 |
msgid "Options updated."
|
70 |
msgstr "オプションは更新されました。"
|
71 |
|
72 |
-
#: custom-field-template/custom-field-template.php:
|
73 |
msgid "Value Counts rebuilt."
|
74 |
msgstr "バリューカウントは再構築されました。"
|
75 |
|
76 |
-
#: custom-field-template/custom-field-template.php:
|
77 |
msgid "Tags rebuilt."
|
78 |
msgstr "タグは再構築されました。"
|
79 |
|
80 |
-
#: custom-field-template/custom-field-template.php:
|
81 |
msgid "Options imported."
|
82 |
msgstr "オプションはインポートされました。"
|
83 |
|
84 |
-
#: custom-field-template/custom-field-template.php:
|
85 |
msgid "Options resetted."
|
86 |
msgstr "オプションはリセットされました。"
|
87 |
|
88 |
-
#: custom-field-template/custom-field-template.php:
|
89 |
msgid "Options deleted."
|
90 |
msgstr "オプションは削除されました。"
|
91 |
|
92 |
-
#: custom-field-template/custom-field-template.php:
|
93 |
-
#: custom-field-template/custom-field-template.php:
|
94 |
-
#: custom-field-template/custom-field-template.php:
|
95 |
-
#: custom-field-template/custom-field-template.php:
|
96 |
-
#: custom-field-template/custom-field-template.php:
|
97 |
-
#: custom-field-template/custom-field-template.php:
|
98 |
-
#: custom-field-template/custom-field-template.php:
|
99 |
-
#: custom-field-template/custom-field-template.php:
|
100 |
-
#: custom-field-template/custom-field-template.php:
|
101 |
-
#: custom-field-template/custom-field-template.php:
|
102 |
-
#: custom-field-template/custom-field-template.php:
|
103 |
-
#: custom-field-template/custom-field-template.php:
|
104 |
-
#: custom-field-template/custom-field-template.php:
|
105 |
-
#: custom-field-template/custom-field-template.php:
|
106 |
msgid "Click to toggle"
|
107 |
msgstr "クリックで切替"
|
108 |
|
109 |
-
#: custom-field-template/custom-field-template.php:
|
110 |
msgid "Custom Field Template Options"
|
111 |
msgstr "カスタムフィールドテンプレートオプション"
|
112 |
|
113 |
-
#: custom-field-template/custom-field-template.php:
|
114 |
-
#: custom-field-template/custom-field-template.php:
|
115 |
-
#: custom-field-template/custom-field-template.php:
|
116 |
msgid "Disable"
|
117 |
msgstr "無効"
|
118 |
|
119 |
-
#: custom-field-template/custom-field-template.php:
|
120 |
msgid "Template Title"
|
121 |
msgstr "テンプレートタイトル"
|
122 |
|
123 |
-
#: custom-field-template/custom-field-template.php:
|
124 |
msgid "Template Instruction"
|
125 |
msgstr "テンプレートインストラクション"
|
126 |
|
127 |
-
#: custom-field-template/custom-field-template.php:
|
128 |
-
#: custom-field-template/custom-field-template.php:
|
129 |
msgid "Post Type"
|
130 |
msgstr "投稿タイプ"
|
131 |
|
132 |
-
#: custom-field-template/custom-field-template.php:
|
133 |
-
#: custom-field-template/custom-field-template.php:
|
134 |
msgid "Both"
|
135 |
msgstr "両方"
|
136 |
|
137 |
-
#: custom-field-template/custom-field-template.php:
|
138 |
-
#: custom-field-template/custom-field-template.php:
|
139 |
msgid "Post"
|
140 |
msgstr "投稿"
|
141 |
|
142 |
-
#: custom-field-template/custom-field-template.php:
|
143 |
-
#: custom-field-template/custom-field-template.php:
|
144 |
msgid "Page"
|
145 |
msgstr "ページ"
|
146 |
|
147 |
-
#: custom-field-template/custom-field-template.php:
|
148 |
-
#: custom-field-template/custom-field-template.php:
|
149 |
msgid "Custom Post Type (comma-deliminated)"
|
150 |
msgstr "カスタムポストタイプ (カンマ区切り)"
|
151 |
|
152 |
-
#: custom-field-template/custom-field-template.php:
|
153 |
msgid "Post ID (comma-deliminated)"
|
154 |
msgstr "Post ID (カンマ区切り)"
|
155 |
|
156 |
-
#: custom-field-template/custom-field-template.php:
|
157 |
-
#: custom-field-template/custom-field-template.php:
|
158 |
msgid "Category ID (comma-deliminated)"
|
159 |
msgstr "カテゴリーID (カンマ区切り)"
|
160 |
|
161 |
-
#: custom-field-template/custom-field-template.php:
|
162 |
msgid "Page Template file name(s) (comma-deliminated)"
|
163 |
msgstr "ページテンプレートファイル名 (カンマ区切り)"
|
164 |
|
165 |
-
#: custom-field-template/custom-field-template.php:
|
166 |
msgid "Template Content"
|
167 |
msgstr "テンプレートコンテンツ"
|
168 |
|
169 |
-
#: custom-field-template/custom-field-template.php:
|
170 |
-
#: custom-field-template/custom-field-template.php:
|
171 |
-
#: custom-field-template/custom-field-template.php:
|
172 |
-
#: custom-field-template/custom-field-template.php:
|
173 |
-
#: custom-field-template/custom-field-template.php:
|
174 |
-
#: custom-field-template/custom-field-template.php:
|
175 |
msgid "Update Options »"
|
176 |
msgstr "オプションを更新する »"
|
177 |
|
178 |
-
#: custom-field-template/custom-field-template.php:
|
179 |
msgid "Global Settings"
|
180 |
msgstr "グローバル設定"
|
181 |
|
182 |
-
#: custom-field-template/custom-field-template.php:
|
183 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
184 |
msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
|
185 |
|
186 |
-
#: custom-field-template/custom-field-template.php:
|
187 |
msgid "Use labels in place of custom keys"
|
188 |
msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
|
189 |
|
190 |
-
#: custom-field-template/custom-field-template.php:
|
191 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
192 |
msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
|
193 |
|
194 |
-
#: custom-field-template/custom-field-template.php:
|
195 |
msgid "Use wpautop function"
|
196 |
msgstr "wpautop関数を使用する"
|
197 |
|
198 |
-
#: custom-field-template/custom-field-template.php:
|
199 |
msgid "In case that you would like to save values automatically in switching templates"
|
200 |
msgstr "テンプレート切替時自動で保存したい場合"
|
201 |
|
202 |
-
#: custom-field-template/custom-field-template.php:
|
203 |
msgid "Use the auto save in switching templates"
|
204 |
msgstr "テンプレート切替時の自動保存を使用する"
|
205 |
|
206 |
-
#: custom-field-template/custom-field-template.php:
|
207 |
msgid "In case that you would like to disable input fields of the custom field template temporarily"
|
208 |
msgstr "一時的にカスタムフィールドテンプレートのインプットフィールドを一時的に無効にしたい場合"
|
209 |
|
210 |
-
#: custom-field-template/custom-field-template.php:
|
211 |
msgid "Use the `Disable` button. The default custom fields will be superseded."
|
212 |
msgstr "無効ボタンを使用する。デフォルトのカスタムフィールドが優先されます。"
|
213 |
|
214 |
-
#: custom-field-template/custom-field-template.php:
|
215 |
msgid "In case that you would like to forbid to use the initialize button."
|
216 |
msgstr "初期化ボタンの使用を禁止する場合"
|
217 |
|
218 |
-
#: custom-field-template/custom-field-template.php:
|
219 |
msgid "Disable the initialize button"
|
220 |
msgstr "初期化ボタンを無効にする"
|
221 |
|
222 |
-
#: custom-field-template/custom-field-template.php:
|
223 |
msgid "In case that you would like to forbid to use the save button."
|
224 |
msgstr "保存ボタンの使用を禁止する場合"
|
225 |
|
226 |
-
#: custom-field-template/custom-field-template.php:
|
227 |
msgid "Disable the save button"
|
228 |
msgstr "保存ボタンを無効にする"
|
229 |
|
230 |
-
#: custom-field-template/custom-field-template.php:
|
231 |
msgid "In case that you would like to forbid to use the default custom fields."
|
232 |
msgstr "デフォルトのカスタムフィールドの使用を禁止する場合"
|
233 |
|
234 |
-
#: custom-field-template/custom-field-template.php:
|
235 |
msgid "Disable the default custom fields"
|
236 |
msgstr "デフォルトのカスタムフィールドを無効にする"
|
237 |
|
238 |
-
#: custom-field-template/custom-field-template.php:
|
239 |
msgid "In case that you would like to forbid to use the quick edit."
|
240 |
msgstr "クイック編集の使用を禁止する場合"
|
241 |
|
242 |
-
#: custom-field-template/custom-field-template.php:
|
243 |
msgid "Disable the quick edit"
|
244 |
msgstr "クイック編集を無効にする"
|
245 |
|
246 |
-
#: custom-field-template/custom-field-template.php:
|
247 |
msgid "In case that you would like to forbid to display the custom field column on the edit post list page."
|
248 |
msgstr "編集リストページのカスタムフィールドカラムの表示を禁止する場合"
|
249 |
|
250 |
-
#: custom-field-template/custom-field-template.php:
|
251 |
msgid "Disable the custom field column (The quick edit also does not work.)"
|
252 |
msgstr "カスタムフィールドカラムを無効にする(クイック編集も動きません)"
|
253 |
|
254 |
-
#: custom-field-template/custom-field-template.php:
|
255 |
msgid "In case that you would like to replace the box title with the template title."
|
256 |
msgstr "ボックスタイトルをテンプレートタイトルで置き換える場合"
|
257 |
|
258 |
-
#: custom-field-template/custom-field-template.php:
|
259 |
msgid "Replace the box title"
|
260 |
msgstr "ボックスタイトルを置き換える"
|
261 |
|
262 |
-
#: custom-field-template/custom-field-template.php:
|
263 |
msgid "In case that you would like to use the shortcode in the widget."
|
264 |
msgstr "ショートコードをウィジェットで使用したい場合"
|
265 |
|
266 |
-
#: custom-field-template/custom-field-template.php:
|
267 |
msgid "Use the shortcode in the widget"
|
268 |
msgstr "ショートコードをウィジェットで使用する"
|
269 |
|
270 |
-
#: custom-field-template/custom-field-template.php:
|
271 |
msgid "In case that you would like to use the shortcode in the excerpt."
|
272 |
msgstr "ショートコードを抜粋で使用したい場合"
|
273 |
|
274 |
-
#: custom-field-template/custom-field-template.php:
|
275 |
msgid "Use the shortcode in the excerpt"
|
276 |
msgstr "ショートコードを抜粋で使用する"
|
277 |
|
278 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
msgid "Text to place before every list which is called by the cft shortcode"
|
280 |
msgstr "cft ショートコードで呼ばれるリストの前のテキスト"
|
281 |
|
282 |
-
#: custom-field-template/custom-field-template.php:
|
283 |
msgid "Text to place after every list which is called by the cft shortcode"
|
284 |
msgstr "cft ショートコードで呼ばれるリストの後のテキスト"
|
285 |
|
286 |
-
#: custom-field-template/custom-field-template.php:
|
287 |
msgid "Text to place before every value which is called by the cft shortcode"
|
288 |
msgstr "cft ショートコードで呼ばれる値の前のテキスト"
|
289 |
|
290 |
-
#: custom-field-template/custom-field-template.php:
|
291 |
msgid "Text to place after every value which is called by the cft shortcode"
|
292 |
msgstr "cft ショートコードで呼ばれる値の後のテキスト"
|
293 |
|
294 |
-
#: custom-field-template/custom-field-template.php:
|
295 |
msgid "ADMIN CSS"
|
296 |
msgstr "ADMIN CSS"
|
297 |
|
298 |
-
#: custom-field-template/custom-field-template.php:
|
299 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
300 |
msgstr "[cft] and [cftsearch] Shortcode Format"
|
301 |
|
302 |
-
#: custom-field-template/custom-field-template.php:
|
303 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
304 |
msgstr "[cft]では、[key]は、[key]の値に置換されます。"
|
305 |
|
306 |
-
#: custom-field-template/custom-field-template.php:
|
307 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
308 |
msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
|
309 |
|
310 |
-
#: custom-field-template/custom-field-template.php:
|
311 |
-
#: custom-field-template/custom-field-template.php:
|
312 |
msgid "Use PHP"
|
313 |
msgstr "PHPを使用する"
|
314 |
|
315 |
-
#: custom-field-template/custom-field-template.php:
|
316 |
msgid "PHP CODE (Experimental Option)"
|
317 |
msgstr "PHP CODE (Experimental Option)"
|
318 |
|
319 |
-
#: custom-field-template/custom-field-template.php:
|
320 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
321 |
msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
|
322 |
|
323 |
-
#: custom-field-template/custom-field-template.php:
|
324 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
325 |
msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
|
326 |
|
327 |
-
#: custom-field-template/custom-field-template.php:
|
328 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
329 |
msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
|
330 |
|
331 |
-
#: custom-field-template/custom-field-template.php:
|
332 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
333 |
msgstr "Auto Hook of `the_content()` (Experimental Option)"
|
334 |
|
335 |
-
#: custom-field-template/custom-field-template.php:
|
336 |
msgid "Position"
|
337 |
msgstr "位置"
|
338 |
|
339 |
-
#: custom-field-template/custom-field-template.php:
|
340 |
msgid "Before the content"
|
341 |
msgstr "コンテンツの前"
|
342 |
|
343 |
-
#: custom-field-template/custom-field-template.php:
|
344 |
msgid "After the content"
|
345 |
msgstr "コンテンツの後"
|
346 |
|
347 |
-
#: custom-field-template/custom-field-template.php:
|
348 |
#, php-format
|
349 |
msgid "Inside the content ([cfthook hook=%d])"
|
350 |
msgstr "コンテンツの中 ([cfthook hook=%d])"
|
351 |
|
352 |
-
#: custom-field-template/custom-field-template.php:
|
353 |
msgid "Content"
|
354 |
msgstr "コンテンツ"
|
355 |
|
356 |
-
#: custom-field-template/custom-field-template.php:
|
357 |
msgid "Apply to feeds"
|
358 |
msgstr "フィードに適用する"
|
359 |
|
360 |
-
#: custom-field-template/custom-field-template.php:
|
361 |
msgid "Rebuild Value Counts"
|
362 |
msgstr "バリューカウントの再構築"
|
363 |
|
364 |
-
#: custom-field-template/custom-field-template.php:
|
365 |
msgid "Are you sure to rebuild all value counts?"
|
366 |
msgstr "本当に全てのバリューカウントを再構築しますか?"
|
367 |
|
368 |
-
#: custom-field-template/custom-field-template.php:
|
369 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
370 |
msgstr "バリューカウントはキーごとに値がどのくらいあるか一時的に保存するのに使用されます。`valueCount = true`をフィールドにセットしてください。"
|
371 |
|
372 |
-
#: custom-field-template/custom-field-template.php:
|
373 |
msgid "Rebuild Value Counts »"
|
374 |
msgstr "バリューカウントを再構築する »"
|
375 |
|
376 |
-
#: custom-field-template/custom-field-template.php:
|
377 |
msgid "Rebuild Tags"
|
378 |
msgstr "タグの再構築"
|
379 |
|
380 |
-
#: custom-field-template/custom-field-template.php:
|
381 |
msgid "Are you sure to rebuild tags?"
|
382 |
msgstr "本当に全てのタグを再構築しますか?"
|
383 |
|
384 |
-
#: custom-field-template/custom-field-template.php:
|
385 |
msgid "Rebuild Tags »"
|
386 |
msgstr "タグを再構築する »"
|
387 |
|
388 |
-
#: custom-field-template/custom-field-template.php:
|
389 |
msgid "Option List"
|
390 |
msgstr "オプションリスト"
|
391 |
|
392 |
-
#: custom-field-template/custom-field-template.php:
|
393 |
msgid "Export Options"
|
394 |
msgstr "オプションをエクスポートする"
|
395 |
|
396 |
-
#: custom-field-template/custom-field-template.php:
|
397 |
msgid "Export Options »"
|
398 |
msgstr "オプションをエクスポートする »"
|
399 |
|
400 |
-
#: custom-field-template/custom-field-template.php:
|
401 |
msgid "Import Options"
|
402 |
msgstr "オプションをインポートする"
|
403 |
|
404 |
-
#: custom-field-template/custom-field-template.php:
|
405 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
406 |
msgstr "本当にオプションをインポートしてもよろしいですか?設定したオプションは上書きされます。"
|
407 |
|
408 |
-
#: custom-field-template/custom-field-template.php:
|
409 |
msgid "Import Options »"
|
410 |
msgstr "オプションをインポートする »"
|
411 |
|
412 |
-
#: custom-field-template/custom-field-template.php:
|
413 |
msgid "Reset Options"
|
414 |
msgstr "オプションをリセットする"
|
415 |
|
416 |
-
#: custom-field-template/custom-field-template.php:
|
417 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
418 |
msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
|
419 |
|
420 |
-
#: custom-field-template/custom-field-template.php:
|
421 |
msgid "Reset Options »"
|
422 |
msgstr "オプションをリセットする »"
|
423 |
|
424 |
-
#: custom-field-template/custom-field-template.php:
|
425 |
msgid "Delete Options"
|
426 |
msgstr "オプションを削除する"
|
427 |
|
428 |
-
#: custom-field-template/custom-field-template.php:
|
429 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
430 |
msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
|
431 |
|
432 |
-
#: custom-field-template/custom-field-template.php:
|
433 |
msgid "Delete Options »"
|
434 |
msgstr "オプションを削除する »"
|
435 |
|
436 |
-
#: custom-field-template/custom-field-template.php:
|
437 |
msgid "Donation"
|
438 |
msgstr "寄付"
|
439 |
|
440 |
-
#: custom-field-template/custom-field-template.php:
|
441 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
442 |
msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
|
443 |
|
444 |
-
#: custom-field-template/custom-field-template.php:
|
445 |
-
#: custom-field-template/custom-field-template.php:
|
446 |
-
#: custom-field-template/custom-field-template.php:
|
447 |
-
#: custom-field-template/custom-field-template.php:
|
448 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
449 |
msgid "Add New"
|
450 |
msgstr "追加"
|
451 |
|
452 |
-
#: custom-field-template/custom-field-template.php:
|
453 |
msgid "Clear"
|
454 |
msgstr "解除"
|
455 |
|
456 |
-
#: custom-field-template/custom-field-template.php:
|
457 |
msgid "Select"
|
458 |
msgstr "選択してください"
|
459 |
|
460 |
-
#: custom-field-template/custom-field-template.php:
|
461 |
msgid "Add an Image"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: custom-field-template/custom-field-template.php:
|
465 |
msgid "Add Video"
|
466 |
msgstr ""
|
467 |
|
468 |
-
#: custom-field-template/custom-field-template.php:
|
469 |
msgid "Add Audio"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: custom-field-template/custom-field-template.php:
|
473 |
msgid "Add Media"
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: custom-field-template/custom-field-template.php:
|
477 |
msgid "Toggle"
|
478 |
msgstr "切り替え"
|
479 |
|
480 |
-
#: custom-field-template/custom-field-template.php:
|
481 |
msgid " OR "
|
482 |
msgstr " または "
|
483 |
|
484 |
-
#: custom-field-template/custom-field-template.php:
|
485 |
msgid "Select by Media Picker"
|
486 |
msgstr "メディアピッカーで選択"
|
487 |
|
488 |
-
#: custom-field-template/custom-field-template.php:
|
489 |
-
#: custom-field-template/custom-field-template.php:
|
490 |
msgid "Delete"
|
491 |
msgstr "削除"
|
492 |
|
493 |
-
#: custom-field-template/custom-field-template.php:
|
494 |
msgid "Enable"
|
495 |
msgstr "有効"
|
496 |
|
497 |
-
#: custom-field-template/custom-field-template.php:
|
498 |
msgid "Initialize"
|
499 |
msgstr "初期化"
|
500 |
|
501 |
-
#: custom-field-template/custom-field-template.php:
|
502 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
503 |
msgstr "現在値をリセットしてもよろしいですか?初期値が読み込まれます。"
|
504 |
|
505 |
-
#: custom-field-template/custom-field-template.php:
|
506 |
msgid "Save"
|
507 |
msgstr "保存"
|
508 |
|
509 |
-
#: custom-field-template/custom-field-template.php:
|
510 |
msgid "Search »"
|
511 |
msgstr "検索 »"
|
512 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-04-13 00:14+0900\n"
|
6 |
+
"PO-Revision-Date: 2011-04-13 00:15+0900\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
18 |
|
19 |
#: custom-field-template/custom-field-template.php:145
|
20 |
#: custom-field-template/custom-field-template.php:146
|
21 |
+
#: custom-field-template/custom-field-template.php:168
|
22 |
+
#: custom-field-template/custom-field-template.php:642
|
23 |
+
#: custom-field-template/custom-field-template.php:919
|
24 |
+
#: custom-field-template/custom-field-template.php:2262
|
25 |
+
#: custom-field-template/custom-field-template.php:2399
|
26 |
msgid "Custom Field Template"
|
27 |
msgstr "カスタムフィールドテンプレート"
|
28 |
|
29 |
+
#: custom-field-template/custom-field-template.php:184
|
30 |
msgid "Media Picker"
|
31 |
msgstr "メディアピッカー"
|
32 |
|
33 |
+
#: custom-field-template/custom-field-template.php:186
|
34 |
msgid "Use this"
|
35 |
msgstr "これを使用する"
|
36 |
|
37 |
+
#: custom-field-template/custom-field-template.php:288
|
38 |
+
#: custom-field-template/custom-field-template.php:2610
|
39 |
msgid "Load"
|
40 |
msgstr "読込"
|
41 |
|
42 |
+
#: custom-field-template/custom-field-template.php:464
|
43 |
msgid "read more"
|
44 |
msgstr "続きを表示"
|
45 |
|
46 |
+
#: custom-field-template/custom-field-template.php:482
|
47 |
+
#: custom-field-template/custom-field-template.php:492
|
48 |
msgid "Custom Fields"
|
49 |
msgstr "カスタムフィールド"
|
50 |
|
51 |
+
#: custom-field-template/custom-field-template.php:524
|
52 |
msgid "Settings"
|
53 |
msgstr "設定"
|
54 |
|
55 |
+
#: custom-field-template/custom-field-template.php:562
|
56 |
msgid "Default Template"
|
57 |
msgstr "デフォルトテンプレート"
|
58 |
|
59 |
+
#: custom-field-template/custom-field-template.php:776
|
60 |
msgid "You can not use the following words as the field key: `content`, `post_title`, and `excerpt`, and `action`."
|
61 |
msgstr "次のキーワードはフィールドキーとして使用できません。 `content`、`post_title`、`excerpt`、`action`"
|
62 |
|
63 |
+
#: custom-field-template/custom-field-template.php:791
|
64 |
+
#: custom-field-template/custom-field-template.php:815
|
65 |
+
#: custom-field-template/custom-field-template.php:819
|
66 |
+
#: custom-field-template/custom-field-template.php:831
|
67 |
+
#: custom-field-template/custom-field-template.php:839
|
68 |
+
#: custom-field-template/custom-field-template.php:856
|
69 |
msgid "Options updated."
|
70 |
msgstr "オプションは更新されました。"
|
71 |
|
72 |
+
#: custom-field-template/custom-field-template.php:860
|
73 |
msgid "Value Counts rebuilt."
|
74 |
msgstr "バリューカウントは再構築されました。"
|
75 |
|
76 |
+
#: custom-field-template/custom-field-template.php:863
|
77 |
msgid "Tags rebuilt."
|
78 |
msgstr "タグは再構築されました。"
|
79 |
|
80 |
+
#: custom-field-template/custom-field-template.php:872
|
81 |
msgid "Options imported."
|
82 |
msgstr "オプションはインポートされました。"
|
83 |
|
84 |
+
#: custom-field-template/custom-field-template.php:879
|
85 |
msgid "Options resetted."
|
86 |
msgstr "オプションはリセットされました。"
|
87 |
|
88 |
+
#: custom-field-template/custom-field-template.php:883
|
89 |
msgid "Options deleted."
|
90 |
msgstr "オプションは削除されました。"
|
91 |
|
92 |
+
#: custom-field-template/custom-field-template.php:925
|
93 |
+
#: custom-field-template/custom-field-template.php:971
|
94 |
+
#: custom-field-template/custom-field-template.php:1077
|
95 |
+
#: custom-field-template/custom-field-template.php:1096
|
96 |
+
#: custom-field-template/custom-field-template.php:1127
|
97 |
+
#: custom-field-template/custom-field-template.php:1160
|
98 |
+
#: custom-field-template/custom-field-template.php:1203
|
99 |
+
#: custom-field-template/custom-field-template.php:1224
|
100 |
+
#: custom-field-template/custom-field-template.php:1241
|
101 |
+
#: custom-field-template/custom-field-template.php:1412
|
102 |
+
#: custom-field-template/custom-field-template.php:1428
|
103 |
+
#: custom-field-template/custom-field-template.php:1444
|
104 |
+
#: custom-field-template/custom-field-template.php:1460
|
105 |
+
#: custom-field-template/custom-field-template.php:1476
|
106 |
msgid "Click to toggle"
|
107 |
msgstr "クリックで切替"
|
108 |
|
109 |
+
#: custom-field-template/custom-field-template.php:926
|
110 |
msgid "Custom Field Template Options"
|
111 |
msgstr "カスタムフィールドテンプレートオプション"
|
112 |
|
113 |
+
#: custom-field-template/custom-field-template.php:936
|
114 |
+
#: custom-field-template/custom-field-template.php:2453
|
115 |
+
#: custom-field-template/custom-field-template.php:2454
|
116 |
msgid "Disable"
|
117 |
msgstr "無効"
|
118 |
|
119 |
+
#: custom-field-template/custom-field-template.php:938
|
120 |
msgid "Template Title"
|
121 |
msgstr "テンプレートタイトル"
|
122 |
|
123 |
+
#: custom-field-template/custom-field-template.php:940
|
124 |
msgid "Template Instruction"
|
125 |
msgstr "テンプレートインストラクション"
|
126 |
|
127 |
+
#: custom-field-template/custom-field-template.php:942
|
128 |
+
#: custom-field-template/custom-field-template.php:1178
|
129 |
msgid "Post Type"
|
130 |
msgstr "投稿タイプ"
|
131 |
|
132 |
+
#: custom-field-template/custom-field-template.php:944
|
133 |
+
#: custom-field-template/custom-field-template.php:1179
|
134 |
msgid "Both"
|
135 |
msgstr "両方"
|
136 |
|
137 |
+
#: custom-field-template/custom-field-template.php:945
|
138 |
+
#: custom-field-template/custom-field-template.php:1180
|
139 |
msgid "Post"
|
140 |
msgstr "投稿"
|
141 |
|
142 |
+
#: custom-field-template/custom-field-template.php:946
|
143 |
+
#: custom-field-template/custom-field-template.php:1181
|
144 |
msgid "Page"
|
145 |
msgstr "ページ"
|
146 |
|
147 |
+
#: custom-field-template/custom-field-template.php:947
|
148 |
+
#: custom-field-template/custom-field-template.php:1182
|
149 |
msgid "Custom Post Type (comma-deliminated)"
|
150 |
msgstr "カスタムポストタイプ (カンマ区切り)"
|
151 |
|
152 |
+
#: custom-field-template/custom-field-template.php:949
|
153 |
msgid "Post ID (comma-deliminated)"
|
154 |
msgstr "Post ID (カンマ区切り)"
|
155 |
|
156 |
+
#: custom-field-template/custom-field-template.php:951
|
157 |
+
#: custom-field-template/custom-field-template.php:1184
|
158 |
msgid "Category ID (comma-deliminated)"
|
159 |
msgstr "カテゴリーID (カンマ区切り)"
|
160 |
|
161 |
+
#: custom-field-template/custom-field-template.php:953
|
162 |
msgid "Page Template file name(s) (comma-deliminated)"
|
163 |
msgstr "ページテンプレートファイル名 (カンマ区切り)"
|
164 |
|
165 |
+
#: custom-field-template/custom-field-template.php:955
|
166 |
msgid "Template Content"
|
167 |
msgstr "テンプレートコンテンツ"
|
168 |
|
169 |
+
#: custom-field-template/custom-field-template.php:962
|
170 |
+
#: custom-field-template/custom-field-template.php:1068
|
171 |
+
#: custom-field-template/custom-field-template.php:1087
|
172 |
+
#: custom-field-template/custom-field-template.php:1118
|
173 |
+
#: custom-field-template/custom-field-template.php:1151
|
174 |
+
#: custom-field-template/custom-field-template.php:1194
|
175 |
msgid "Update Options »"
|
176 |
msgstr "オプションを更新する »"
|
177 |
|
178 |
+
#: custom-field-template/custom-field-template.php:972
|
179 |
msgid "Global Settings"
|
180 |
msgstr "グローバル設定"
|
181 |
|
182 |
+
#: custom-field-template/custom-field-template.php:987
|
183 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
184 |
msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
|
185 |
|
186 |
+
#: custom-field-template/custom-field-template.php:988
|
187 |
msgid "Use labels in place of custom keys"
|
188 |
msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
|
189 |
|
190 |
+
#: custom-field-template/custom-field-template.php:991
|
191 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
192 |
msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
|
193 |
|
194 |
+
#: custom-field-template/custom-field-template.php:992
|
195 |
msgid "Use wpautop function"
|
196 |
msgstr "wpautop関数を使用する"
|
197 |
|
198 |
+
#: custom-field-template/custom-field-template.php:996
|
199 |
msgid "In case that you would like to save values automatically in switching templates"
|
200 |
msgstr "テンプレート切替時自動で保存したい場合"
|
201 |
|
202 |
+
#: custom-field-template/custom-field-template.php:997
|
203 |
msgid "Use the auto save in switching templates"
|
204 |
msgstr "テンプレート切替時の自動保存を使用する"
|
205 |
|
206 |
+
#: custom-field-template/custom-field-template.php:1001
|
207 |
msgid "In case that you would like to disable input fields of the custom field template temporarily"
|
208 |
msgstr "一時的にカスタムフィールドテンプレートのインプットフィールドを一時的に無効にしたい場合"
|
209 |
|
210 |
+
#: custom-field-template/custom-field-template.php:1002
|
211 |
msgid "Use the `Disable` button. The default custom fields will be superseded."
|
212 |
msgstr "無効ボタンを使用する。デフォルトのカスタムフィールドが優先されます。"
|
213 |
|
214 |
+
#: custom-field-template/custom-field-template.php:1006
|
215 |
msgid "In case that you would like to forbid to use the initialize button."
|
216 |
msgstr "初期化ボタンの使用を禁止する場合"
|
217 |
|
218 |
+
#: custom-field-template/custom-field-template.php:1007
|
219 |
msgid "Disable the initialize button"
|
220 |
msgstr "初期化ボタンを無効にする"
|
221 |
|
222 |
+
#: custom-field-template/custom-field-template.php:1011
|
223 |
msgid "In case that you would like to forbid to use the save button."
|
224 |
msgstr "保存ボタンの使用を禁止する場合"
|
225 |
|
226 |
+
#: custom-field-template/custom-field-template.php:1012
|
227 |
msgid "Disable the save button"
|
228 |
msgstr "保存ボタンを無効にする"
|
229 |
|
230 |
+
#: custom-field-template/custom-field-template.php:1016
|
231 |
msgid "In case that you would like to forbid to use the default custom fields."
|
232 |
msgstr "デフォルトのカスタムフィールドの使用を禁止する場合"
|
233 |
|
234 |
+
#: custom-field-template/custom-field-template.php:1017
|
235 |
msgid "Disable the default custom fields"
|
236 |
msgstr "デフォルトのカスタムフィールドを無効にする"
|
237 |
|
238 |
+
#: custom-field-template/custom-field-template.php:1021
|
239 |
msgid "In case that you would like to forbid to use the quick edit."
|
240 |
msgstr "クイック編集の使用を禁止する場合"
|
241 |
|
242 |
+
#: custom-field-template/custom-field-template.php:1022
|
243 |
msgid "Disable the quick edit"
|
244 |
msgstr "クイック編集を無効にする"
|
245 |
|
246 |
+
#: custom-field-template/custom-field-template.php:1026
|
247 |
msgid "In case that you would like to forbid to display the custom field column on the edit post list page."
|
248 |
msgstr "編集リストページのカスタムフィールドカラムの表示を禁止する場合"
|
249 |
|
250 |
+
#: custom-field-template/custom-field-template.php:1027
|
251 |
msgid "Disable the custom field column (The quick edit also does not work.)"
|
252 |
msgstr "カスタムフィールドカラムを無効にする(クイック編集も動きません)"
|
253 |
|
254 |
+
#: custom-field-template/custom-field-template.php:1031
|
255 |
msgid "In case that you would like to replace the box title with the template title."
|
256 |
msgstr "ボックスタイトルをテンプレートタイトルで置き換える場合"
|
257 |
|
258 |
+
#: custom-field-template/custom-field-template.php:1032
|
259 |
msgid "Replace the box title"
|
260 |
msgstr "ボックスタイトルを置き換える"
|
261 |
|
262 |
+
#: custom-field-template/custom-field-template.php:1036
|
263 |
msgid "In case that you would like to use the shortcode in the widget."
|
264 |
msgstr "ショートコードをウィジェットで使用したい場合"
|
265 |
|
266 |
+
#: custom-field-template/custom-field-template.php:1037
|
267 |
msgid "Use the shortcode in the widget"
|
268 |
msgstr "ショートコードをウィジェットで使用する"
|
269 |
|
270 |
+
#: custom-field-template/custom-field-template.php:1041
|
271 |
msgid "In case that you would like to use the shortcode in the excerpt."
|
272 |
msgstr "ショートコードを抜粋で使用したい場合"
|
273 |
|
274 |
+
#: custom-field-template/custom-field-template.php:1042
|
275 |
msgid "Use the shortcode in the excerpt"
|
276 |
msgstr "ショートコードを抜粋で使用する"
|
277 |
|
278 |
+
#: custom-field-template/custom-field-template.php:1046
|
279 |
+
msgid "In case that you would like to use the jQuery validation."
|
280 |
+
msgstr "jQuery バリデーションを使用したい場合"
|
281 |
+
|
282 |
+
#: custom-field-template/custom-field-template.php:1047
|
283 |
+
msgid "Use the jQuery validation"
|
284 |
+
msgstr "jQuery バリデーションを使用する"
|
285 |
+
|
286 |
+
#: custom-field-template/custom-field-template.php:1057
|
287 |
msgid "Text to place before every list which is called by the cft shortcode"
|
288 |
msgstr "cft ショートコードで呼ばれるリストの前のテキスト"
|
289 |
|
290 |
+
#: custom-field-template/custom-field-template.php:1059
|
291 |
msgid "Text to place after every list which is called by the cft shortcode"
|
292 |
msgstr "cft ショートコードで呼ばれるリストの後のテキスト"
|
293 |
|
294 |
+
#: custom-field-template/custom-field-template.php:1061
|
295 |
msgid "Text to place before every value which is called by the cft shortcode"
|
296 |
msgstr "cft ショートコードで呼ばれる値の前のテキスト"
|
297 |
|
298 |
+
#: custom-field-template/custom-field-template.php:1063
|
299 |
msgid "Text to place after every value which is called by the cft shortcode"
|
300 |
msgstr "cft ショートコードで呼ばれる値の後のテキスト"
|
301 |
|
302 |
+
#: custom-field-template/custom-field-template.php:1078
|
303 |
msgid "ADMIN CSS"
|
304 |
msgstr "ADMIN CSS"
|
305 |
|
306 |
+
#: custom-field-template/custom-field-template.php:1097
|
307 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
308 |
msgstr "[cft] and [cftsearch] Shortcode Format"
|
309 |
|
310 |
+
#: custom-field-template/custom-field-template.php:1100
|
311 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
312 |
msgstr "[cft]では、[key]は、[key]の値に置換されます。"
|
313 |
|
314 |
+
#: custom-field-template/custom-field-template.php:1101
|
315 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
316 |
msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
|
317 |
|
318 |
+
#: custom-field-template/custom-field-template.php:1112
|
319 |
+
#: custom-field-template/custom-field-template.php:1187
|
320 |
msgid "Use PHP"
|
321 |
msgstr "PHPを使用する"
|
322 |
|
323 |
+
#: custom-field-template/custom-field-template.php:1128
|
324 |
msgid "PHP CODE (Experimental Option)"
|
325 |
msgstr "PHP CODE (Experimental Option)"
|
326 |
|
327 |
+
#: custom-field-template/custom-field-template.php:1130
|
328 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
329 |
msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
|
330 |
|
331 |
+
#: custom-field-template/custom-field-template.php:1131
|
332 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
333 |
msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
|
334 |
|
335 |
+
#: custom-field-template/custom-field-template.php:1133
|
336 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
337 |
msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
|
338 |
|
339 |
+
#: custom-field-template/custom-field-template.php:1161
|
340 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
341 |
msgstr "Auto Hook of `the_content()` (Experimental Option)"
|
342 |
|
343 |
+
#: custom-field-template/custom-field-template.php:1173
|
344 |
msgid "Position"
|
345 |
msgstr "位置"
|
346 |
|
347 |
+
#: custom-field-template/custom-field-template.php:1174
|
348 |
msgid "Before the content"
|
349 |
msgstr "コンテンツの前"
|
350 |
|
351 |
+
#: custom-field-template/custom-field-template.php:1175
|
352 |
msgid "After the content"
|
353 |
msgstr "コンテンツの後"
|
354 |
|
355 |
+
#: custom-field-template/custom-field-template.php:1176
|
356 |
#, php-format
|
357 |
msgid "Inside the content ([cfthook hook=%d])"
|
358 |
msgstr "コンテンツの中 ([cfthook hook=%d])"
|
359 |
|
360 |
+
#: custom-field-template/custom-field-template.php:1186
|
361 |
msgid "Content"
|
362 |
msgstr "コンテンツ"
|
363 |
|
364 |
+
#: custom-field-template/custom-field-template.php:1188
|
365 |
msgid "Apply to feeds"
|
366 |
msgstr "フィードに適用する"
|
367 |
|
368 |
+
#: custom-field-template/custom-field-template.php:1204
|
369 |
msgid "Rebuild Value Counts"
|
370 |
msgstr "バリューカウントの再構築"
|
371 |
|
372 |
+
#: custom-field-template/custom-field-template.php:1206
|
373 |
msgid "Are you sure to rebuild all value counts?"
|
374 |
msgstr "本当に全てのバリューカウントを再構築しますか?"
|
375 |
|
376 |
+
#: custom-field-template/custom-field-template.php:1210
|
377 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
378 |
msgstr "バリューカウントはキーごとに値がどのくらいあるか一時的に保存するのに使用されます。`valueCount = true`をフィールドにセットしてください。"
|
379 |
|
380 |
+
#: custom-field-template/custom-field-template.php:1214
|
381 |
msgid "Rebuild Value Counts »"
|
382 |
msgstr "バリューカウントを再構築する »"
|
383 |
|
384 |
+
#: custom-field-template/custom-field-template.php:1225
|
385 |
msgid "Rebuild Tags"
|
386 |
msgstr "タグの再構築"
|
387 |
|
388 |
+
#: custom-field-template/custom-field-template.php:1227
|
389 |
msgid "Are you sure to rebuild tags?"
|
390 |
msgstr "本当に全てのタグを再構築しますか?"
|
391 |
|
392 |
+
#: custom-field-template/custom-field-template.php:1231
|
393 |
msgid "Rebuild Tags »"
|
394 |
msgstr "タグを再構築する »"
|
395 |
|
396 |
+
#: custom-field-template/custom-field-template.php:1242
|
397 |
msgid "Option List"
|
398 |
msgstr "オプションリスト"
|
399 |
|
400 |
+
#: custom-field-template/custom-field-template.php:1413
|
401 |
msgid "Export Options"
|
402 |
msgstr "オプションをエクスポートする"
|
403 |
|
404 |
+
#: custom-field-template/custom-field-template.php:1419
|
405 |
msgid "Export Options »"
|
406 |
msgstr "オプションをエクスポートする »"
|
407 |
|
408 |
+
#: custom-field-template/custom-field-template.php:1429
|
409 |
msgid "Import Options"
|
410 |
msgstr "オプションをインポートする"
|
411 |
|
412 |
+
#: custom-field-template/custom-field-template.php:1431
|
413 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
414 |
msgstr "本当にオプションをインポートしてもよろしいですか?設定したオプションは上書きされます。"
|
415 |
|
416 |
+
#: custom-field-template/custom-field-template.php:1435
|
417 |
msgid "Import Options »"
|
418 |
msgstr "オプションをインポートする »"
|
419 |
|
420 |
+
#: custom-field-template/custom-field-template.php:1445
|
421 |
msgid "Reset Options"
|
422 |
msgstr "オプションをリセットする"
|
423 |
|
424 |
+
#: custom-field-template/custom-field-template.php:1447
|
425 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
426 |
msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
|
427 |
|
428 |
+
#: custom-field-template/custom-field-template.php:1451
|
429 |
msgid "Reset Options »"
|
430 |
msgstr "オプションをリセットする »"
|
431 |
|
432 |
+
#: custom-field-template/custom-field-template.php:1461
|
433 |
msgid "Delete Options"
|
434 |
msgstr "オプションを削除する"
|
435 |
|
436 |
+
#: custom-field-template/custom-field-template.php:1463
|
437 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
438 |
msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
|
439 |
|
440 |
+
#: custom-field-template/custom-field-template.php:1467
|
441 |
msgid "Delete Options »"
|
442 |
msgstr "オプションを削除する »"
|
443 |
|
444 |
+
#: custom-field-template/custom-field-template.php:1477
|
445 |
msgid "Donation"
|
446 |
msgstr "寄付"
|
447 |
|
448 |
+
#: custom-field-template/custom-field-template.php:1479
|
449 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
450 |
msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
|
451 |
|
452 |
+
#: custom-field-template/custom-field-template.php:1582
|
453 |
+
#: custom-field-template/custom-field-template.php:1713
|
454 |
+
#: custom-field-template/custom-field-template.php:1797
|
455 |
+
#: custom-field-template/custom-field-template.php:1938
|
456 |
+
#: custom-field-template/custom-field-template.php:1994
|
457 |
+
#: custom-field-template/custom-field-template.php:2195
|
458 |
msgid "Add New"
|
459 |
msgstr "追加"
|
460 |
|
461 |
+
#: custom-field-template/custom-field-template.php:1723
|
462 |
msgid "Clear"
|
463 |
msgstr "解除"
|
464 |
|
465 |
+
#: custom-field-template/custom-field-template.php:1813
|
466 |
msgid "Select"
|
467 |
msgstr "選択してください"
|
468 |
|
469 |
+
#: custom-field-template/custom-field-template.php:1889
|
470 |
msgid "Add an Image"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: custom-field-template/custom-field-template.php:1894
|
474 |
msgid "Add Video"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: custom-field-template/custom-field-template.php:1899
|
478 |
msgid "Add Audio"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: custom-field-template/custom-field-template.php:1903
|
482 |
msgid "Add Media"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: custom-field-template/custom-field-template.php:1910
|
486 |
msgid "Toggle"
|
487 |
msgstr "切り替え"
|
488 |
|
489 |
+
#: custom-field-template/custom-field-template.php:2004
|
490 |
msgid " OR "
|
491 |
msgstr " または "
|
492 |
|
493 |
+
#: custom-field-template/custom-field-template.php:2005
|
494 |
msgid "Select by Media Picker"
|
495 |
msgstr "メディアピッカーで選択"
|
496 |
|
497 |
+
#: custom-field-template/custom-field-template.php:2028
|
498 |
+
#: custom-field-template/custom-field-template.php:2197
|
499 |
msgid "Delete"
|
500 |
msgstr "削除"
|
501 |
|
502 |
+
#: custom-field-template/custom-field-template.php:2454
|
503 |
msgid "Enable"
|
504 |
msgstr "有効"
|
505 |
|
506 |
+
#: custom-field-template/custom-field-template.php:2458
|
507 |
msgid "Initialize"
|
508 |
msgstr "初期化"
|
509 |
|
510 |
+
#: custom-field-template/custom-field-template.php:2459
|
511 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
512 |
msgstr "現在値をリセットしてもよろしいですか?初期値が読み込まれます。"
|
513 |
|
514 |
+
#: custom-field-template/custom-field-template.php:2464
|
515 |
msgid "Save"
|
516 |
msgstr "保存"
|
517 |
|
518 |
+
#: custom-field-template/custom-field-template.php:3157
|
519 |
msgid "Search »"
|
520 |
msgstr "検索 »"
|
521 |
|
custom-field-template.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
|
|
4 |
Plugin URI: http://wpgogo.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.8.
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
@@ -55,7 +55,7 @@ class custom_field_template {
|
|
55 |
add_filter( 'attachment_fields_to_edit', array(&$this, 'custom_field_template_attachment_fields_to_edit'), 10, 2 );
|
56 |
|
57 |
if ( isset($_REQUEST['cftsearch_submit']) ) :
|
58 |
-
if ( $_REQUEST['limit'] )
|
59 |
add_action( 'post_limits', array(&$this, 'custom_field_template_post_limits'));
|
60 |
add_filter( 'posts_join', array(&$this, 'custom_field_template_posts_join') );
|
61 |
add_filter( 'posts_where', array(&$this, 'custom_field_template_posts_where'), 100 );
|
@@ -80,18 +80,18 @@ class custom_field_template {
|
|
80 |
}
|
81 |
}
|
82 |
|
83 |
-
if ( is_user_logged_in() && isset($_REQUEST['post']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'selectbox' ) {
|
84 |
echo $this->custom_field_template_selectbox();
|
85 |
exit();
|
86 |
}
|
87 |
|
88 |
-
if ( is_user_logged_in() && isset($_REQUEST['post']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxsave' ) {
|
89 |
if ( $_REQUEST['post'] > 0 )
|
90 |
$this->edit_meta_value( $_REQUEST['post'], '' );
|
91 |
exit();
|
92 |
}
|
93 |
|
94 |
-
if ( is_user_logged_in() && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxload') {
|
95 |
if ( isset($_REQUEST['id']) )
|
96 |
$id = $_REQUEST['id'];
|
97 |
elseif ( isset($options['posts'][$_REQUEST['post']]) )
|
@@ -122,7 +122,7 @@ class custom_field_template {
|
|
122 |
endif;
|
123 |
endif;
|
124 |
|
125 |
-
if ( $options['custom_field_template_widget_shortcode'] )
|
126 |
add_filter('widget_text', 'do_shortcode');
|
127 |
|
128 |
if ( substr($wp_version, 0, 3) >= '2.7' ) {
|
@@ -144,7 +144,7 @@ class custom_field_template {
|
|
144 |
require_once(ABSPATH . 'wp-admin/includes/template.php');
|
145 |
add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'post', 'normal', 'core');
|
146 |
add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'page', 'normal', 'core');
|
147 |
-
if ( function_exists('remove_meta_box') && $options['custom_field_template_disable_default_custom_fields'] ) :
|
148 |
remove_meta_box('postcustom', 'post', 'normal');
|
149 |
remove_meta_box('postcustom', 'page', 'normal');
|
150 |
remove_meta_box('pagecustomdiv', 'page', 'normal');
|
@@ -153,12 +153,14 @@ class custom_field_template {
|
|
153 |
if ( is_array($options['custom_fields']) ) :
|
154 |
$custom_post_type = array();
|
155 |
foreach($options['custom_fields'] as $key => $val ) :
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
|
|
|
|
160 |
endforeach;
|
161 |
-
if ( is_array($custom_post_type) ) :
|
162 |
foreach( $custom_post_type as $val ) :
|
163 |
if ( function_exists('remove_meta_box') && $options['custom_field_template_disable_default_custom_fields'] ) :
|
164 |
remove_meta_box('postcustom', $val, 'normal');
|
@@ -229,12 +231,12 @@ class custom_field_template {
|
|
229 |
}
|
230 |
}
|
231 |
|
232 |
-
foreach ( (array) $ids as $id ) {
|
233 |
if ( ! isset($cache[$id]) )
|
234 |
$cache[$id] = array();
|
235 |
-
}
|
236 |
|
237 |
-
if ( is_array($cache) ) :
|
238 |
foreach ( (array) array_keys($cache) as $post)
|
239 |
wp_cache_set($post, $cache[$post], 'cft_post_meta');
|
240 |
|
@@ -299,6 +301,7 @@ class custom_field_template {
|
|
299 |
|
300 |
function custom_field_template_admin_head() {
|
301 |
global $wp_version;
|
|
|
302 |
|
303 |
if ( !defined('WP_PLUGIN_DIR') )
|
304 |
$plugin_dir = str_replace( ABSPATH, '', dirname(__FILE__) );
|
@@ -307,6 +310,24 @@ class custom_field_template {
|
|
307 |
|
308 |
echo '<link rel="stylesheet" type="text/css" href="' . wp_guess_url() . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/datePicker.css" />'."\n";
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
if ( substr($wp_version, 0, 3) >= '2.7' && is_user_logged_in() && ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') ) && !strstr($_SERVER['REQUEST_URI'], 'page=') ) {
|
311 |
?>
|
312 |
<script type="text/javascript">
|
@@ -391,6 +412,7 @@ class custom_field_template {
|
|
391 |
.cft-actions { visibility: hidden; padding: 2px 0 0; }
|
392 |
tr:hover .cft-actions { visibility: visible; }
|
393 |
.inline-edit-row fieldset label { display:inline; }
|
|
|
394 |
-->
|
395 |
</style>
|
396 |
<?php
|
@@ -506,6 +528,9 @@ class custom_field_template {
|
|
506 |
}
|
507 |
|
508 |
function custom_field_template_admin_scripts() {
|
|
|
|
|
|
|
509 |
if ( !defined('WP_PLUGIN_DIR') )
|
510 |
$plugin_dir = str_replace( ABSPATH, '', dirname(__FILE__) );
|
511 |
else
|
@@ -517,9 +542,16 @@ class custom_field_template {
|
|
517 |
wp_enqueue_script( 'bgiframe', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.bgiframe.js', array('jquery') ) ;
|
518 |
wp_enqueue_script( 'datePicker', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.datePicker.js', array('jquery') );
|
519 |
wp_enqueue_script( 'textarearesizer', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.textarearesizer.js', array('jquery') );
|
520 |
-
if( strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || $post->post_type=='page' ) :
|
521 |
wp_enqueue_script( 'editor' );
|
522 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
}
|
524 |
|
525 |
function install_custom_field_template_data() {
|
@@ -615,7 +647,7 @@ type = file';
|
|
615 |
$options = $this->get_custom_field_template_data();
|
616 |
|
617 |
if ( empty($excerpt) ) $this->is_excerpt = true;
|
618 |
-
if ( $options['custom_field_template_excerpt_shortcode'] ) return do_shortcode($excerpt);
|
619 |
else return $excerpt;
|
620 |
}
|
621 |
|
@@ -629,14 +661,14 @@ type = file';
|
|
629 |
return $post->post_excerpt ? $post->post_excerpt : strip_shortcodes($content);
|
630 |
endif;
|
631 |
|
632 |
-
if ( count($options['hook']) > 0 ) :
|
633 |
$categories = get_the_category();
|
634 |
$cats = array();
|
635 |
foreach( $categories as $val ) :
|
636 |
$cats[] = $val->cat_ID;
|
637 |
endforeach;
|
638 |
|
639 |
-
if ( $options['custom_fields'][$id]['post_type'] ) :
|
640 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
641 |
if ( $options['custom_fields'][$id]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
|
642 |
return;
|
@@ -654,7 +686,7 @@ type = file';
|
|
654 |
for ( $i=0; $i<count($options['hook']); $i++ ) :
|
655 |
$options['hook'][$i]['content'] = stripslashes($options['hook'][$i]['content']);
|
656 |
if ( is_feed() && !$options['hook'][$i]['feed'] ) break;
|
657 |
-
if ( $options['hook'][$i]['category'] ) :
|
658 |
if ( is_category() || is_single() || is_feed() ) :
|
659 |
if ( $options['hook'][$i]['use_php'] ) :
|
660 |
$options['hook'][$i]['content'] = $this->EvalBuffer(stripcslashes($options['hook'][$i]['content']));
|
@@ -731,8 +763,11 @@ type = file';
|
|
731 |
}
|
732 |
|
733 |
function custom_field_template_admin() {
|
|
|
|
|
734 |
$options = $this->get_custom_field_template_data();
|
735 |
-
|
|
|
736 |
unset($options['custom_fields']);
|
737 |
$j = 0;
|
738 |
for($i=0;$i<count($_POST["custom_field_template_content"]);$i++) {
|
@@ -740,45 +775,49 @@ type = file';
|
|
740 |
if ( preg_match('/\[content\]|\[post_title\]|\[excerpt\]|\[action\]/i', $_POST["custom_field_template_content"][$i]) ) :
|
741 |
$errormessage = __('You can not use the following words as the field key: `content`, `post_title`, and `excerpt`, and `action`.', 'custom-field-template');
|
742 |
endif;
|
743 |
-
$options['custom_fields'][$j]['title'] = $_POST["custom_field_template_title"][$i];
|
744 |
-
$options['custom_fields'][$j]['content'] = $_POST["custom_field_template_content"][$i];
|
745 |
-
$options['custom_fields'][$j]['instruction'] = $_POST["custom_field_template_instruction"][$i];
|
746 |
-
$options['custom_fields'][$j]['category'] = $_POST["custom_field_template_category"][$i];
|
747 |
-
$options['custom_fields'][$j]['post'] = $_POST["custom_field_template_post"][$i];
|
748 |
-
$options['custom_fields'][$j]['post_type'] = $_POST["custom_field_template_post_type"][$i];
|
749 |
-
$options['custom_fields'][$j]['custom_post_type'] = $_POST["custom_field_template_custom_post_type"][$i];
|
750 |
-
$options['custom_fields'][$j]['template_files'] = $_POST["custom_field_template_template_files"][$i];
|
751 |
-
$options['custom_fields'][$j]['disable'] = $_POST["custom_field_template_disable"][$i];
|
752 |
$j++;
|
753 |
}
|
754 |
}
|
755 |
update_option('custom_field_template_data', $options);
|
756 |
$message = __('Options updated.', 'custom-field-template');
|
757 |
-
elseif($_POST["custom_field_template_global_settings_submit"]) :
|
758 |
-
$options['custom_field_template_replace_keys_by_labels'] = $_POST['custom_field_template_replace_keys_by_labels'];
|
759 |
-
$options['custom_field_template_use_multiple_insert'] = $_POST['custom_field_template_use_multiple_insert'];
|
760 |
-
$options['custom_field_template_use_wpautop'] = $_POST['custom_field_template_use_wpautop'];
|
761 |
-
$options['custom_field_template_use_autosave'] = $_POST['custom_field_template_use_autosave'];
|
762 |
-
$options['custom_field_template_use_disable_button'] = $_POST['custom_field_template_use_disable_button'];
|
763 |
-
$options['custom_field_template_disable_initialize_button'] = $_POST['custom_field_template_disable_initialize_button'];
|
764 |
-
$options['custom_field_template_disable_save_button'] = $_POST['custom_field_template_disable_save_button'];
|
765 |
-
$options['custom_field_template_disable_default_custom_fields'] = $_POST['custom_field_template_disable_default_custom_fields'];
|
766 |
-
$options['custom_field_template_disable_quick_edit'] = $_POST['custom_field_template_disable_quick_edit'];
|
767 |
-
$options['custom_field_template_disable_custom_field_column'] = $_POST['custom_field_template_disable_custom_field_column'];
|
768 |
-
$options['custom_field_template_replace_the_title'] = $_POST['custom_field_template_replace_the_title'];
|
769 |
-
$options['custom_field_template_widget_shortcode'] = $_POST['custom_field_template_widget_shortcode'];
|
770 |
-
$options['custom_field_template_excerpt_shortcode'] = $_POST['custom_field_template_excerpt_shortcode'];
|
771 |
-
$options['
|
772 |
-
$options['
|
773 |
-
$options['
|
774 |
-
$options['
|
|
|
|
|
|
|
|
|
775 |
update_option('custom_field_template_data', $options);
|
776 |
$message = __('Options updated.', 'custom-field-template');
|
777 |
-
elseif ($_POST['custom_field_template_css_submit']) :
|
778 |
$options['css'] = $_POST['custom_field_template_css'];
|
779 |
update_option('custom_field_template_data', $options);
|
780 |
$message = __('Options updated.', 'custom-field-template');
|
781 |
-
elseif ($_POST['custom_field_template_shortcode_format_submit']) :
|
782 |
unset($options['shortcode_format'], $options['shortcode_format_use_php']);
|
783 |
$j = 0;
|
784 |
for($i=0;$i<count($_POST["custom_field_template_shortcode_format"]);$i++) {
|
@@ -790,7 +829,7 @@ type = file';
|
|
790 |
}
|
791 |
update_option('custom_field_template_data', $options);
|
792 |
$message = __('Options updated.', 'custom-field-template');
|
793 |
-
elseif ($_POST['custom_field_template_php_submit']) :
|
794 |
unset($options['php']);
|
795 |
for($i=0;$i<count($_POST["custom_field_template_php"]);$i++) {
|
796 |
if( $_POST["custom_field_template_php"][$i] )
|
@@ -798,7 +837,7 @@ type = file';
|
|
798 |
}
|
799 |
update_option('custom_field_template_data', $options);
|
800 |
$message = __('Options updated.', 'custom-field-template');
|
801 |
-
elseif($_POST["custom_field_template_hook_submit"]) :
|
802 |
unset($options['hook']);
|
803 |
$j = 0;
|
804 |
for($i=0;$i<count($_POST["custom_field_template_hook_content"]);$i++) {
|
@@ -815,14 +854,14 @@ type = file';
|
|
815 |
}
|
816 |
update_option('custom_field_template_data', $options);
|
817 |
$message = __('Options updated.', 'custom-field-template');
|
818 |
-
elseif ($_POST['custom_field_template_rebuild_value_counts_submit']) :
|
819 |
$this->custom_field_template_rebuild_value_counts();
|
820 |
$options = $this->get_custom_field_template_data();
|
821 |
$message = __('Value Counts rebuilt.', 'custom-field-template');
|
822 |
-
elseif ($_POST['custom_field_template_rebuild_tags_submit']) :
|
823 |
$options = $this->get_custom_field_template_data();
|
824 |
$message = __('Tags rebuilt.', 'custom-field-template');
|
825 |
-
elseif ($_POST['custom_field_template_import_options_submit']) :
|
826 |
if ( is_uploaded_file($_FILES['cftfile']['tmp_name']) ) :
|
827 |
ob_start();
|
828 |
readfile ($_FILES['cftfile']['tmp_name']);
|
@@ -833,12 +872,12 @@ type = file';
|
|
833 |
$message = __('Options imported.', 'custom-field-template');
|
834 |
$options = $this->get_custom_field_template_data();
|
835 |
endif;
|
836 |
-
elseif ($_POST['custom_field_template_reset_options_submit']) :
|
837 |
$this->install_custom_field_template_data();
|
838 |
$this->install_custom_field_template_css();
|
839 |
$options = $this->get_custom_field_template_data();
|
840 |
$message = __('Options resetted.', 'custom-field-template');
|
841 |
-
elseif ($_POST['custom_field_template_delete_options_submit']) :
|
842 |
delete_option('custom_field_template_data');
|
843 |
$options = $this->get_custom_field_template_data();
|
844 |
$message = __('Options deleted.', 'custom-field-template');
|
@@ -869,10 +908,10 @@ margin-bottom:0pt;
|
|
869 |
jQuery('textarea.resizable:not(.processed)').TextAreaResizer();
|
870 |
});
|
871 |
</script>
|
872 |
-
<?php if ($message) : ?>
|
873 |
<div id="message" class="updated"><p><?php echo $message; ?></p></div>
|
874 |
<?php endif; ?>
|
875 |
-
<?php if ($errormessage) : ?>
|
876 |
<div id="errormessage" class="error"><p><?php echo $errormessage; ?></p></div>
|
877 |
<?php endif; ?>
|
878 |
<div class="wrap">
|
@@ -894,27 +933,27 @@ margin-bottom:0pt;
|
|
894 |
?>
|
895 |
<tr><td>
|
896 |
<p><strong>TEMPLATE #<?php echo $i; ?></strong>
|
897 |
-
<label for="custom_field_template_disable[<?php echo $i; ?>]"><input type="checkbox" name="custom_field_template_disable[<?php echo $i; ?>]" id="custom_field_template_disable[<?php echo $i; ?>]" value="1" <?php checked(1, $options['custom_fields'][$i]['disable']); ?> /> <?php _e('Disable', 'custom-field-template'); ?></label>
|
898 |
</p>
|
899 |
<p><label for="custom_field_template_title[<?php echo $i; ?>]"><?php echo sprintf(__('Template Title', 'custom-field-template'), $i); ?></label>:<br />
|
900 |
-
<input type="text" name="custom_field_template_title[<?php echo $i; ?>]" id="custom_field_template_title[<?php echo $i; ?>]" value="<?php echo
|
901 |
<p><label for="custom_field_template_instruction[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Template Instruction', 'custom-field-template'), $i); ?></a></label>:<br />
|
902 |
-
<textarea class="large-text" name="custom_field_template_instruction[<?php echo $i; ?>]" id="custom_field_template_instruction[<?php echo $i; ?>]" rows="5" cols="80"<?php if ( empty($options['custom_fields'][$i]['instruction']) ) : echo ' style="display:none;"'; endif; ?>><?php echo stripcslashes($options['custom_fields'][$i]['instruction']); ?></textarea></p>
|
903 |
<p><label for="custom_field_template_post_type[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Post Type', 'custom-field-template'), $i); ?></a></label>:<br />
|
904 |
<span<?php if ( empty($options['custom_fields'][$i]['post_type']) ) : echo ' style="display:none;"'; endif; ?>>
|
905 |
-
<input type="radio" name="custom_field_template_post_type[<?php echo $i; ?>]" id="custom_field_template_post_type[<?php echo $i; ?>]" value=""<?php if (
|
906 |
-
<input type="radio" name="custom_field_template_post_type[<?php echo $i; ?>]" id="custom_field_template_post_type[<?php echo $i; ?>]" value="post"<?php if ( $options['custom_fields'][$i]['post_type']=='post') : echo ' checked="checked"'; endif; ?> /> <?php _e('Post', 'custom-field-template'); ?>
|
907 |
-
<input type="radio" name="custom_field_template_post_type[<?php echo $i; ?>]" id="custom_field_template_post_type[<?php echo $i; ?>]" value="page"<?php if ( $options['custom_fields'][$i]['post_type']=='page') : echo ' checked="checked"'; endif; ?> /> <?php _e('Page', 'custom-field-template'); ?></span></p>
|
908 |
<p><label for="custom_field_template_custom_post_type[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Custom Post Type (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
909 |
-
<input type="text" name="custom_field_template_custom_post_type[<?php echo $i; ?>]" id="custom_field_template_custom_post_type[<?php echo $i; ?>]" value="<?php echo
|
910 |
<p><label for="custom_field_template_post[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Post ID (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
911 |
-
<input type="text" name="custom_field_template_post[<?php echo $i; ?>]" id="custom_field_template_post[<?php echo $i; ?>]" value="<?php echo
|
912 |
<p><label for="custom_field_template_category[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
913 |
-
<input type="text" name="custom_field_template_category[<?php echo $i; ?>]" id="custom_field_template_category[<?php echo $i; ?>]" value="<?php echo
|
914 |
<p><label for="custom_field_template_template_files[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Page Template file name(s) (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
915 |
-
<input type="text" name="custom_field_template_template_files[<?php echo $i; ?>]" id="custom_field_template_template_files[<?php echo $i; ?>]" value="<?php echo
|
916 |
<p><label for="custom_field_template_content[<?php echo $i; ?>]"><?php echo sprintf(__('Template Content', 'custom-field-template'), $i); ?></label>:<br />
|
917 |
-
<textarea name="custom_field_template_content[<?php echo $i; ?>]" class="resizable large-text" id="custom_field_template_content[<?php echo $i; ?>]" rows="10" cols="80"><?php echo stripcslashes($options['custom_fields'][$i]['content']); ?></textarea></p>
|
918 |
</td></tr>
|
919 |
<?php
|
920 |
}
|
@@ -946,61 +985,66 @@ margin-bottom:0pt;
|
|
946 |
?>
|
947 |
<tr><td>
|
948 |
<p><label for="custom_field_template_replace_keys_by_labels"><?php _e('In case that you would like to replace custom keys by labels if `label` is set', 'custom-field-template'); ?></label>:<br />
|
949 |
-
<input type="checkbox" name="custom_field_template_replace_keys_by_labels" id="custom_field_template_replace_keys_by_labels" value="1" <?php if ($options['custom_field_template_replace_keys_by_labels']) { echo 'checked="checked"'; } ?> /> <?php _e('Use labels in place of custom keys', 'custom-field-template'); ?></p>
|
950 |
</td></tr>
|
951 |
<tr><td>
|
952 |
<p><label for="custom_field_template_use_wpautop"><?php _e('In case that you would like to add p and br tags in textareas automatically', 'custom-field-template'); ?></label>:<br />
|
953 |
-
<input type="checkbox" name="custom_field_template_use_wpautop" id="custom_field_template_use_wpautop" value="1" <?php if ($options['custom_field_template_use_wpautop']) { echo 'checked="checked"'; } ?> /> <?php _e('Use wpautop function', 'custom-field-template'); ?></p>
|
954 |
</td>
|
955 |
</tr>
|
956 |
<tr><td>
|
957 |
<p><label for="custom_field_template_use_autosave"><?php _e('In case that you would like to save values automatically in switching templates', 'custom-field-template'); ?></label>:<br />
|
958 |
-
<input type="checkbox" name="custom_field_template_use_autosave" id="custom_field_template_use_autosave" value="1" <?php if ($options['custom_field_template_use_autosave']) { echo 'checked="checked"'; } ?> /> <?php _e('Use the auto save in switching templates', 'custom-field-template'); ?></p>
|
959 |
</td>
|
960 |
</tr>
|
961 |
<tr><td>
|
962 |
<p><label for="custom_field_template_use_disable_button"><?php _e('In case that you would like to disable input fields of the custom field template temporarily', 'custom-field-template'); ?></label>:<br />
|
963 |
-
<input type="checkbox" name="custom_field_template_use_disable_button" id="custom_field_template_use_disable_button" value="1" <?php if ($options['custom_field_template_use_disable_button']) { echo 'checked="checked"'; } ?> /> <?php _e('Use the `Disable` button. The default custom fields will be superseded.', 'custom-field-template'); ?></p>
|
964 |
</td>
|
965 |
</tr>
|
966 |
<tr><td>
|
967 |
<p><label for="custom_field_template_disable_initialize_button"><?php _e('In case that you would like to forbid to use the initialize button.', 'custom-field-template'); ?></label>:<br />
|
968 |
-
<input type="checkbox" name="custom_field_template_disable_initialize_button" id="custom_field_template_disable_initialize_button" value="1" <?php if ($options['custom_field_template_disable_initialize_button']) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the initialize button', 'custom-field-template'); ?></p>
|
969 |
</td>
|
970 |
</tr>
|
971 |
<tr><td>
|
972 |
<p><label for="custom_field_template_disable_save_button"><?php _e('In case that you would like to forbid to use the save button.', 'custom-field-template'); ?></label>:<br />
|
973 |
-
<input type="checkbox" name="custom_field_template_disable_save_button" id="custom_field_template_disable_save_button" value="1" <?php if ($options['custom_field_template_disable_save_button']) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the save button', 'custom-field-template'); ?></p>
|
974 |
</td>
|
975 |
</tr>
|
976 |
<tr><td>
|
977 |
<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 />
|
978 |
-
<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>
|
979 |
</td>
|
980 |
</tr>
|
981 |
<tr><td>
|
982 |
<p><label for="custom_field_template_disable_quick_edit"><?php _e('In case that you would like to forbid to use the quick edit.', 'custom-field-template'); ?></label>:<br />
|
983 |
-
<input type="checkbox" name="custom_field_template_disable_quick_edit" id="custom_field_template_disable_quick_edit" value="1" <?php if ($options['custom_field_template_disable_quick_edit']) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the quick edit', 'custom-field-template'); ?></p>
|
984 |
</td>
|
985 |
</tr>
|
986 |
<tr><td>
|
987 |
<p><label for="custom_field_template_disable_custom_field_column"><?php _e('In case that you would like to forbid to display the custom field column on the edit post list page.', 'custom-field-template'); ?></label>:<br />
|
988 |
-
<input type="checkbox" name="custom_field_template_disable_custom_field_column" id="custom_field_template_disable_custom_field_column" value="1" <?php if ($options['custom_field_template_disable_custom_field_column']) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the custom field column (The quick edit also does not work.)', 'custom-field-template'); ?></p>
|
989 |
</td>
|
990 |
</tr>
|
991 |
<tr><td>
|
992 |
<p><label for="custom_field_template_replace_the_title"><?php _e('In case that you would like to replace the box title with the template title.', 'custom-field-template'); ?></label>:<br />
|
993 |
-
<input type="checkbox" name="custom_field_template_replace_the_title" id="custom_field_template_replace_the_title" value="1" <?php if ($options['custom_field_template_replace_the_title']) { echo 'checked="checked"'; } ?> /> <?php _e('Replace the box title', 'custom-field-template'); ?></p>
|
994 |
</td>
|
995 |
</tr>
|
996 |
<tr><td>
|
997 |
<p><label for="custom_field_template_widget_shortcode"><?php _e('In case that you would like to use the shortcode in the widget.', 'custom-field-template'); ?></label>:<br />
|
998 |
-
<input type="checkbox" name="custom_field_template_widget_shortcode" id="custom_field_template_widget_shortcode" value="1" <?php if ($options['custom_field_template_widget_shortcode']) { echo 'checked="checked"'; } ?> /> <?php _e('Use the shortcode in the widget', 'custom-field-template'); ?></p>
|
999 |
</td>
|
1000 |
</tr>
|
1001 |
<tr><td>
|
1002 |
<p><label for="custom_field_template_excerpt_shortcode"><?php _e('In case that you would like to use the shortcode in the excerpt.', 'custom-field-template'); ?></label>:<br />
|
1003 |
-
<input type="checkbox" name="custom_field_template_excerpt_shortcode" id="custom_field_template_excerpt_shortcode" value="1" <?php if ($options['custom_field_template_excerpt_shortcode']) { echo 'checked="checked"'; } ?> /> <?php _e('Use the shortcode in the excerpt', 'custom-field-template'); ?></p>
|
|
|
|
|
|
|
|
|
|
|
1004 |
</td>
|
1005 |
</tr>
|
1006 |
<tr><td>
|
@@ -1011,13 +1055,13 @@ margin-bottom:0pt;
|
|
1011 |
if ( !isset($options['custom_field_template_after_value']) ) $options['custom_field_template_after_value'] = '</li>';
|
1012 |
?>
|
1013 |
<p><label for="custom_field_template_before_list"><?php _e('Text to place before every list which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1014 |
-
<input type="text" name="custom_field_template_before_list" id="custom_field_template_before_list" value="<?php echo
|
1015 |
<p><label for="custom_field_template_after_list"><?php _e('Text to place after every list which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1016 |
-
<input type="text" name="custom_field_template_after_list" id="custom_field_template_after_list" value="<?php echo
|
1017 |
<p><label for="custom_field_template_before_value"><?php _e('Text to place before every value which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1018 |
-
<input type="text" name="custom_field_template_before_value" id="custom_field_template_before_value" value="<?php echo
|
1019 |
<p><label for="custom_field_template_after_value"><?php _e('Text to place after every value which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1020 |
-
<input type="text" name="custom_field_template_after_value" id="custom_field_template_after_value" value="<?php echo
|
1021 |
</td>
|
1022 |
</tr>
|
1023 |
<tr><td>
|
@@ -1037,7 +1081,7 @@ margin-bottom:0pt;
|
|
1037 |
<table class="form-table" style="margin-bottom:5px;">
|
1038 |
<tbody>
|
1039 |
<tr><td>
|
1040 |
-
<p><textarea name="custom_field_template_css" class="large-text resizable" id="custom_field_template_css" rows="10" cols="80"><?php echo stripcslashes($options['css']); ?></textarea></p>
|
1041 |
</td></tr>
|
1042 |
<tr><td>
|
1043 |
<p><input type="submit" name="custom_field_template_css_submit" value="<?php _e('Update Options »', 'custom-field-template'); ?>" class="button-primary" /></p>
|
@@ -1058,12 +1102,14 @@ margin-bottom:0pt;
|
|
1058 |
<table class="form-table" style="margin-bottom:5px;">
|
1059 |
<tbody>
|
1060 |
<?php
|
1061 |
-
|
|
|
|
|
1062 |
?>
|
1063 |
<tr><th><strong>FORMAT #<?php echo $i; ?></strong></th></tr>
|
1064 |
<tr><td>
|
1065 |
-
<p><textarea name="custom_field_template_shortcode_format[<?php echo $i; ?>]" class="large-text resizable" rows="10" cols="80"><?php echo stripcslashes($options['shortcode_format'][$i]); ?></textarea></p>
|
1066 |
-
<p><label><input type="checkbox" name="custom_field_template_shortcode_format_use_php[<?php echo $i; ?>]" value="1" <?php if ($options['shortcode_format_use_php'][$i]) { echo ' checked="checked"'; } ?> /> <?php _e('Use PHP', 'custom-field-template'); ?></label></p>
|
1067 |
</td></tr>
|
1068 |
<?php
|
1069 |
endfor;
|
@@ -1090,11 +1136,13 @@ ex. `radio` and `select`:</dt><dd>$values = array('dog', 'cat', 'monkey'); $defa
|
|
1090 |
<table class="form-table" style="margin-bottom:5px;">
|
1091 |
<tbody>
|
1092 |
<?php
|
1093 |
-
|
|
|
|
|
1094 |
?>
|
1095 |
<tr><th><strong>CODE #<?php echo $i; ?></strong></th></tr>
|
1096 |
<tr><td>
|
1097 |
-
<p><textarea name="custom_field_template_php[]" class="large-text resizable" rows="10" cols="80"><?php echo stripcslashes($options['php'][$i]); ?></textarea></p>
|
1098 |
</td></tr>
|
1099 |
<?php
|
1100 |
endfor;
|
@@ -1116,26 +1164,28 @@ ex. `radio` and `select`:</dt><dd>$values = array('dog', 'cat', 'monkey'); $defa
|
|
1116 |
<table class="form-table" style="margin-bottom:5px;">
|
1117 |
<tbody>
|
1118 |
<?php
|
1119 |
-
|
|
|
|
|
1120 |
?>
|
1121 |
<tr><th><strong>HOOK #<?php echo $i; ?></strong></th></tr>
|
1122 |
<tr><td>
|
1123 |
<p><label for="custom_field_template_hook_position[<?php echo $i; ?>]"><?php echo sprintf(__('Position', 'custom-field-template'), $i); ?></label>:<br />
|
1124 |
-
<input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="1" <?php if($options['hook'][$i]['position']==1) echo ' checked="checked"'; ?> /> <?php _e('Before the content', 'custom-field-template'); ?>
|
1125 |
-
<input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="0" <?php if($options['hook'][$i]['position']==0) echo ' checked="checked"'; ?> /> <?php _e('After the content', 'custom-field-template'); ?>
|
1126 |
-
<input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="2" <?php if($options['hook'][$i]['position']==2) echo ' checked="checked"'; ?> /> <?php echo sprintf(__('Inside the content ([cfthook hook=%d])', 'custom-field-template'), $i); ?>
|
1127 |
</p>
|
1128 |
<p><label for="custom_field_template_hook_post_type[<?php echo $i; ?>]"><?php echo sprintf(__('Post Type', 'custom-field-template'), $i); ?></label>:<br />
|
1129 |
-
<input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value=""<?php if (
|
1130 |
-
<input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value="post"<?php if ( $options['hook'][$i]['post_type']=='post') : echo ' checked="checked"'; endif; ?> /> <?php _e('Post', 'custom-field-template'); ?>
|
1131 |
-
<input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value="page"<?php if ( $options['hook'][$i]['post_type']=='page') : echo ' checked="checked"'; endif; ?> /> <?php _e('Page', 'custom-field-template'); ?></p>
|
1132 |
<p><label for="custom_field_template_hook_custom_post_type[<?php echo $i; ?>]"><?php echo sprintf(__('Custom Post Type (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
|
1133 |
-
<input type="text" name="custom_field_template_hook_custom_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_custom_post_type[<?php echo $i; ?>]" value="<?php echo
|
1134 |
<p><label for="custom_field_template_hook_category[<?php echo $i; ?>]"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
|
1135 |
-
<input type="text" name="custom_field_template_hook_category[<?php echo $i; ?>]" id="custom_field_template_hook_category[<?php echo $i; ?>]" value="<?php echo
|
1136 |
-
<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; ?>]" class="large-text resizable" rows="5" cols="80"><?php echo stripcslashes($options['hook'][$i]['content']); ?></textarea></p>
|
1137 |
-
<p><input type="checkbox" name="custom_field_template_hook_use_php[<?php echo $i; ?>]" id="custom_field_template_hook_use_php[<?php echo $i; ?>]" value="1" <?php if ($options['hook'][$i]['use_php']) { echo ' checked="checked"'; } ?> /> <?php _e('Use PHP', 'custom-field-template'); ?></p>
|
1138 |
-
<p><input type="checkbox" name="custom_field_template_hook_feed[<?php echo $i; ?>]" id="custom_field_template_hook_feed[<?php echo $i; ?>]" value="1" <?php if ($options['hook'][$i]['feed']) { echo ' checked="checked"'; } ?> /> <?php _e('Apply to feeds', 'custom-field-template'); ?></p>
|
1139 |
</td></tr>
|
1140 |
<?php
|
1141 |
endfor;
|
@@ -1315,13 +1365,13 @@ hideKey = true<br />
|
|
1315 |
<th>shortCode</th><td>shortCode = true</td><td>shortCode = true</td><td>shortCode = true</td><td>shortCode = true</td><td>shortCode = true</td><td></td>
|
1316 |
</tr>
|
1317 |
<tr>
|
1318 |
-
<th>multiple</th><td>multiple = true</td><td></td><td>multiple = true</td><td>multiple = true</td><td
|
1319 |
</tr>
|
1320 |
<tr>
|
1321 |
-
<th>startNum</th><td>startNum = 5</td><td></td><td>startNum = 5</td><td>startNum = 5</td><td
|
1322 |
</tr>
|
1323 |
<tr>
|
1324 |
-
<th>endNum</th><td>endNum = 10</td><td></td><td>endNum = 10</td><td>endNum = 10</td><td
|
1325 |
</tr>
|
1326 |
<tr>
|
1327 |
<th>multipleButton</th><td>multipleButton = true</td><td></td><td>multipleButton = true</td><td>multipleButton = true</td><td></td><td>multipleButton = true</td>
|
@@ -1469,48 +1519,55 @@ jQuery(this).addClass("closed");
|
|
1469 |
|
1470 |
function get_custom_fields( $id ) {
|
1471 |
$options = $this->get_custom_field_template_data();
|
1472 |
-
|
|
|
1473 |
return null;
|
1474 |
|
1475 |
$custom_fields = $this->parse_ini_str( $options['custom_fields'][$id]['content'], true );
|
1476 |
return $custom_fields;
|
1477 |
}
|
1478 |
|
1479 |
-
function make_textfield( $name, $sid, $
|
1480 |
-
|
|
|
|
|
1481 |
$options = $this->get_custom_field_template_data();
|
1482 |
|
1483 |
$title = $name;
|
1484 |
$name = $this->sanitize_name( $name );
|
1485 |
|
1486 |
-
if ( is_numeric($code) ) :
|
1487 |
eval(stripcslashes($options['php'][$code]));
|
1488 |
endif;
|
1489 |
|
|
|
|
|
1490 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1491 |
$value = $this->get_post_meta( $_REQUEST[ 'post' ], $title, false );
|
1492 |
-
if ( $value ) {
|
1493 |
$ct_value = count($value);
|
1494 |
-
$value = $value[ $cftnum ];
|
1495 |
}
|
1496 |
} else {
|
1497 |
$value = stripslashes($default);
|
1498 |
}
|
1499 |
-
if ( empty($ct_value) )
|
|
|
|
|
1500 |
|
1501 |
-
if ( $enforced_value ) :
|
1502 |
$value = $enforced_value;
|
1503 |
endif;
|
1504 |
|
1505 |
-
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1506 |
if ( !empty($class) && $date == true ) $class = ' class="' . $class . ' datePicker"';
|
1507 |
-
elseif ( empty($class) && $date == true ) $class = ' class="datePicker"';
|
1508 |
elseif ( !empty($class) ) $class = ' class="' . $class . '"';
|
1509 |
if ( !empty($style) ) $style = ' style="' . $style . '"';
|
1510 |
if ( !empty($maxlength) ) $maxlength = ' maxlength="' . $maxlength . '"';
|
1511 |
if ( !empty($readOnly) ) $readOnly = ' readonly="readonly"';
|
1512 |
|
1513 |
-
if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
|
1514 |
$title = stripcslashes($label);
|
1515 |
|
1516 |
$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);
|
@@ -1520,7 +1577,7 @@ jQuery(this).addClass("closed");
|
|
1520 |
$event_output .= " " . $key . '="' . stripcslashes(trim($val)) . '"';
|
1521 |
endforeach;
|
1522 |
|
1523 |
-
if ( $multipleButton == true && $date != true && $ct_value == $cftnum ) :
|
1524 |
$addfield .= '<div style="margin-top:-1em;">';
|
1525 |
$addfield .= '<a href="#clear" onclick="jQuery(this).parent().parent().parent().clone().insertAfter(jQuery(this).parent().parent().parent()).find('."'input'".').val('."''".');jQuery(this).parent().css('."'visibility','hidden'".');jQuery(this).parent().prev().css('."'visibility','hidden'".'); return false;">' . __('Add New', 'custom-field-template') . '</a>';
|
1526 |
$addfield .= '</div>';
|
@@ -1531,9 +1588,9 @@ jQuery(this).addClass("closed");
|
|
1531 |
'<dt><span' . $hide . '><label for="' . $name . $sid . '_' . $cftnum . '">' . $title . '</label></span>'.$addfield.'</dt>' .
|
1532 |
'<dd>';
|
1533 |
|
1534 |
-
if ( !empty($label) &&
|
1535 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1536 |
-
$out .= trim($before).'<input id="' . $name . $sid . '_' . $cftnum . '" name="' . $name . '['. $sid . '][]" value="' .
|
1537 |
|
1538 |
if ( $date == true ) :
|
1539 |
$out .= '<script type="text/javascript">' . "\n" .
|
@@ -1554,8 +1611,10 @@ jQuery(this).addClass("closed");
|
|
1554 |
return $out;
|
1555 |
}
|
1556 |
|
1557 |
-
function make_checkbox( $name, $sid, $
|
1558 |
-
|
|
|
|
|
1559 |
$options = $this->get_custom_field_template_data();
|
1560 |
|
1561 |
$title = $name;
|
@@ -1563,6 +1622,8 @@ jQuery(this).addClass("closed");
|
|
1563 |
|
1564 |
if ( !$value ) $value = "true";
|
1565 |
|
|
|
|
|
1566 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1567 |
$selected = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1568 |
if ( $selected ) {
|
@@ -1595,7 +1656,7 @@ jQuery(this).addClass("closed");
|
|
1595 |
|
1596 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] && $cftnum == 0 )
|
1597 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1598 |
-
$out .= '<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' .
|
1599 |
if ( $valueLabel )
|
1600 |
$out .= stripcslashes(trim($valueLabel));
|
1601 |
else
|
@@ -1607,25 +1668,31 @@ jQuery(this).addClass("closed");
|
|
1607 |
return $out;
|
1608 |
}
|
1609 |
|
1610 |
-
function make_radio( $name, $sid, $
|
1611 |
-
|
|
|
|
|
1612 |
$options = $this->get_custom_field_template_data();
|
1613 |
|
1614 |
$title = $name;
|
1615 |
$name = $this->sanitize_name( $name );
|
1616 |
|
1617 |
-
if ( is_numeric($code) ) :
|
1618 |
eval(stripcslashes($options['php'][$code]));
|
1619 |
endif;
|
1620 |
|
|
|
|
|
1621 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1622 |
$selected = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1623 |
$ct_value = count($selected);
|
1624 |
-
$selected = $selected[ $cftnum ];
|
1625 |
} else {
|
1626 |
$selected = stripslashes($default);
|
1627 |
}
|
1628 |
-
if ( empty($ct_value) )
|
|
|
|
|
1629 |
|
1630 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1631 |
if ( !empty($class) ) $class = ' class="' . $class . '"';
|
@@ -1671,9 +1738,9 @@ jQuery(this).addClass("closed");
|
|
1671 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'checked="checked"' : '';
|
1672 |
|
1673 |
$out .=
|
1674 |
-
'<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' .
|
1675 |
-
if ( $
|
1676 |
-
$out .= stripcslashes(trim($
|
1677 |
else
|
1678 |
$out .= stripcslashes(trim($val));
|
1679 |
$out .= '</label><br />';
|
@@ -1685,27 +1752,31 @@ jQuery(this).addClass("closed");
|
|
1685 |
return $out;
|
1686 |
}
|
1687 |
|
1688 |
-
function make_select( $name, $sid, $
|
1689 |
-
|
|
|
|
|
1690 |
$options = $this->get_custom_field_template_data();
|
1691 |
|
1692 |
$title = $name;
|
1693 |
$name = $this->sanitize_name( $name );
|
1694 |
|
1695 |
-
if ( is_numeric($code) ) :
|
1696 |
eval(stripcslashes($options['php'][$code]));
|
1697 |
endif;
|
1698 |
|
|
|
|
|
1699 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1700 |
$selected = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1701 |
$ct_value = count($selected);
|
1702 |
-
|
1703 |
-
$selected = $selected[ $cftnum ];
|
1704 |
-
}
|
1705 |
} else {
|
1706 |
$selected = stripslashes($default);
|
1707 |
}
|
1708 |
-
if ( empty($ct_value) )
|
|
|
|
|
1709 |
|
1710 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1711 |
if ( !empty($class) ) $class = ' class="' . $class . '"';
|
@@ -1746,9 +1817,9 @@ jQuery(this).addClass("closed");
|
|
1746 |
foreach( $values as $val ) {
|
1747 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'selected="selected"' : '';
|
1748 |
|
1749 |
-
$out .= '<option value="' .
|
1750 |
-
if ( $
|
1751 |
-
$out .= stripcslashes(trim($
|
1752 |
else
|
1753 |
$out .= stripcslashes(trim($val));
|
1754 |
$out .= '</option>';
|
@@ -1760,8 +1831,10 @@ jQuery(this).addClass("closed");
|
|
1760 |
return $out;
|
1761 |
}
|
1762 |
|
1763 |
-
function make_textarea( $name, $sid, $
|
1764 |
-
|
|
|
|
|
1765 |
$options = $this->get_custom_field_template_data();
|
1766 |
|
1767 |
global $wp_version;
|
@@ -1773,12 +1846,21 @@ jQuery(this).addClass("closed");
|
|
1773 |
eval(stripcslashes($options['php'][$code]));
|
1774 |
endif;
|
1775 |
|
|
|
|
|
1776 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1777 |
$value = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1778 |
-
$value
|
|
|
|
|
|
|
1779 |
} else {
|
1780 |
$value = stripslashes($default);
|
1781 |
}
|
|
|
|
|
|
|
|
|
1782 |
|
1783 |
$rand = rand();
|
1784 |
|
@@ -1786,7 +1868,7 @@ jQuery(this).addClass("closed");
|
|
1786 |
$out = '<script type="text/javascript">' . "\n" .
|
1787 |
'// <![CDATA[' . "\n" .
|
1788 |
'jQuery(document).ready(function() {if ( typeof tinyMCE != "undefined" ) {' . "\n";
|
1789 |
-
if ( $options['custom_field_template_use_wpautop'] ) :
|
1790 |
$out .= 'document.getElementById("'. $name . $rand . '").value = document.getElementById("'. $name . $rand . '").value; tinyMCE.execCommand("mceAddControl", false, "'. $name . $rand . '"); tinyMCEID.push("'. $name . $rand . '");' . "\n";
|
1791 |
else:
|
1792 |
$out .= 'document.getElementById("'. $name . $rand . '").value = switchEditors.wpautop(document.getElementById("'. $name . $rand . '").value); tinyMCE.execCommand("mceAddControl", false, "'. $name . $rand . '"); tinyMCEID.push("'. $name . $rand . '");' . "\n";
|
@@ -1848,10 +1930,18 @@ jQuery(this).addClass("closed");
|
|
1848 |
if ( $val )
|
1849 |
$event_output .= " " . $key . '="' . stripcslashes(trim($val)) . '"';
|
1850 |
endforeach;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1851 |
|
1852 |
$out .=
|
1853 |
'<dl id="dl_' . $name . $sid . '_' . $cftnum . '" class="dl_textarea">' .
|
1854 |
-
'<dt><span' . $hide . '><label for="' . $name . $sid . '_' . $cftnum . '">' . $title . '</label></span><br />' . $media . $switch . '</dt>' .
|
1855 |
'<dd>';
|
1856 |
|
1857 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
|
@@ -1861,32 +1951,36 @@ jQuery(this).addClass("closed");
|
|
1861 |
if( $tinyMCE == true ) $quicktags_hide = ' jQuery(\'#qt_' . sha1($name . $rand) . '_qtags\').hide();';
|
1862 |
$out .= '<div class="quicktags"><script type="text/javascript">' . "\n" . '// <![CDATA[' . "\n" . '
|
1863 |
jQuery(document).ready(function() { qt_' . sha1($name . $rand) . ' = new QTags(\'qt_' . sha1($name . $rand) . '\', \'' . $name . $rand . '\', \'editorcontainer_' . $name . $rand . '\', \'more\'); ' . $quicktags_hide . ' });' . "\n" . '// ]]>' . "\n" . '</script>';
|
1864 |
-
$editorcontainer_class
|
1865 |
endif;
|
1866 |
|
1867 |
-
$out .= '<div' . $editorcontainer_class . ' id="editorcontainer_' . $name . $rand . '"><textarea id="' . $name . $rand . '" name="' . $name . '[' . $sid . '][]" rows="' .$rows. '" cols="' . $cols . '"' . $content_class . $style . $event_output . '>' .
|
1868 |
if ( $htmlEditor == true ) $out .= '</div>';
|
1869 |
$out .= '</dd></dl>'."\n";
|
1870 |
|
1871 |
return $out;
|
1872 |
}
|
1873 |
|
1874 |
-
function make_file( $name, $sid, $
|
|
|
|
|
|
|
1875 |
$options = $this->get_custom_field_template_data();
|
1876 |
|
1877 |
$title = $name;
|
1878 |
$name = $this->sanitize_name( $name );
|
1879 |
|
|
|
|
|
1880 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1881 |
$value = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1882 |
$ct_value = count($value);
|
1883 |
-
|
1884 |
-
$value = $value[ $cftnum ];
|
1885 |
-
}
|
1886 |
-
} else {
|
1887 |
-
$value = $default;
|
1888 |
}
|
1889 |
-
|
|
|
|
|
|
|
1890 |
|
1891 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1892 |
if ( !empty($class) ) $class = ' class="' . $class . '"';
|
@@ -1920,12 +2014,12 @@ jQuery(this).addClass("closed");
|
|
1920 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1921 |
$out .= trim($before).'<input id="' . $name . $sid . '_' . $cftnum . '" name="' . $name . '['.$sid.'][]" type="file" size="' . $size . '"' . $class . $style . ' onchange="if (jQuery(this).val()) { jQuery(\'#cft_save_button\').attr(\'disabled\', true); jQuery(\'#post-preview\').hide(); } else { jQuery(\'#cft_save_button\').attr(\'disabled\', false); jQuery(\'#post-preview\').show(); }" />'.trim($after).$picker;
|
1922 |
|
1923 |
-
if ( ( $value = intval($value) ) && $thumb_url =
|
1924 |
$thumb_url = $thumb_url[0];
|
1925 |
|
1926 |
$post = get_post($value);
|
1927 |
$filename = basename($post->guid);
|
1928 |
-
$title =
|
1929 |
|
1930 |
if ( !empty($mediaLibrary) ) :
|
1931 |
$title = '<a href="'.$image_upload_iframe_src.'&post_id='.$_REQUEST[ 'post' ].'&TB_iframe=1&tab='.$tab.'" class="thickbox">'.$title.'</a>';
|
@@ -1947,12 +2041,12 @@ jQuery(this).addClass("closed");
|
|
1947 |
global $userdata, $post, $wp_version;
|
1948 |
get_currentuserinfo();
|
1949 |
$level = $userdata->user_level;
|
1950 |
-
|
1951 |
$options = $this->get_custom_field_template_data();
|
1952 |
|
1953 |
-
if ( $_REQUEST['post'] ) $post = get_post($_REQUEST['post']);
|
1954 |
|
1955 |
-
if ( count($options['custom_fields']) > 0 && !isset($_REQUEST['id']) && !isset($options['posts'][$_REQUEST['post']]) ) :
|
1956 |
foreach ( $options['custom_fields'] as $key => $val ) :
|
1957 |
if ( !empty($val['template_files']) && !empty($_REQUEST['page_template']) ) :
|
1958 |
$template_files = explode(',', $val['template_files']);
|
@@ -1981,7 +2075,7 @@ jQuery(this).addClass("closed");
|
|
1981 |
endforeach;
|
1982 |
endif;
|
1983 |
|
1984 |
-
if ( $options['custom_fields'][$id]['disable'] )
|
1985 |
return;
|
1986 |
|
1987 |
$fields = $this->get_custom_fields( $id );
|
@@ -1989,12 +2083,12 @@ jQuery(this).addClass("closed");
|
|
1989 |
if ( $fields == null )
|
1990 |
return;
|
1991 |
|
1992 |
-
if ( $_REQUEST['post_type'] == 'page' || $post->post_type=='page' ) :
|
1993 |
$post->page_template = get_post_meta( $post->ID, '_wp_page_template', true );
|
1994 |
if ( !$post->page_template ) $post->page_template = 'default';
|
1995 |
endif;
|
1996 |
|
1997 |
-
if ( $options['custom_fields'][$id]['post_type'] ) :
|
1998 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
1999 |
if ( $options['custom_fields'][$id]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
|
2000 |
return;
|
@@ -2009,23 +2103,23 @@ jQuery(this).addClass("closed");
|
|
2009 |
endif;
|
2010 |
endif;
|
2011 |
|
2012 |
-
if ( $options['custom_fields'][$id]['custom_post_type'] ) :
|
2013 |
$custom_post_type = explode(',', $options['custom_fields'][$id]['custom_post_type']);
|
2014 |
$custom_post_type = array_filter( $custom_post_type );
|
2015 |
$custom_post_type = array_unique(array_filter(array_map('trim', $custom_post_type)));
|
2016 |
if ( !in_array($post->post_type, $custom_post_type) )
|
2017 |
return;
|
2018 |
endif;
|
2019 |
-
|
2020 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
2021 |
-
if ( $options['custom_fields'][$id]['category'] && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php')) && empty($options['custom_fields'][$id]['template_files']) ) :
|
2022 |
return;
|
2023 |
endif;
|
2024 |
if ( !empty($options['custom_fields'][$id]['template_files']) && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php')) && empty($options['custom_fields'][$id]['category']) ) :
|
2025 |
return;
|
2026 |
endif;
|
2027 |
else :
|
2028 |
-
if ( $options['custom_fields'][$id]['category'] && ($_REQUEST['post_type']=='page' || $post->post_type=='page') && empty($options['custom_fields'][$id]['template_files']) ) :
|
2029 |
return;
|
2030 |
endif;
|
2031 |
if ( !empty($options['custom_fields'][$id]['template_files']) && ($_REQUEST['post_type']!='page' && $post->post_type!='page') && empty($options['custom_fields'][$id]['category']) ) :
|
@@ -2033,16 +2127,16 @@ jQuery(this).addClass("closed");
|
|
2033 |
endif;
|
2034 |
endif;
|
2035 |
|
2036 |
-
if ( (
|
2037 |
return;
|
2038 |
|
2039 |
-
if ( $_REQUEST['post'] && $options['custom_fields'][$id]['category'] && !isset($options['posts'][$_REQUEST['post']]) && $options['posts'][$_REQUEST['post']] !== $id && $_REQUEST['cft_mode'] != 'ajaxload' )
|
2040 |
return;
|
2041 |
|
2042 |
-
if ( !isset($_REQUEST['id']) && $options['custom_fields'][$id]['category'] && $_REQUEST['cft_mode'] == 'ajaxload' )
|
2043 |
return;
|
2044 |
|
2045 |
-
if ( $options['custom_fields'][$id]['post'] ) :
|
2046 |
$post_ids = explode(',', $options['custom_fields'][$id]['post']);
|
2047 |
$post_ids = array_filter( $post_ids );
|
2048 |
$post_ids = array_unique(array_filter(array_map('trim', $post_ids)));
|
@@ -2050,11 +2144,11 @@ jQuery(this).addClass("closed");
|
|
2050 |
return;
|
2051 |
endif;
|
2052 |
|
2053 |
-
if ( $options['custom_fields'][$id]['template_files'] && (isset($post->page_template) || $_REQUEST['page_template']) ) :
|
2054 |
$template_files = explode(',', $options['custom_fields'][$id]['template_files']);
|
2055 |
$template_files = array_filter( $template_files );
|
2056 |
$template_files = array_unique(array_filter(array_map('trim', $template_files)));
|
2057 |
-
if ( $_REQUEST['page_template'] ) :
|
2058 |
if ( !in_array($_REQUEST['page_template'], $template_files) ) :
|
2059 |
return;
|
2060 |
endif;
|
@@ -2065,7 +2159,8 @@ jQuery(this).addClass("closed");
|
|
2065 |
endif;
|
2066 |
endif;
|
2067 |
|
2068 |
-
|
|
|
2069 |
$instruction = $this->EvalBuffer(stripcslashes($options['custom_fields'][$id]['instruction']));
|
2070 |
$out .= '<div id="cft_instruction">' . $instruction . '</div>';
|
2071 |
endif;
|
@@ -2074,9 +2169,10 @@ jQuery(this).addClass("closed");
|
|
2074 |
$out .= '<input type="hidden" name="custom-field-template-id" id="custom-field-template-id" value="' . $id . '" />';
|
2075 |
foreach( $fields as $field_key => $field_val ) :
|
2076 |
foreach( $field_val as $title => $data ) {
|
2077 |
-
|
|
|
2078 |
else $parentSN = $field_key;
|
2079 |
-
if ( is_numeric($data['level']) ) :
|
2080 |
if ( $data['level'] > $level ) continue;
|
2081 |
endif;
|
2082 |
if( $data['type'] == 'break' ) {
|
@@ -2090,54 +2186,45 @@ jQuery(this).addClass("closed");
|
|
2090 |
$out .= '<fieldset' . $class . $style . '>'."\n";
|
2091 |
$out .= '<input type="hidden" name="' . $this->sanitize_name( $title ) . '[]" value="1" />'."\n";
|
2092 |
|
2093 |
-
|
2094 |
-
if ( $data['multipleButton'] == true ) :
|
2095 |
$addfield .= ' <span>';
|
2096 |
-
$addbutton = $this->get_post_meta( $_REQUEST['post'], $title, true )-1;
|
2097 |
-
if ( $addbutton<=0 ) $addbutton = 0;
|
2098 |
if ( $data['cftnum']/2 == $addbutton ) :
|
2099 |
-
$addfield .= ' <a href="#clear" onclick="var
|
|
|
2100 |
else :
|
2101 |
$addfield .= ' <a href="#clear" onclick="jQuery(this).parent().parent().parent().remove();return false;">' . __('Delete', 'custom-field-template') . '</a>';
|
2102 |
endif;
|
2103 |
$addfield .= '</span>';
|
2104 |
endif;
|
2105 |
|
2106 |
-
$out .= '<legend>' . stripcslashes(trim($data['legend'])) . $addfield . '</legend>';
|
2107 |
}
|
2108 |
else if( $data['type'] == 'fieldset_close' ) {
|
2109 |
$out .= '</fieldset>';
|
2110 |
}
|
2111 |
else if( $data['type'] == 'textfield' || $data['type'] == 'text' ) {
|
2112 |
-
$out .= $this->make_textfield( $title, $parentSN, $data
|
2113 |
-
$data['onclick'], $data['ondblclick'], $data['onkeydown'], $data['onkeypress'], $data['onkeyup'], $data['onmousedown'], $data['onmouseup'], $data['onmouseover'], $data['onmouseout'], $data['onmousemove'], $data['onfocus'], $data['onblur'], $data['onchange'], $data['onselect'] );
|
2114 |
}
|
2115 |
else if( $data['type'] == 'checkbox' ) {
|
2116 |
-
$out .=
|
2117 |
-
$this->make_checkbox( $title, $parentSN, $data['cftnum'], $data['value'], $data['valueLabel'], $data['checked'], $data['hideKey'], $data['label'], $data['code'], $data['class'], $data['style'],
|
2118 |
-
$data['onclick'], $data['ondblclick'], $data['onkeydown'], $data['onkeypress'], $data['onkeyup'], $data['onmousedown'], $data['onmouseup'], $data['onmouseover'], $data['onmouseout'], $data['onmousemove'], $data['onfocus'], $data['onblur'], $data['onchange'], $data['onselect'] );
|
2119 |
}
|
2120 |
else if( $data['type'] == 'radio' ) {
|
2121 |
-
$
|
2122 |
-
|
2123 |
-
|
2124 |
-
$data['onclick'], $data['ondblclick'], $data['onkeydown'], $data['onkeypress'], $data['onkeyup'], $data['onmousedown'], $data['onmouseup'], $data['onmouseover'], $data['onmouseout'], $data['onmousemove'], $data['onfocus'], $data['onblur'], $data['onchange'], $data['onselect'] );
|
2125 |
}
|
2126 |
else if( $data['type'] == 'select' ) {
|
2127 |
-
$
|
2128 |
-
|
2129 |
-
|
2130 |
-
$data['onclick'], $data['ondblclick'], $data['onkeydown'], $data['onkeypress'], $data['onkeyup'], $data['onmousedown'], $data['onmouseup'], $data['onmouseover'], $data['onmouseout'], $data['onmousemove'], $data['onfocus'], $data['onblur'], $data['onchange'], $data['onselect'] );
|
2131 |
}
|
2132 |
else if( $data['type'] == 'textarea' ) {
|
2133 |
-
|
2134 |
-
$out .=
|
2135 |
-
$this->make_textarea( $title, $parentSN, $data['cftnum'], $data['rows'], $data['cols'], $data['tinyMCE'], $data['htmlEditor'], $data['mediaButton'], $data['default'], $data['hideKey'], $data['label'], $data['code'], $data['class'], $data['style'], $data['mediaOffMedia'], $data['mediaOffImage'], $data['mediaOffVideo'], $data['mediaOffAudio'],
|
2136 |
-
$data['onclick'], $data['ondblclick'], $data['onkeydown'], $data['onkeypress'], $data['onkeyup'], $data['onmousedown'], $data['onmouseup'], $data['onmouseover'], $data['onmouseout'], $data['onmousemove'], $data['onfocus'], $data['onblur'], $data['onchange'], $data['onselect'] );
|
2137 |
}
|
2138 |
else if( $data['type'] == 'file' ) {
|
2139 |
-
$out .=
|
2140 |
-
$this->make_file( $title, $parentSN, $data['cftnum'], $data['size'], $data['hideKey'], $data['label'], $data['class'], $data['style'], $data['before'], $data['after'], $data['multipleButton'], $data['relation'], $data['mediaLibrary'], $data['mediaPicker'] );
|
2141 |
}
|
2142 |
}
|
2143 |
endforeach;
|
@@ -2157,6 +2244,7 @@ jQuery(this).addClass("closed");
|
|
2157 |
function insert_custom_field() {
|
2158 |
global $wp_version, $post;
|
2159 |
$options = $this->get_custom_field_template_data();
|
|
|
2160 |
|
2161 |
if( $options == null)
|
2162 |
return;
|
@@ -2195,7 +2283,7 @@ jQuery(this).addClass("closed");
|
|
2195 |
' else edInsertContent(edCanvas, h);' . "\n" .
|
2196 |
' }' . "\n";
|
2197 |
|
2198 |
-
if (
|
2199 |
$out .= ' tb_remove();' . "\n" .
|
2200 |
' tmpFocus = undefined;' . "\n" .
|
2201 |
' isTinyMCE = false;' . "\n";
|
@@ -2254,8 +2342,9 @@ jQuery(this).addClass("closed");
|
|
2254 |
var fields = win.jQuery("#cft :input").fieldSerialize();
|
2255 |
win.jQuery.ajax({type: "POST", url: "?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post="+win.jQuery(\'#post_ID\').val()+"&custom-field-template-verify-key="+win.jQuery("#custom-field-template-verify-key").val(), data: fields, success: function() {win.jQuery.ajax({type: "GET", url: "?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id="+win.jQuery("#custom-field-template-id").val()+"&post="+win.jQuery(\'#post_ID\').val(), success: function(html) {win.jQuery("#cft").html(html);win.tb_remove();}});}});
|
2256 |
}';
|
2257 |
-
|
2258 |
-
|
|
|
2259 |
else $init_id = 0;
|
2260 |
|
2261 |
$out .= 'jQuery(document).ready(function() {' . "\n";
|
@@ -2265,7 +2354,7 @@ jQuery(this).addClass("closed");
|
|
2265 |
if ( is_array($fields) ) :
|
2266 |
foreach( $fields as $field_key => $field_val ) :
|
2267 |
foreach( $field_val as $title => $data ) :
|
2268 |
-
if( $data[ 'type' ] == 'textarea' && $data[
|
2269 |
if ( substr($wp_version, 0, 3) >= '2.7' ) :
|
2270 |
/*$out .= ' if ( getUserSetting( "editor" ) == "html" ) {
|
2271 |
jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
@@ -2281,7 +2370,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2281 |
|
2282 |
if ( $options['custom_fields'] ) :
|
2283 |
foreach ( $options['custom_fields'] as $key => $val ) :
|
2284 |
-
if ( $val['category'] ) :
|
2285 |
$val['category'] = preg_replace('/\s/', '', $val['category']);
|
2286 |
$categories = explode(',', $val['category']);
|
2287 |
$categories = array_filter($categories);
|
@@ -2289,16 +2378,16 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2289 |
foreach($categories as $cat_id) :
|
2290 |
if ( is_numeric($cat_id) ) :
|
2291 |
$out .= 'jQuery(\'#in-category-' . $cat_id . '\').click(function(){if(jQuery(\'#in-category-' . $cat_id . '\').attr(\'checked\') == true) { if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;}; jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), function(html) { jQuery(\'#cft_selectbox\').html(html);';
|
2292 |
-
if ( $options['custom_field_template_use_autosave'] ) :
|
2293 |
$out .= ' var fields = jQuery(\'#cft :input\').fieldSerialize();';
|
2294 |
$out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields, success: function(){jQuery(\'#custom_field_template_select\').val(\'' . $key . '\');jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=' . $key . '&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
|
2295 |
-
if ( $options['custom_field_template_replace_the_title'] ) :
|
2296 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$key]['title'] . '\');';
|
2297 |
endif;
|
2298 |
$out .= 'jQuery(\'#cft\').html(html);}});}});';
|
2299 |
else :
|
2300 |
$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()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), success: function(html) {';
|
2301 |
-
if ( $options['custom_field_template_replace_the_title'] ) :
|
2302 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$key]['title'] . '\');';
|
2303 |
endif;
|
2304 |
$out .= 'jQuery(\'#cft\').html(html);}});';
|
@@ -2306,7 +2395,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2306 |
$out .= ' });';
|
2307 |
|
2308 |
$out .= ' }else{ jQuery(\'#cft\').html(\'\');jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), function(html) { jQuery(\'#cft_selectbox\').html(html); jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), success: function(html) { jQuery(\'#cft\').html(html);}}); });';
|
2309 |
-
if ( $options['custom_field_template_replace_the_title'] ) :
|
2310 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . __('Custom Field Template', 'custom-field-template') . '\');';
|
2311 |
endif;
|
2312 |
$out .= '}});' . "\n";
|
@@ -2317,8 +2406,11 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2317 |
endif;
|
2318 |
|
2319 |
if ( 0 != count( get_page_templates() ) ):
|
2320 |
-
|
2321 |
-
$out .= 'jQuery(\'#
|
|
|
|
|
|
|
2322 |
$out .= '}});});';
|
2323 |
$out .= '});' . "\n";
|
2324 |
endif;
|
@@ -2356,20 +2448,23 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2356 |
|
2357 |
$out .= '<div style="position:absolute; top:30px; right:5px;">';
|
2358 |
$out .= '<img class="waiting" style="display:none; vertical-align:middle;" src="images/loading.gif" alt="" id="cftloading_img" /> ';
|
2359 |
-
if ( $options['custom_field_template_use_disable_button'] ) :
|
2360 |
$out .= '<input type="hidden" id="disable_value" value="0" />';
|
2361 |
$out .= '<input type="button" value="' . __('Disable', 'custom-field-template') . '" onclick="';
|
2362 |
$out .= 'if(jQuery(\'#disable_value\').val()==0) { jQuery(\'#disable_value\').val(1);jQuery(this).val(\''.__('Enable', 'custom-field-template').'\');jQuery(\'#cft input, #cft select, #cft textarea\').attr(\'disabled\',true);}else{ jQuery(\'#disable_value\').val(0);jQuery(this).val(\''.__('Disable', 'custom-field-template').'\');jQuery(\'#cft input, #cft select, #cft textarea\').attr(\'disabled\',false);}';
|
2363 |
$out .= '" class="button" style="vertical-align:middle;" />';
|
2364 |
endif;
|
2365 |
-
if (
|
2366 |
$out .= '<input type="button" value="' . __('Initialize', 'custom-field-template') . '" onclick="';
|
2367 |
$out .= 'if(confirm(\''.__('Are you sure to reset current values? Default values will be loaded.', 'custom-field-template').'\')){if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;};jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&default=true&id=\'+jQuery(\'#custom-field-template-id\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
|
2368 |
$out .= 'jQuery(\'#cft\').html(html);}});}';
|
2369 |
$out .= '" class="button" style="vertical-align:middle;" />';
|
2370 |
endif;
|
2371 |
-
if (
|
2372 |
$out .= '<input type="button" id="cft_save_button" value="' . __('Save', 'custom-field-template') . '" onclick="';
|
|
|
|
|
|
|
2373 |
$out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
|
2374 |
$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(), data: fields, success: function() {jQuery(\'.delete_file_checkbox:checked\').each(function() {jQuery(this).parent().parent().remove();});}});';
|
2375 |
$out .= '" class="button" style="vertical-align:middle;" />';
|
@@ -2380,7 +2475,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2380 |
if ( substr($wp_version, 0, 3) < '2.5' ) {
|
2381 |
$out .= '</div></fieldset></div>';
|
2382 |
} else {
|
2383 |
-
if ( $body && $options['custom_field_template_replace_the_title'] ) :
|
2384 |
$out .= '<script type="text/javascript">' . "\n" . '// <![CDATA[' . "\n";
|
2385 |
$out .= 'jQuery(document).ready(function() {jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$init_id]['title'] . '\');});' . "\n";
|
2386 |
$out .= '// ]]>' . "\n" . '</script>';
|
@@ -2400,17 +2495,17 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2400 |
$options = $this->get_custom_field_template_data();
|
2401 |
$filtered_cfts = array();
|
2402 |
|
2403 |
-
$post_id = $_REQUEST['post'];
|
2404 |
|
2405 |
// Page Categories
|
2406 |
$categories = get_the_category($post_id);
|
2407 |
$cats = array();
|
2408 |
if ( is_array($categories) ) foreach($categories as $category) $cats[] = $category->cat_ID;
|
2409 |
-
if ( $_REQUEST['post_category'] ) $cats = array_merge($cats, $_REQUEST['post_category']);
|
2410 |
|
2411 |
for ( $i=0; $i < count($options['custom_fields']); $i++ ) :
|
2412 |
// If only shows up on pages or posts if set
|
2413 |
-
if ( $options['custom_fields'][$i]['post_type'] ) :
|
2414 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
2415 |
if ( $options['custom_fields'][$i]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
|
2416 |
continue;
|
@@ -2425,7 +2520,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2425 |
endif;
|
2426 |
endif;
|
2427 |
|
2428 |
-
if ( $options['custom_fields'][$i]['custom_post_type'] ) :
|
2429 |
$custom_post_type = explode(',', $options['custom_fields'][$i]['custom_post_type']);
|
2430 |
$custom_post_type = array_filter( $custom_post_type );
|
2431 |
$custom_post_type = array_unique(array_filter(array_map('trim', $custom_post_type)));
|
@@ -2445,9 +2540,9 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2445 |
|
2446 |
if ( (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') || strstr($_SERVER['REQUEST_URI'], 'post_type=page') || $post->post_type=='page') ) :
|
2447 |
// Check if there are page template files to filter by and there is a page template
|
2448 |
-
if ( count($template_files) && (isset($post->page_template) || $_REQUEST['page_template']) ) :
|
2449 |
// If the page_template is not in the template_files filter remove this custom field
|
2450 |
-
if( !in_array($post->page_template, $template_files) && !in_array($_REQUEST['page_template'], $template_files) ) :
|
2451 |
continue;
|
2452 |
endif;
|
2453 |
elseif ( $options['custom_fields'][$i]['category'] ) :
|
@@ -2456,7 +2551,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2456 |
endif;
|
2457 |
|
2458 |
// If there is post_ids and this post id doesn't match them skip
|
2459 |
-
if ( count($post_ids) && !in_array($_REQUEST['post'], $post_ids) ) :
|
2460 |
continue;
|
2461 |
endif;
|
2462 |
|
@@ -2500,11 +2595,11 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2500 |
return ' ';
|
2501 |
endif;
|
2502 |
|
2503 |
-
$out
|
2504 |
foreach ( $filtered_cfts as $filtered_cft ) :
|
2505 |
-
if ( $options['custom_fields'][$filtered_cft['id']]['disable'] ) :
|
2506 |
|
2507 |
-
|
2508 |
$out .= '<option value="' . $filtered_cft['id'] . '" selected="selected">' . stripcslashes($filtered_cft['title']) . '</option>';
|
2509 |
else :
|
2510 |
$out .= '<option value="' . $filtered_cft['id'] . '">' . stripcslashes($filtered_cft['title']) . '</option>';
|
@@ -2514,11 +2609,11 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2514 |
|
2515 |
$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.length=0;};';
|
2516 |
$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) {';
|
2517 |
-
if ( $options['custom_field_template_replace_the_title'] ) :
|
2518 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(jQuery(\'#custom_field_template_select :selected\').text());';
|
2519 |
endif;
|
2520 |
$out .= 'jQuery(\'#cft\').html(html);}});};';
|
2521 |
-
if ( $options['custom_field_template_use_autosave'] ) :
|
2522 |
$out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
|
2523 |
$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});';
|
2524 |
else :
|
@@ -2533,13 +2628,13 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2533 |
global $wpdb, $wp_version;
|
2534 |
$options = $this->get_custom_field_template_data();
|
2535 |
|
2536 |
-
if( !isset( $id ) || $_REQUEST[
|
2537 |
-
$id = $_REQUEST[
|
2538 |
|
2539 |
if( !current_user_can('edit_post', $id) )
|
2540 |
return $id;
|
2541 |
|
2542 |
-
if( !wp_verify_nonce($_REQUEST['custom-field-template-verify-key'], 'custom-field-template') )
|
2543 |
return $id;
|
2544 |
|
2545 |
if ( !isset($_REQUEST['custom-field-template-id']) ) :
|
@@ -2603,30 +2698,30 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2603 |
default :
|
2604 |
$value = trim($_REQUEST[$name][$field_key][$data['cftnum']]);
|
2605 |
|
2606 |
-
if ( $options['custom_field_template_use_wpautop'] && $data['type'] == 'textarea' && !empty($value) )
|
2607 |
$value = wpautop($value);
|
2608 |
-
if ( is_numeric($data['editCode']) ) :
|
2609 |
eval(stripcslashes($options['php'][$data['editCode']]));
|
2610 |
endif;
|
2611 |
if ( $data['type'] != 'file' ) :
|
2612 |
if( isset( $value ) && strlen( $value ) ) :
|
2613 |
-
if ( $data['insertTag'] == true ) :
|
2614 |
if ( !empty($data['tagName']) ) :
|
2615 |
$tags_input[trim($data['tagName'])][] = $value;
|
2616 |
else :
|
2617 |
$tags_input['post_tag'][] = $value;
|
2618 |
endif;
|
2619 |
endif;
|
2620 |
-
if ( $data['valueCount'] == true ) :
|
2621 |
$options['value_count'][$title][$value] = $this->set_value_count($title, $value, $id)+1;
|
2622 |
endif;
|
2623 |
|
2624 |
-
if ( $_REQUEST['TinyMCE_' . $name . trim($_REQUEST[ $name."_rand" ][$i]) . '_size'] ) {
|
2625 |
preg_match('/cw=[0-9]+&ch=([0-9]+)/', $_REQUEST['TinyMCE_' . $name . trim($_REQUEST[ $name."_rand" ][$i]) . '_size'], $matched);
|
2626 |
$options['tinyMCE'][$id][$name][$i] = (int)($matched[1]/20);
|
2627 |
}
|
2628 |
$save_value[$title][] = $value;
|
2629 |
-
elseif ( $data['blank'] == true ) :
|
2630 |
$save_value[$title][] = '';
|
2631 |
else :
|
2632 |
$tmp_value = $this->get_post_meta( $id, $title, false );
|
@@ -2639,7 +2734,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2639 |
endif;
|
2640 |
|
2641 |
if ( $data['type'] == 'file' ) :
|
2642 |
-
if ( $_REQUEST[$name.'_delete'][$field_key][$data['cftnum']] ) :
|
2643 |
wp_delete_attachment($value);
|
2644 |
delete_post_meta($id, $title, $value);
|
2645 |
endif;
|
@@ -2649,7 +2744,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2649 |
wp_delete_attachment($value);
|
2650 |
endif;
|
2651 |
|
2652 |
-
if ( $data['relation'] == true ) :
|
2653 |
$upload_id = media_handle_upload($title, $id);
|
2654 |
else :
|
2655 |
$upload_id = media_handle_upload($title, '');
|
@@ -2700,7 +2795,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2700 |
endif;
|
2701 |
endforeach;
|
2702 |
|
2703 |
-
if ( is_array($tags_input) ) :
|
2704 |
foreach ( $tags_input as $tags_key => $tags_value ) :
|
2705 |
if ( class_exists('SimpleTags') && $tags_key == 'post_tag' ) :
|
2706 |
wp_cache_flush();
|
@@ -2770,25 +2865,26 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2770 |
}
|
2771 |
} while ($Temp = strtok("\r\n"));
|
2772 |
|
2773 |
-
$gap = 0;
|
|
|
2774 |
foreach( $Data as $Data_key => $Data_val ) :
|
2775 |
foreach( $Data_val as $title => $data) :
|
2776 |
if ( isset($cftisexist[$title]) ) $tmp_parentSN = $cftisexist[$title];
|
2777 |
else $tmp_parentSN = count($returndata);
|
2778 |
switch ( $data["type"]) :
|
2779 |
case 'checkbox' :
|
2780 |
-
if ( is_numeric($data["code"]) ) :
|
2781 |
eval(stripcslashes($options['php'][$data["code"]]));
|
2782 |
else :
|
2783 |
-
$values = explode( '#', $data["value"] );
|
2784 |
-
$valueLabel = explode( '#', $data["valueLabel"] );
|
2785 |
-
$defaults = explode( '#', $data["default"] );
|
2786 |
endif;
|
2787 |
|
2788 |
if ( is_array($defaults) )
|
2789 |
foreach($defaults as $dkey => $dval)
|
2790 |
$defaults[$dkey] = trim($dval);
|
2791 |
-
|
2792 |
$tmp = $key;
|
2793 |
$i = 0;
|
2794 |
if ( is_array($values) ) :
|
@@ -2797,7 +2893,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2797 |
$Data[$Data_key][$title]["value"] = trim($value);
|
2798 |
$Data[$Data_key][$title]["originalValue"] = $data["value"];
|
2799 |
$Data[$Data_key][$title]['cftnum'] = $i;
|
2800 |
-
if ( $valueLabel[$i] )
|
2801 |
$Data[$Data_key][$title]["valueLabel"] = trim($valueLabel[$i]);
|
2802 |
if ( $tmp!=$key )
|
2803 |
$Data[$Data_key][$title]["hideKey"] = true;
|
@@ -2817,19 +2913,19 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2817 |
default :
|
2818 |
if ( $data['type'] == 'fieldset_open' ) :
|
2819 |
$fieldset = array();
|
2820 |
-
if ( $_REQUEST[$this->sanitize_name($title)] ) $fieldsetcounter = count($_REQUEST[$this->sanitize_name($title)])-1;
|
2821 |
-
else if ( $_REQUEST['post'] ) $fieldsetcounter = $this->get_post_meta( $_REQUEST['post'], $title, true )-1;
|
2822 |
else $fieldsetcounter = 0;
|
2823 |
-
if ( $data['multiple'] ) $fieldset_multiple = 1;
|
2824 |
endif;
|
2825 |
-
if ( is_array($fieldset) ) :
|
2826 |
-
if (
|
2827 |
endif;
|
2828 |
-
if ( $data['multiple'] == true && $data['type'] != 'checkbox' && $data['type'] != 'fieldset_open' && !
|
2829 |
-
$counter = count($_REQUEST[$this->sanitize_name($title)][$tmp_parentSN+$gap]);
|
2830 |
if ( $data['type'] == 'file' && $_FILES[$this->sanitize_name($title)] ) $counter = (int)count($_FILES[$this->sanitize_name($title)]['name'][$tmp_parentSN+$gap])+1;
|
2831 |
-
if ( $_REQUEST['post_ID'] ) $org_counter = count($this->get_post_meta( $_REQUEST['post_ID'], $title ));
|
2832 |
-
else if ( $_REQUEST['post'] ) $org_counter = count($this->get_post_meta( $_REQUEST['post'], $title ));
|
2833 |
else $org_counter = 1;
|
2834 |
if ( !$counter ) :
|
2835 |
$counter = $org_counter;
|
@@ -2838,8 +2934,8 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2838 |
if ( empty($_REQUEST[$this->sanitize_name($title)][$tmp_parentSN+$gap][$counter-1]) ) $counter--;
|
2839 |
endif;
|
2840 |
if ( !$org_counter ) $org_counter = 2;
|
2841 |
-
if ( is_numeric($data['startNum']) && $data['startNum']>$counter ) $counter = $data['startNum'];
|
2842 |
-
if ( is_numeric($data['endNum']) && $data['endNum']<$counter ) $counter = $data['endNum'];
|
2843 |
if ( $counter ) :
|
2844 |
for($i=0;$i<$counter; $i++) :
|
2845 |
$count_key = count($returndata);
|
@@ -2848,7 +2944,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2848 |
$Data[$Data_key][$title]['cftnum'] = $i;
|
2849 |
$Data[$Data_key][$title]['parentSN'] = $tmp_parentSN+$gap;
|
2850 |
$returndata[$count_key] = $Data[$Data_key];
|
2851 |
-
if ( is_array($fieldset) ) :
|
2852 |
$fieldset[] = $Data[$Data_key];
|
2853 |
endif;
|
2854 |
endfor;
|
@@ -2860,7 +2956,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2860 |
if ( !isset($cftisexist[$title]) ) $Data[$Data_key][$title]['parentSN'] = $tmp_parentSN+$gap;
|
2861 |
else $Data[$Data_key][$title]['parentSN'] = $tmp_parentSN;
|
2862 |
$returndata[] = $Data[$Data_key];
|
2863 |
-
if ( is_array($fieldset) ) :
|
2864 |
$Data[$Data_key][$title]['parentSN'] = $tmp_parentSN2[$title];
|
2865 |
$fieldset[] = $Data[$Data_key];
|
2866 |
endif;
|
@@ -2869,9 +2965,9 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2869 |
for($i=0;$i<$fieldsetcounter;$i++) :
|
2870 |
$returndata = array_merge($returndata, $fieldset);
|
2871 |
endfor;
|
2872 |
-
$groupcounter = (int)$this->get_post_meta( $_REQUEST['post_ID'], $title, true );
|
2873 |
-
if ( $groupcounter == 0 ) $groupcounter = $fieldsetcounter;
|
2874 |
-
if ( $_REQUEST[$this->sanitize_name($title)] && $fieldset_multiple ) :
|
2875 |
$gap += ($groupcounter - count($_REQUEST[$this->sanitize_name($title)]))*count($fieldset);
|
2876 |
unset($fieldset_multiple);
|
2877 |
endif;
|
@@ -2883,17 +2979,18 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2883 |
endforeach;
|
2884 |
endforeach;
|
2885 |
|
2886 |
-
|
2887 |
if ( is_array($returndata) ) :
|
2888 |
foreach( $returndata as $Data_key => $Data_val ) :
|
2889 |
foreach( $Data_val as $title => $data ) :
|
2890 |
-
if ( is_numeric($cftnum[$title]) ) $cftnum[$title]++;
|
2891 |
else $cftnum[$title] = 0;
|
2892 |
$returndata[$Data_key][$title]['cftnum'] = $cftnum[$title];
|
2893 |
endforeach;
|
2894 |
endforeach;
|
2895 |
endif;
|
2896 |
}
|
|
|
2897 |
return $returndata;
|
2898 |
}
|
2899 |
|
@@ -2997,7 +3094,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2997 |
if ( $val['outputNone'] ) $replace_val = $val['outputNone'];
|
2998 |
else $replace_val = '';
|
2999 |
endif;
|
3000 |
-
if ( $options['shortcode_format_use_php'][$format] )
|
3001 |
$output = $this->EvalBuffer($output);
|
3002 |
|
3003 |
$key = preg_quote($key, '/');
|
@@ -3100,7 +3197,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3100 |
case 'textfield':
|
3101 |
case 'textarea':
|
3102 |
if ( $rval['class'] ) $class = ' class="' . $rval['class'] . '"';
|
3103 |
-
$replace_val[$rkey] .= '<input type="text" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' .
|
3104 |
break;
|
3105 |
case 'checkbox':
|
3106 |
if ( $rval['class'] ) $class = ' class="' . $rval['class'] . '"';
|
@@ -3129,7 +3226,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3129 |
if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][rawurlencode($key)][$rkey] )
|
3130 |
$checked = ' checked="checked"';
|
3131 |
|
3132 |
-
$replace_val[$rkey] .= '<li><label><input type="checkbox" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' .
|
3133 |
if ( $valueLabel[$j] ) $replace_val[$rkey] .= stripcslashes($valueLabel[$j]);
|
3134 |
else $replace_val[$rkey] .= stripcslashes($metavalue);
|
3135 |
$replace_val[$rkey] .= '</label></li>';
|
@@ -3137,9 +3234,9 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3137 |
endforeach;
|
3138 |
$replace_val[$rkey] .= '</ul>';
|
3139 |
else :
|
3140 |
-
if ( $_REQUEST['cftsearch'][rawurlencode($key)][$rkey][0] ==
|
3141 |
$checked = ' checked="checked"';
|
3142 |
-
$replace_val[$rkey] .= '<label><input type="checkbox" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' .
|
3143 |
if ( $valueLabel[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabel[0]));
|
3144 |
else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
|
3145 |
$replace_val[$rkey] .= '</label>';
|
@@ -3167,7 +3264,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3167 |
endif;
|
3168 |
if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][rawurlencode($key)][$rkey] )
|
3169 |
$checked = ' checked="checked"';
|
3170 |
-
$replace_val[$rkey] .= '<li><label><input type="radio" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' .
|
3171 |
if ( $valueLabel[$j] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabel[$j]));
|
3172 |
else $replace_val[$rkey] .= stripcslashes($metavalue);
|
3173 |
$replace_val[$rkey] .= '</label></li>';
|
@@ -3175,9 +3272,9 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3175 |
endforeach;
|
3176 |
$replace_val[$rkey] .= '</ul>';
|
3177 |
else :
|
3178 |
-
if ( $_REQUEST['cftsearch'][rawurlencode($key)][$rkey][0] ==
|
3179 |
$checked = ' checked="checked"';
|
3180 |
-
$replace_val[$rkey] .= '<label><input type="radio" name="cftsearch[' . rawurlencode($key) . '][]" value="' .
|
3181 |
if ( $valueLabel[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabel[0]));
|
3182 |
else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
|
3183 |
$replace_val[$rkey] .= '</label>';
|
@@ -3203,7 +3300,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3203 |
|
3204 |
if ( $_REQUEST['cftsearch'][rawurlencode($key)][$rkey][0] == $metaval ) $selected = ' selected="selected"';
|
3205 |
else $selected = "";
|
3206 |
-
$replace_val[$rkey] .= '<option value="' .
|
3207 |
if ( $valueLabel[$j] )
|
3208 |
$replace_val[$rkey] .= stripcslashes(trim($valueLabel[$j]));
|
3209 |
else
|
@@ -3216,7 +3313,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3216 |
endswitch;
|
3217 |
endforeach;
|
3218 |
|
3219 |
-
if ( $options['shortcode_format_use_php'][$format] )
|
3220 |
$output = $this->EvalBuffer($output);
|
3221 |
$key = preg_quote($key, '/');
|
3222 |
$output = preg_replace('/\['.$key.'\](?!\[[0-9]+\])/', $replace_val[0], $output);
|
@@ -3253,7 +3350,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3253 |
case 'textfield':
|
3254 |
case 'textarea':
|
3255 |
if ( $val['class'] ) $class = ' class="' . $val['class'] . '"';
|
3256 |
-
$output .= '<dd><input type="text" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' .
|
3257 |
break;
|
3258 |
case 'checkbox':
|
3259 |
unset($checked);
|
@@ -3261,7 +3358,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3261 |
if ( is_array($_REQUEST['cftsearch'][rawurlencode($key)]) )
|
3262 |
foreach ( $_REQUEST['cftsearch'][rawurlencode($key)] as $values )
|
3263 |
if ( $val['value'] == $values[0] ) $checked = ' checked="checked"';
|
3264 |
-
$output .= '<dd><label><input type="checkbox" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' .
|
3265 |
if ( $val['valueLabel'] )
|
3266 |
$output .= stripcslashes($val['valueLabel']);
|
3267 |
else
|
@@ -3277,7 +3374,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3277 |
unset($checked);
|
3278 |
$metaval = trim($metaval);
|
3279 |
if ( $_REQUEST['cftsearch'][rawurlencode($key)][0][0] == $metaval ) $checked = 'checked="checked"';
|
3280 |
-
$output .= '<dd><label>' . '<input type="radio" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' .
|
3281 |
if ( $val['valueLabel'] )
|
3282 |
$output .= stripcslashes(trim($valueLabel[$i]));
|
3283 |
else
|
@@ -3298,7 +3395,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3298 |
$metaval = trim($metaval);
|
3299 |
if ( $_REQUEST['cftsearch'][rawurlencode($key)][0][0] == $metaval ) $selected = 'selected="selected"';
|
3300 |
else $selected = "";
|
3301 |
-
$output .= '<option value="' .
|
3302 |
if ( $val['valueLabel'] )
|
3303 |
$output .= stripcslashes(trim($valueLabel[$i]));
|
3304 |
else
|
@@ -3605,5 +3702,18 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3605 |
}
|
3606 |
}
|
3607 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3608 |
$custom_field_template = new custom_field_template();
|
3609 |
?>
|
4 |
Plugin URI: http://wpgogo.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.8.4
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
55 |
add_filter( 'attachment_fields_to_edit', array(&$this, 'custom_field_template_attachment_fields_to_edit'), 10, 2 );
|
56 |
|
57 |
if ( isset($_REQUEST['cftsearch_submit']) ) :
|
58 |
+
if ( !empty($_REQUEST['limit']) )
|
59 |
add_action( 'post_limits', array(&$this, 'custom_field_template_post_limits'));
|
60 |
add_filter( 'posts_join', array(&$this, 'custom_field_template_posts_join') );
|
61 |
add_filter( 'posts_where', array(&$this, 'custom_field_template_posts_where'), 100 );
|
80 |
}
|
81 |
}
|
82 |
|
83 |
+
if ( is_user_logged_in() && isset($_REQUEST['post']) && isset($_REQUEST['page']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'selectbox' ) {
|
84 |
echo $this->custom_field_template_selectbox();
|
85 |
exit();
|
86 |
}
|
87 |
|
88 |
+
if ( is_user_logged_in() && isset($_REQUEST['post']) && isset($_REQUEST['page']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxsave' ) {
|
89 |
if ( $_REQUEST['post'] > 0 )
|
90 |
$this->edit_meta_value( $_REQUEST['post'], '' );
|
91 |
exit();
|
92 |
}
|
93 |
|
94 |
+
if ( is_user_logged_in() && isset($_REQUEST['page']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajaxload') {
|
95 |
if ( isset($_REQUEST['id']) )
|
96 |
$id = $_REQUEST['id'];
|
97 |
elseif ( isset($options['posts'][$_REQUEST['post']]) )
|
122 |
endif;
|
123 |
endif;
|
124 |
|
125 |
+
if ( !empty($options['custom_field_template_widget_shortcode']) )
|
126 |
add_filter('widget_text', 'do_shortcode');
|
127 |
|
128 |
if ( substr($wp_version, 0, 3) >= '2.7' ) {
|
144 |
require_once(ABSPATH . 'wp-admin/includes/template.php');
|
145 |
add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'post', 'normal', 'core');
|
146 |
add_meta_box('cftdiv', __('Custom Field Template', 'custom-field-template'), array(&$this, 'insert_custom_field'), 'page', 'normal', 'core');
|
147 |
+
if ( function_exists('remove_meta_box') && !empty($options['custom_field_template_disable_default_custom_fields']) ) :
|
148 |
remove_meta_box('postcustom', 'post', 'normal');
|
149 |
remove_meta_box('postcustom', 'page', 'normal');
|
150 |
remove_meta_box('pagecustomdiv', 'page', 'normal');
|
153 |
if ( is_array($options['custom_fields']) ) :
|
154 |
$custom_post_type = array();
|
155 |
foreach($options['custom_fields'] as $key => $val ) :
|
156 |
+
if ( isset($options['custom_fields'][$key]['custom_post_type']) ) :
|
157 |
+
$tmp_custom_post_type = explode(',', $options['custom_fields'][$key]['custom_post_type']);
|
158 |
+
$tmp_custom_post_type = array_filter( $tmp_custom_post_type );
|
159 |
+
$tmp_custom_post_type = array_unique(array_filter(array_map('trim', $tmp_custom_post_type)));
|
160 |
+
$custom_post_type = array_merge($custom_post_type, $tmp_custom_post_type);
|
161 |
+
endif;
|
162 |
endforeach;
|
163 |
+
if ( isset($custom_post_type) && is_array($custom_post_type) ) :
|
164 |
foreach( $custom_post_type as $val ) :
|
165 |
if ( function_exists('remove_meta_box') && $options['custom_field_template_disable_default_custom_fields'] ) :
|
166 |
remove_meta_box('postcustom', $val, 'normal');
|
231 |
}
|
232 |
}
|
233 |
|
234 |
+
/*foreach ( (array) $ids as $id ) {
|
235 |
if ( ! isset($cache[$id]) )
|
236 |
$cache[$id] = array();
|
237 |
+
}*/
|
238 |
|
239 |
+
if ( !empty($cache) && is_array($cache) ) :
|
240 |
foreach ( (array) array_keys($cache) as $post)
|
241 |
wp_cache_set($post, $cache[$post], 'cft_post_meta');
|
242 |
|
301 |
|
302 |
function custom_field_template_admin_head() {
|
303 |
global $wp_version;
|
304 |
+
$options = $this->get_custom_field_template_data();
|
305 |
|
306 |
if ( !defined('WP_PLUGIN_DIR') )
|
307 |
$plugin_dir = str_replace( ABSPATH, '', dirname(__FILE__) );
|
310 |
|
311 |
echo '<link rel="stylesheet" type="text/css" href="' . wp_guess_url() . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/datePicker.css" />'."\n";
|
312 |
|
313 |
+
if ( !empty($options['custom_field_template_use_validation']) ) :
|
314 |
+
?>
|
315 |
+
<script type="text/javascript">
|
316 |
+
// <![CDATA[
|
317 |
+
jQuery(document).ready(function() {
|
318 |
+
jQuery("#post").validate();
|
319 |
+
});
|
320 |
+
//-->
|
321 |
+
</script>
|
322 |
+
<style type="text/css">
|
323 |
+
<!--
|
324 |
+
label.error { color:#FF0000; }
|
325 |
+
-->
|
326 |
+
</style>
|
327 |
+
|
328 |
+
<?php
|
329 |
+
endif;
|
330 |
+
|
331 |
if ( substr($wp_version, 0, 3) >= '2.7' && is_user_logged_in() && ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') ) && !strstr($_SERVER['REQUEST_URI'], 'page=') ) {
|
332 |
?>
|
333 |
<script type="text/javascript">
|
412 |
.cft-actions { visibility: hidden; padding: 2px 0 0; }
|
413 |
tr:hover .cft-actions { visibility: visible; }
|
414 |
.inline-edit-row fieldset label { display:inline; }
|
415 |
+
label.error { color:#FF0000; }
|
416 |
-->
|
417 |
</style>
|
418 |
<?php
|
528 |
}
|
529 |
|
530 |
function custom_field_template_admin_scripts() {
|
531 |
+
global $post;
|
532 |
+
$options = $this->get_custom_field_template_data();
|
533 |
+
|
534 |
if ( !defined('WP_PLUGIN_DIR') )
|
535 |
$plugin_dir = str_replace( ABSPATH, '', dirname(__FILE__) );
|
536 |
else
|
542 |
wp_enqueue_script( 'bgiframe', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.bgiframe.js', array('jquery') ) ;
|
543 |
wp_enqueue_script( 'datePicker', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.datePicker.js', array('jquery') );
|
544 |
wp_enqueue_script( 'textarearesizer', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.textarearesizer.js', array('jquery') );
|
545 |
+
if( strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || (is_object($post) && $post->post_type=='page') ) :
|
546 |
wp_enqueue_script( 'editor' );
|
547 |
endif;
|
548 |
+
|
549 |
+
if ( !empty($options['custom_field_template_use_validation']) ) :
|
550 |
+
wp_enqueue_script( 'jquery-validate', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.validate.js', array('jquery') );
|
551 |
+
wp_enqueue_script( 'additiona-methods', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/additiona-methods.js', array('jquery') );
|
552 |
+
if ( file_exists(ABSPATH . PLUGINDIR . '/' . $plugin_dir . '/js/messages_' . WPLANG . '.js') )
|
553 |
+
wp_enqueue_script( 'messages_' . WPLANG, '/' . PLUGINDIR . '/' . $plugin_dir . '/js/messages_' . WPLANG .'.js', array('jquery') );
|
554 |
+
endif;
|
555 |
}
|
556 |
|
557 |
function install_custom_field_template_data() {
|
647 |
$options = $this->get_custom_field_template_data();
|
648 |
|
649 |
if ( empty($excerpt) ) $this->is_excerpt = true;
|
650 |
+
if ( !empty($options['custom_field_template_excerpt_shortcode']) ) return do_shortcode($excerpt);
|
651 |
else return $excerpt;
|
652 |
}
|
653 |
|
661 |
return $post->post_excerpt ? $post->post_excerpt : strip_shortcodes($content);
|
662 |
endif;
|
663 |
|
664 |
+
if ( isset($options['hook']) && count($options['hook']) > 0 ) :
|
665 |
$categories = get_the_category();
|
666 |
$cats = array();
|
667 |
foreach( $categories as $val ) :
|
668 |
$cats[] = $val->cat_ID;
|
669 |
endforeach;
|
670 |
|
671 |
+
if ( !empty($options['custom_fields'][$id]['post_type']) ) :
|
672 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
673 |
if ( $options['custom_fields'][$id]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
|
674 |
return;
|
686 |
for ( $i=0; $i<count($options['hook']); $i++ ) :
|
687 |
$options['hook'][$i]['content'] = stripslashes($options['hook'][$i]['content']);
|
688 |
if ( is_feed() && !$options['hook'][$i]['feed'] ) break;
|
689 |
+
if ( !empty($options['hook'][$i]['category']) ) :
|
690 |
if ( is_category() || is_single() || is_feed() ) :
|
691 |
if ( $options['hook'][$i]['use_php'] ) :
|
692 |
$options['hook'][$i]['content'] = $this->EvalBuffer(stripcslashes($options['hook'][$i]['content']));
|
763 |
}
|
764 |
|
765 |
function custom_field_template_admin() {
|
766 |
+
global $wp_version;
|
767 |
+
|
768 |
$options = $this->get_custom_field_template_data();
|
769 |
+
|
770 |
+
if( !empty($_POST["custom_field_template_set_options_submit"]) ) :
|
771 |
unset($options['custom_fields']);
|
772 |
$j = 0;
|
773 |
for($i=0;$i<count($_POST["custom_field_template_content"]);$i++) {
|
775 |
if ( preg_match('/\[content\]|\[post_title\]|\[excerpt\]|\[action\]/i', $_POST["custom_field_template_content"][$i]) ) :
|
776 |
$errormessage = __('You can not use the following words as the field key: `content`, `post_title`, and `excerpt`, and `action`.', 'custom-field-template');
|
777 |
endif;
|
778 |
+
if ( isset($_POST["custom_field_template_title"][$i]) ) $options['custom_fields'][$j]['title'] = $_POST["custom_field_template_title"][$i];
|
779 |
+
if ( isset($_POST["custom_field_template_content"][$i]) ) $options['custom_fields'][$j]['content'] = $_POST["custom_field_template_content"][$i];
|
780 |
+
if ( isset($_POST["custom_field_template_instruction"][$i]) ) $options['custom_fields'][$j]['instruction'] = $_POST["custom_field_template_instruction"][$i];
|
781 |
+
if ( isset($_POST["custom_field_template_category"][$i]) ) $options['custom_fields'][$j]['category'] = $_POST["custom_field_template_category"][$i];
|
782 |
+
if ( isset($_POST["custom_field_template_post"][$i]) ) $options['custom_fields'][$j]['post'] = $_POST["custom_field_template_post"][$i];
|
783 |
+
if ( isset($_POST["custom_field_template_post_type"][$i]) ) $options['custom_fields'][$j]['post_type'] = $_POST["custom_field_template_post_type"][$i];
|
784 |
+
if ( isset($_POST["custom_field_template_custom_post_type"][$i]) ) $options['custom_fields'][$j]['custom_post_type'] = $_POST["custom_field_template_custom_post_type"][$i];
|
785 |
+
if ( isset($_POST["custom_field_template_template_files"][$i]) ) $options['custom_fields'][$j]['template_files'] = $_POST["custom_field_template_template_files"][$i];
|
786 |
+
if ( isset($_POST["custom_field_template_disable"][$i]) ) $options['custom_fields'][$j]['disable'] = $_POST["custom_field_template_disable"][$i];
|
787 |
$j++;
|
788 |
}
|
789 |
}
|
790 |
update_option('custom_field_template_data', $options);
|
791 |
$message = __('Options updated.', 'custom-field-template');
|
792 |
+
elseif( !empty($_POST["custom_field_template_global_settings_submit"]) ) :
|
793 |
+
$options['custom_field_template_replace_keys_by_labels'] = isset($_POST['custom_field_template_replace_keys_by_labels']) ? 1 : '';
|
794 |
+
$options['custom_field_template_use_multiple_insert'] = isset($_POST['custom_field_template_use_multiple_insert']) ? 1 : '';
|
795 |
+
$options['custom_field_template_use_wpautop'] = isset($_POST['custom_field_template_use_wpautop']) ? 1 : '';
|
796 |
+
$options['custom_field_template_use_autosave'] = isset($_POST['custom_field_template_use_autosave']) ? 1 : '';
|
797 |
+
$options['custom_field_template_use_disable_button'] = isset($_POST['custom_field_template_use_disable_button']) ? 1 : '';
|
798 |
+
$options['custom_field_template_disable_initialize_button'] = isset($_POST['custom_field_template_disable_initialize_button']) ? 1 : '';
|
799 |
+
$options['custom_field_template_disable_save_button'] = isset($_POST['custom_field_template_disable_save_button']) ? 1 : '';
|
800 |
+
$options['custom_field_template_disable_default_custom_fields'] = isset($_POST['custom_field_template_disable_default_custom_fields']) ? 1 : '';
|
801 |
+
$options['custom_field_template_disable_quick_edit'] = isset($_POST['custom_field_template_disable_quick_edit']) ? 1 : '';
|
802 |
+
$options['custom_field_template_disable_custom_field_column'] = isset($_POST['custom_field_template_disable_custom_field_column']) ? 1 : '';
|
803 |
+
$options['custom_field_template_replace_the_title'] = isset($_POST['custom_field_template_replace_the_title']) ? 1 : '';
|
804 |
+
$options['custom_field_template_widget_shortcode'] = isset($_POST['custom_field_template_widget_shortcode']) ? 1 : '';
|
805 |
+
$options['custom_field_template_excerpt_shortcode'] = isset($_POST['custom_field_template_excerpt_shortcode']) ? 1 : '';
|
806 |
+
$options['custom_field_template_use_validation'] = isset($_POST['custom_field_template_use_validation']) ? 1 : '';
|
807 |
+
$options['custom_field_template_before_list'] = isset($_POST['custom_field_template_before_list']) ? $_POST['custom_field_template_before_list'] : '';
|
808 |
+
$options['custom_field_template_after_list'] = isset($_POST['custom_field_template_after_list']) ? $_POST['custom_field_template_after_list'] : '';
|
809 |
+
$options['custom_field_template_before_value'] = isset($_POST['custom_field_template_before_value']) ? $_POST['custom_field_template_before_value'] : '';
|
810 |
+
$options['custom_field_template_after_value'] = isset($_POST['custom_field_template_after_value']) ? $_POST['custom_field_template_after_value'] : '';
|
811 |
+
$options['custom_field_template_replace_keys_by_labels'] = isset($_POST['custom_field_template_replace_keys_by_labels']) ? 1 : '';
|
812 |
+
$options['custom_field_template_replace_keys_by_labels'] = isset($_POST['custom_field_template_replace_keys_by_labels']) ? 1 : '';
|
813 |
+
$options['custom_field_template_replace_keys_by_labels'] = isset($_POST['custom_field_template_replace_keys_by_labels']) ? 1 : '';
|
814 |
update_option('custom_field_template_data', $options);
|
815 |
$message = __('Options updated.', 'custom-field-template');
|
816 |
+
elseif ( !empty($_POST['custom_field_template_css_submit']) ) :
|
817 |
$options['css'] = $_POST['custom_field_template_css'];
|
818 |
update_option('custom_field_template_data', $options);
|
819 |
$message = __('Options updated.', 'custom-field-template');
|
820 |
+
elseif ( !empty($_POST['custom_field_template_shortcode_format_submit']) ) :
|
821 |
unset($options['shortcode_format'], $options['shortcode_format_use_php']);
|
822 |
$j = 0;
|
823 |
for($i=0;$i<count($_POST["custom_field_template_shortcode_format"]);$i++) {
|
829 |
}
|
830 |
update_option('custom_field_template_data', $options);
|
831 |
$message = __('Options updated.', 'custom-field-template');
|
832 |
+
elseif ( !empty($_POST['custom_field_template_php_submit']) ) :
|
833 |
unset($options['php']);
|
834 |
for($i=0;$i<count($_POST["custom_field_template_php"]);$i++) {
|
835 |
if( $_POST["custom_field_template_php"][$i] )
|
837 |
}
|
838 |
update_option('custom_field_template_data', $options);
|
839 |
$message = __('Options updated.', 'custom-field-template');
|
840 |
+
elseif( !empty($_POST["custom_field_template_hook_submit"]) ) :
|
841 |
unset($options['hook']);
|
842 |
$j = 0;
|
843 |
for($i=0;$i<count($_POST["custom_field_template_hook_content"]);$i++) {
|
854 |
}
|
855 |
update_option('custom_field_template_data', $options);
|
856 |
$message = __('Options updated.', 'custom-field-template');
|
857 |
+
elseif ( !empty($_POST['custom_field_template_rebuild_value_counts_submit']) ) :
|
858 |
$this->custom_field_template_rebuild_value_counts();
|
859 |
$options = $this->get_custom_field_template_data();
|
860 |
$message = __('Value Counts rebuilt.', 'custom-field-template');
|
861 |
+
elseif ( !empty($_POST['custom_field_template_rebuild_tags_submit']) ) :
|
862 |
$options = $this->get_custom_field_template_data();
|
863 |
$message = __('Tags rebuilt.', 'custom-field-template');
|
864 |
+
elseif ( !empty($_POST['custom_field_template_import_options_submit']) ) :
|
865 |
if ( is_uploaded_file($_FILES['cftfile']['tmp_name']) ) :
|
866 |
ob_start();
|
867 |
readfile ($_FILES['cftfile']['tmp_name']);
|
872 |
$message = __('Options imported.', 'custom-field-template');
|
873 |
$options = $this->get_custom_field_template_data();
|
874 |
endif;
|
875 |
+
elseif ( !empty($_POST['custom_field_template_reset_options_submit']) ) :
|
876 |
$this->install_custom_field_template_data();
|
877 |
$this->install_custom_field_template_css();
|
878 |
$options = $this->get_custom_field_template_data();
|
879 |
$message = __('Options resetted.', 'custom-field-template');
|
880 |
+
elseif ( !empty($_POST['custom_field_template_delete_options_submit']) ) :
|
881 |
delete_option('custom_field_template_data');
|
882 |
$options = $this->get_custom_field_template_data();
|
883 |
$message = __('Options deleted.', 'custom-field-template');
|
908 |
jQuery('textarea.resizable:not(.processed)').TextAreaResizer();
|
909 |
});
|
910 |
</script>
|
911 |
+
<?php if ( !empty($message) ) : ?>
|
912 |
<div id="message" class="updated"><p><?php echo $message; ?></p></div>
|
913 |
<?php endif; ?>
|
914 |
+
<?php if ( !empty($errormessage) ) : ?>
|
915 |
<div id="errormessage" class="error"><p><?php echo $errormessage; ?></p></div>
|
916 |
<?php endif; ?>
|
917 |
<div class="wrap">
|
933 |
?>
|
934 |
<tr><td>
|
935 |
<p><strong>TEMPLATE #<?php echo $i; ?></strong>
|
936 |
+
<label for="custom_field_template_disable[<?php echo $i; ?>]"><input type="checkbox" name="custom_field_template_disable[<?php echo $i; ?>]" id="custom_field_template_disable[<?php echo $i; ?>]" value="1" <?php if ( isset($options['custom_fields'][$i]['disable']) ) checked(1, $options['custom_fields'][$i]['disable']); ?> /> <?php _e('Disable', 'custom-field-template'); ?></label>
|
937 |
</p>
|
938 |
<p><label for="custom_field_template_title[<?php echo $i; ?>]"><?php echo sprintf(__('Template Title', 'custom-field-template'), $i); ?></label>:<br />
|
939 |
+
<input type="text" name="custom_field_template_title[<?php echo $i; ?>]" id="custom_field_template_title[<?php echo $i; ?>]" value="<?php if ( isset($options['custom_fields'][$i]['title']) ) echo esc_attr(stripcslashes($options['custom_fields'][$i]['title'])); ?>" size="80" /></p>
|
940 |
<p><label for="custom_field_template_instruction[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Template Instruction', 'custom-field-template'), $i); ?></a></label>:<br />
|
941 |
+
<textarea class="large-text" name="custom_field_template_instruction[<?php echo $i; ?>]" id="custom_field_template_instruction[<?php echo $i; ?>]" rows="5" cols="80"<?php if ( empty($options['custom_fields'][$i]['instruction']) ) : echo ' style="display:none;"'; endif; ?>><?php if ( isset($options['custom_fields'][$i]['instruction']) ) echo stripcslashes($options['custom_fields'][$i]['instruction']); ?></textarea></p>
|
942 |
<p><label for="custom_field_template_post_type[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Post Type', 'custom-field-template'), $i); ?></a></label>:<br />
|
943 |
<span<?php if ( empty($options['custom_fields'][$i]['post_type']) ) : echo ' style="display:none;"'; endif; ?>>
|
944 |
+
<input type="radio" name="custom_field_template_post_type[<?php echo $i; ?>]" id="custom_field_template_post_type[<?php echo $i; ?>]" value=""<?php if ( !isset($options['custom_fields'][$i]['post_type']) ) : echo ' checked="checked"'; endif; ?> /> <?php _e('Both', 'custom-field-template'); ?>
|
945 |
+
<input type="radio" name="custom_field_template_post_type[<?php echo $i; ?>]" id="custom_field_template_post_type[<?php echo $i; ?>]" value="post"<?php if ( !empty($options['custom_fields'][$i]['post_type']) && $options['custom_fields'][$i]['post_type']=='post') : echo ' checked="checked"'; endif; ?> /> <?php _e('Post', 'custom-field-template'); ?>
|
946 |
+
<input type="radio" name="custom_field_template_post_type[<?php echo $i; ?>]" id="custom_field_template_post_type[<?php echo $i; ?>]" value="page"<?php if ( !empty($options['custom_fields'][$i]['post_type']) && $options['custom_fields'][$i]['post_type']=='page') : echo ' checked="checked"'; endif; ?> /> <?php _e('Page', 'custom-field-template'); ?></span></p>
|
947 |
<p><label for="custom_field_template_custom_post_type[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Custom Post Type (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
948 |
+
<input type="text" name="custom_field_template_custom_post_type[<?php echo $i; ?>]" id="custom_field_template_custom_post_type[<?php echo $i; ?>]" value="<?php if ( isset($options['custom_fields'][$i]['custom_post_type']) ) echo esc_attr(stripcslashes($options['custom_fields'][$i]['custom_post_type'])); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['custom_post_type']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
949 |
<p><label for="custom_field_template_post[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Post ID (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
950 |
+
<input type="text" name="custom_field_template_post[<?php echo $i; ?>]" id="custom_field_template_post[<?php echo $i; ?>]" value="<?php if ( isset($options['custom_fields'][$i]['post']) ) echo esc_attr(stripcslashes($options['custom_fields'][$i]['post'])); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['post']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
951 |
<p><label for="custom_field_template_category[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
952 |
+
<input type="text" name="custom_field_template_category[<?php echo $i; ?>]" id="custom_field_template_category[<?php echo $i; ?>]" value="<?php if ( isset($options['custom_fields'][$i]['category']) ) echo esc_attr(stripcslashes($options['custom_fields'][$i]['category'])); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['category']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
953 |
<p><label for="custom_field_template_template_files[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Page Template file name(s) (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
954 |
+
<input type="text" name="custom_field_template_template_files[<?php echo $i; ?>]" id="custom_field_template_template_files[<?php echo $i; ?>]" value="<?php if ( isset($options['custom_fields'][$i]['template_files']) ) echo esc_attr(stripcslashes($options['custom_fields'][$i]['template_files'])); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['template_files']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
955 |
<p><label for="custom_field_template_content[<?php echo $i; ?>]"><?php echo sprintf(__('Template Content', 'custom-field-template'), $i); ?></label>:<br />
|
956 |
+
<textarea name="custom_field_template_content[<?php echo $i; ?>]" class="resizable large-text" id="custom_field_template_content[<?php echo $i; ?>]" rows="10" cols="80"><?php if ( isset($options['custom_fields'][$i]['content']) ) echo stripcslashes($options['custom_fields'][$i]['content']); ?></textarea></p>
|
957 |
</td></tr>
|
958 |
<?php
|
959 |
}
|
985 |
?>
|
986 |
<tr><td>
|
987 |
<p><label for="custom_field_template_replace_keys_by_labels"><?php _e('In case that you would like to replace custom keys by labels if `label` is set', 'custom-field-template'); ?></label>:<br />
|
988 |
+
<input type="checkbox" name="custom_field_template_replace_keys_by_labels" id="custom_field_template_replace_keys_by_labels" value="1" <?php if ( !empty($options['custom_field_template_replace_keys_by_labels']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Use labels in place of custom keys', 'custom-field-template'); ?></p>
|
989 |
</td></tr>
|
990 |
<tr><td>
|
991 |
<p><label for="custom_field_template_use_wpautop"><?php _e('In case that you would like to add p and br tags in textareas automatically', 'custom-field-template'); ?></label>:<br />
|
992 |
+
<input type="checkbox" name="custom_field_template_use_wpautop" id="custom_field_template_use_wpautop" value="1" <?php if ( !empty($options['custom_field_template_use_wpautop']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Use wpautop function', 'custom-field-template'); ?></p>
|
993 |
</td>
|
994 |
</tr>
|
995 |
<tr><td>
|
996 |
<p><label for="custom_field_template_use_autosave"><?php _e('In case that you would like to save values automatically in switching templates', 'custom-field-template'); ?></label>:<br />
|
997 |
+
<input type="checkbox" name="custom_field_template_use_autosave" id="custom_field_template_use_autosave" value="1" <?php if ( !empty($options['custom_field_template_use_autosave']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Use the auto save in switching templates', 'custom-field-template'); ?></p>
|
998 |
</td>
|
999 |
</tr>
|
1000 |
<tr><td>
|
1001 |
<p><label for="custom_field_template_use_disable_button"><?php _e('In case that you would like to disable input fields of the custom field template temporarily', 'custom-field-template'); ?></label>:<br />
|
1002 |
+
<input type="checkbox" name="custom_field_template_use_disable_button" id="custom_field_template_use_disable_button" value="1" <?php if ( !empty($options['custom_field_template_use_disable_button']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Use the `Disable` button. The default custom fields will be superseded.', 'custom-field-template'); ?></p>
|
1003 |
</td>
|
1004 |
</tr>
|
1005 |
<tr><td>
|
1006 |
<p><label for="custom_field_template_disable_initialize_button"><?php _e('In case that you would like to forbid to use the initialize button.', 'custom-field-template'); ?></label>:<br />
|
1007 |
+
<input type="checkbox" name="custom_field_template_disable_initialize_button" id="custom_field_template_disable_initialize_button" value="1" <?php if ( !empty($options['custom_field_template_disable_initialize_button']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the initialize button', 'custom-field-template'); ?></p>
|
1008 |
</td>
|
1009 |
</tr>
|
1010 |
<tr><td>
|
1011 |
<p><label for="custom_field_template_disable_save_button"><?php _e('In case that you would like to forbid to use the save button.', 'custom-field-template'); ?></label>:<br />
|
1012 |
+
<input type="checkbox" name="custom_field_template_disable_save_button" id="custom_field_template_disable_save_button" value="1" <?php if ( !empty($options['custom_field_template_disable_save_button']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the save button', 'custom-field-template'); ?></p>
|
1013 |
</td>
|
1014 |
</tr>
|
1015 |
<tr><td>
|
1016 |
<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 />
|
1017 |
+
<input type="checkbox" name="custom_field_template_disable_default_custom_fields" id="custom_field_template_disable_default_custom_fields" value="1" <?php if ( !empty($options['custom_field_template_disable_default_custom_fields']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the default custom fields', 'custom-field-template'); ?></p>
|
1018 |
</td>
|
1019 |
</tr>
|
1020 |
<tr><td>
|
1021 |
<p><label for="custom_field_template_disable_quick_edit"><?php _e('In case that you would like to forbid to use the quick edit.', 'custom-field-template'); ?></label>:<br />
|
1022 |
+
<input type="checkbox" name="custom_field_template_disable_quick_edit" id="custom_field_template_disable_quick_edit" value="1" <?php if ( !empty($options['custom_field_template_disable_quick_edit']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the quick edit', 'custom-field-template'); ?></p>
|
1023 |
</td>
|
1024 |
</tr>
|
1025 |
<tr><td>
|
1026 |
<p><label for="custom_field_template_disable_custom_field_column"><?php _e('In case that you would like to forbid to display the custom field column on the edit post list page.', 'custom-field-template'); ?></label>:<br />
|
1027 |
+
<input type="checkbox" name="custom_field_template_disable_custom_field_column" id="custom_field_template_disable_custom_field_column" value="1" <?php if ( !empty($options['custom_field_template_disable_custom_field_column']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Disable the custom field column (The quick edit also does not work.)', 'custom-field-template'); ?></p>
|
1028 |
</td>
|
1029 |
</tr>
|
1030 |
<tr><td>
|
1031 |
<p><label for="custom_field_template_replace_the_title"><?php _e('In case that you would like to replace the box title with the template title.', 'custom-field-template'); ?></label>:<br />
|
1032 |
+
<input type="checkbox" name="custom_field_template_replace_the_title" id="custom_field_template_replace_the_title" value="1" <?php if ( !empty($options['custom_field_template_replace_the_title']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Replace the box title', 'custom-field-template'); ?></p>
|
1033 |
</td>
|
1034 |
</tr>
|
1035 |
<tr><td>
|
1036 |
<p><label for="custom_field_template_widget_shortcode"><?php _e('In case that you would like to use the shortcode in the widget.', 'custom-field-template'); ?></label>:<br />
|
1037 |
+
<input type="checkbox" name="custom_field_template_widget_shortcode" id="custom_field_template_widget_shortcode" value="1" <?php if ( !empty($options['custom_field_template_widget_shortcode']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Use the shortcode in the widget', 'custom-field-template'); ?></p>
|
1038 |
</td>
|
1039 |
</tr>
|
1040 |
<tr><td>
|
1041 |
<p><label for="custom_field_template_excerpt_shortcode"><?php _e('In case that you would like to use the shortcode in the excerpt.', 'custom-field-template'); ?></label>:<br />
|
1042 |
+
<input type="checkbox" name="custom_field_template_excerpt_shortcode" id="custom_field_template_excerpt_shortcode" value="1" <?php if ( !empty($options['custom_field_template_excerpt_shortcode']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Use the shortcode in the excerpt', 'custom-field-template'); ?></p>
|
1043 |
+
</td>
|
1044 |
+
</tr>
|
1045 |
+
<tr><td>
|
1046 |
+
<p><label for="custom_field_template_use_validation"><?php _e('In case that you would like to use the jQuery validation.', 'custom-field-template'); ?></label>:<br />
|
1047 |
+
<input type="checkbox" name="custom_field_template_use_validation" id="custom_field_template_use_validation" value="1" <?php if ( !empty($options['custom_field_template_use_validation']) ) { echo 'checked="checked"'; } ?> /> <?php _e('Use the jQuery validation', 'custom-field-template'); ?></p>
|
1048 |
</td>
|
1049 |
</tr>
|
1050 |
<tr><td>
|
1055 |
if ( !isset($options['custom_field_template_after_value']) ) $options['custom_field_template_after_value'] = '</li>';
|
1056 |
?>
|
1057 |
<p><label for="custom_field_template_before_list"><?php _e('Text to place before every list which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1058 |
+
<input type="text" name="custom_field_template_before_list" id="custom_field_template_before_list" value="<?php echo esc_attr(stripcslashes($options['custom_field_template_before_list'])); ?>" /></p>
|
1059 |
<p><label for="custom_field_template_after_list"><?php _e('Text to place after every list which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1060 |
+
<input type="text" name="custom_field_template_after_list" id="custom_field_template_after_list" value="<?php echo esc_attr(stripcslashes($options['custom_field_template_after_list'])); ?>" /></p>
|
1061 |
<p><label for="custom_field_template_before_value"><?php _e('Text to place before every value which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1062 |
+
<input type="text" name="custom_field_template_before_value" id="custom_field_template_before_value" value="<?php echo esc_attr(stripcslashes($options['custom_field_template_before_value'])); ?>" /></p>
|
1063 |
<p><label for="custom_field_template_after_value"><?php _e('Text to place after every value which is called by the cft shortcode', 'custom-field-template'); ?></label>:<br />
|
1064 |
+
<input type="text" name="custom_field_template_after_value" id="custom_field_template_after_value" value="<?php echo esc_attr(stripcslashes($options['custom_field_template_after_value'])); ?>" /></p>
|
1065 |
</td>
|
1066 |
</tr>
|
1067 |
<tr><td>
|
1081 |
<table class="form-table" style="margin-bottom:5px;">
|
1082 |
<tbody>
|
1083 |
<tr><td>
|
1084 |
+
<p><textarea name="custom_field_template_css" class="large-text resizable" id="custom_field_template_css" rows="10" cols="80"><?php if ( isset($options['css']) ) echo stripcslashes($options['css']); ?></textarea></p>
|
1085 |
</td></tr>
|
1086 |
<tr><td>
|
1087 |
<p><input type="submit" name="custom_field_template_css_submit" value="<?php _e('Update Options »', 'custom-field-template'); ?>" class="button-primary" /></p>
|
1102 |
<table class="form-table" style="margin-bottom:5px;">
|
1103 |
<tbody>
|
1104 |
<?php
|
1105 |
+
if ( isset($options['shortcode_format']) ) $count = count($options['shortcode_format']);
|
1106 |
+
else $count = 0;
|
1107 |
+
for ($i=0;$i<$count+1;$i++) :
|
1108 |
?>
|
1109 |
<tr><th><strong>FORMAT #<?php echo $i; ?></strong></th></tr>
|
1110 |
<tr><td>
|
1111 |
+
<p><textarea name="custom_field_template_shortcode_format[<?php echo $i; ?>]" class="large-text resizable" rows="10" cols="80"><?php if ( isset($options['shortcode_format'][$i]) ) echo stripcslashes($options['shortcode_format'][$i]); ?></textarea></p>
|
1112 |
+
<p><label><input type="checkbox" name="custom_field_template_shortcode_format_use_php[<?php echo $i; ?>]" value="1" <?php if ( !empty($options['shortcode_format_use_php'][$i]) ) { echo ' checked="checked"'; } ?> /> <?php _e('Use PHP', 'custom-field-template'); ?></label></p>
|
1113 |
</td></tr>
|
1114 |
<?php
|
1115 |
endfor;
|
1136 |
<table class="form-table" style="margin-bottom:5px;">
|
1137 |
<tbody>
|
1138 |
<?php
|
1139 |
+
if ( isset($options['php']) ) $count = count($options['php']);
|
1140 |
+
else $count = 0;
|
1141 |
+
for ($i=0;$i<$count+1;$i++) :
|
1142 |
?>
|
1143 |
<tr><th><strong>CODE #<?php echo $i; ?></strong></th></tr>
|
1144 |
<tr><td>
|
1145 |
+
<p><textarea name="custom_field_template_php[]" class="large-text resizable" rows="10" cols="80"><?php if ( isset($options['php'][$i]) ) echo stripcslashes($options['php'][$i]); ?></textarea></p>
|
1146 |
</td></tr>
|
1147 |
<?php
|
1148 |
endfor;
|
1164 |
<table class="form-table" style="margin-bottom:5px;">
|
1165 |
<tbody>
|
1166 |
<?php
|
1167 |
+
if ( isset($options['hook']) ) $count = count($options['hook']);
|
1168 |
+
else $count = 0;
|
1169 |
+
for ($i=0;$i<$count+1;$i++) :
|
1170 |
?>
|
1171 |
<tr><th><strong>HOOK #<?php echo $i; ?></strong></th></tr>
|
1172 |
<tr><td>
|
1173 |
<p><label for="custom_field_template_hook_position[<?php echo $i; ?>]"><?php echo sprintf(__('Position', 'custom-field-template'), $i); ?></label>:<br />
|
1174 |
+
<input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="1" <?php if( isset($options['hook'][$i]['position']) && $options['hook'][$i]['position']==1 ) echo ' checked="checked"'; ?> /> <?php _e('Before the content', 'custom-field-template'); ?>
|
1175 |
+
<input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="0" <?php if( isset($options['hook'][$i]['position']) && $options['hook'][$i]['position']==0) echo ' checked="checked"'; ?> /> <?php _e('After the content', 'custom-field-template'); ?>
|
1176 |
+
<input type="radio" name="custom_field_template_hook_position[<?php echo $i; ?>]" value="2" <?php if( isset($options['hook'][$i]['position']) && $options['hook'][$i]['position']==2) echo ' checked="checked"'; ?> /> <?php echo sprintf(__('Inside the content ([cfthook hook=%d])', 'custom-field-template'), $i); ?>
|
1177 |
</p>
|
1178 |
<p><label for="custom_field_template_hook_post_type[<?php echo $i; ?>]"><?php echo sprintf(__('Post Type', 'custom-field-template'), $i); ?></label>:<br />
|
1179 |
+
<input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value=""<?php if ( !isset($options['hook'][$i]['post_type']) ) : echo ' checked="checked"'; endif; ?> /> <?php _e('Both', 'custom-field-template'); ?>
|
1180 |
+
<input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value="post"<?php if ( isset($options['hook'][$i]['post_type']) && $options['hook'][$i]['post_type']=='post') : echo ' checked="checked"'; endif; ?> /> <?php _e('Post', 'custom-field-template'); ?>
|
1181 |
+
<input type="radio" name="custom_field_template_hook_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_post_type[<?php echo $i; ?>]" value="page"<?php if ( isset($options['hook'][$i]['post_type']) && $options['hook'][$i]['post_type']=='page') : echo ' checked="checked"'; endif; ?> /> <?php _e('Page', 'custom-field-template'); ?></p>
|
1182 |
<p><label for="custom_field_template_hook_custom_post_type[<?php echo $i; ?>]"><?php echo sprintf(__('Custom Post Type (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
|
1183 |
+
<input type="text" name="custom_field_template_hook_custom_post_type[<?php echo $i; ?>]" id="custom_field_template_hook_custom_post_type[<?php echo $i; ?>]" value="<?php if ( isset($options['hook'][$i]['custom_post_type']) ) echo esc_attr(stripcslashes($options['hook'][$i]['custom_post_type'])); ?>" size="80" /></p>
|
1184 |
<p><label for="custom_field_template_hook_category[<?php echo $i; ?>]"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></label>:<br />
|
1185 |
+
<input type="text" name="custom_field_template_hook_category[<?php echo $i; ?>]" id="custom_field_template_hook_category[<?php echo $i; ?>]" value="<?php if ( isset($options['hook'][$i]['category']) ) echo esc_attr(stripcslashes($options['hook'][$i]['category'])); ?>" size="80" /></p>
|
1186 |
+
<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; ?>]" class="large-text resizable" rows="5" cols="80"><?php if ( isset($options['hook'][$i]['content']) ) echo stripcslashes($options['hook'][$i]['content']); ?></textarea></p>
|
1187 |
+
<p><input type="checkbox" name="custom_field_template_hook_use_php[<?php echo $i; ?>]" id="custom_field_template_hook_use_php[<?php echo $i; ?>]" value="1" <?php if ( !empty($options['hook'][$i]['use_php']) ) { echo ' checked="checked"'; } ?> /> <?php _e('Use PHP', 'custom-field-template'); ?></p>
|
1188 |
+
<p><input type="checkbox" name="custom_field_template_hook_feed[<?php echo $i; ?>]" id="custom_field_template_hook_feed[<?php echo $i; ?>]" value="1" <?php if ( !empty($options['hook'][$i]['feed']) ) { echo ' checked="checked"'; } ?> /> <?php _e('Apply to feeds', 'custom-field-template'); ?></p>
|
1189 |
</td></tr>
|
1190 |
<?php
|
1191 |
endfor;
|
1365 |
<th>shortCode</th><td>shortCode = true</td><td>shortCode = true</td><td>shortCode = true</td><td>shortCode = true</td><td>shortCode = true</td><td></td>
|
1366 |
</tr>
|
1367 |
<tr>
|
1368 |
+
<th>multiple</th><td>multiple = true</td><td></td><td>multiple = true</td><td>multiple = true</td><td>multiple = true</td><td>multiple = true</td>
|
1369 |
</tr>
|
1370 |
<tr>
|
1371 |
+
<th>startNum</th><td>startNum = 5</td><td></td><td>startNum = 5</td><td>startNum = 5</td><td>startNum = 5</td><td>startNum = 5</td>
|
1372 |
</tr>
|
1373 |
<tr>
|
1374 |
+
<th>endNum</th><td>endNum = 10</td><td></td><td>endNum = 10</td><td>endNum = 10</td><td>endNum = 10</td><td>endNum = 10</td>
|
1375 |
</tr>
|
1376 |
<tr>
|
1377 |
<th>multipleButton</th><td>multipleButton = true</td><td></td><td>multipleButton = true</td><td>multipleButton = true</td><td></td><td>multipleButton = true</td>
|
1519 |
|
1520 |
function get_custom_fields( $id ) {
|
1521 |
$options = $this->get_custom_field_template_data();
|
1522 |
+
|
1523 |
+
if ( empty($options['custom_fields'][$id]) )
|
1524 |
return null;
|
1525 |
|
1526 |
$custom_fields = $this->parse_ini_str( $options['custom_fields'][$id]['content'], true );
|
1527 |
return $custom_fields;
|
1528 |
}
|
1529 |
|
1530 |
+
function make_textfield( $name, $sid, $data ) {
|
1531 |
+
$cftnum = $size = $default = $hideKey = $label = $code = $class = $style = $before = $after = $maxlength = $multipleButton = $date = $dateFirstDayOfWeek = $dateFormat = $startDate = $endDate = $readOnly = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
|
1532 |
+
$hide = $addfield = $out = '';
|
1533 |
+
extract($data);
|
1534 |
$options = $this->get_custom_field_template_data();
|
1535 |
|
1536 |
$title = $name;
|
1537 |
$name = $this->sanitize_name( $name );
|
1538 |
|
1539 |
+
if ( isset($code) && is_numeric($code) ) :
|
1540 |
eval(stripcslashes($options['php'][$code]));
|
1541 |
endif;
|
1542 |
|
1543 |
+
if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
|
1544 |
+
|
1545 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1546 |
$value = $this->get_post_meta( $_REQUEST[ 'post' ], $title, false );
|
1547 |
+
if ( !empty($value) && is_array($value) ) {
|
1548 |
$ct_value = count($value);
|
1549 |
+
$value = isset($value[ $cftnum ]) ? $value[ $cftnum ] : '';
|
1550 |
}
|
1551 |
} else {
|
1552 |
$value = stripslashes($default);
|
1553 |
}
|
1554 |
+
if ( empty($ct_value) ) :
|
1555 |
+
$ct_value = !empty($startNum) ? $startNum-1 : 1;
|
1556 |
+
endif;
|
1557 |
|
1558 |
+
if ( isset($enforced_value) ) :
|
1559 |
$value = $enforced_value;
|
1560 |
endif;
|
1561 |
|
1562 |
+
if ( isset($hideKey) && $hideKey == true ) $hide = ' class="hideKey"';
|
1563 |
if ( !empty($class) && $date == true ) $class = ' class="' . $class . ' datePicker"';
|
1564 |
+
elseif ( empty($class) && isset($date) && $date == true ) $class = ' class="datePicker"';
|
1565 |
elseif ( !empty($class) ) $class = ' class="' . $class . '"';
|
1566 |
if ( !empty($style) ) $style = ' style="' . $style . '"';
|
1567 |
if ( !empty($maxlength) ) $maxlength = ' maxlength="' . $maxlength . '"';
|
1568 |
if ( !empty($readOnly) ) $readOnly = ' readonly="readonly"';
|
1569 |
|
1570 |
+
if ( !empty($label) && !empty($options['custom_field_template_replace_keys_by_labels']) )
|
1571 |
$title = stripcslashes($label);
|
1572 |
|
1573 |
$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);
|
1577 |
$event_output .= " " . $key . '="' . stripcslashes(trim($val)) . '"';
|
1578 |
endforeach;
|
1579 |
|
1580 |
+
if ( isset($multipleButton) && $multipleButton == true && $date != true && $ct_value == $cftnum ) :
|
1581 |
$addfield .= '<div style="margin-top:-1em;">';
|
1582 |
$addfield .= '<a href="#clear" onclick="jQuery(this).parent().parent().parent().clone().insertAfter(jQuery(this).parent().parent().parent()).find('."'input'".').val('."''".');jQuery(this).parent().css('."'visibility','hidden'".');jQuery(this).parent().prev().css('."'visibility','hidden'".'); return false;">' . __('Add New', 'custom-field-template') . '</a>';
|
1583 |
$addfield .= '</div>';
|
1588 |
'<dt><span' . $hide . '><label for="' . $name . $sid . '_' . $cftnum . '">' . $title . '</label></span>'.$addfield.'</dt>' .
|
1589 |
'<dd>';
|
1590 |
|
1591 |
+
if ( !empty($label) && empty($options['custom_field_template_replace_keys_by_labels']) )
|
1592 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1593 |
+
$out .= trim($before).'<input id="' . $name . $sid . '_' . $cftnum . '" name="' . $name . '['. $sid . '][]" value="' . esc_attr(trim($value)) . '" type="text" size="' . $size . '"' . $class . $style . $maxlength . $event_output . $readOnly . ' />'.trim($after);
|
1594 |
|
1595 |
if ( $date == true ) :
|
1596 |
$out .= '<script type="text/javascript">' . "\n" .
|
1611 |
return $out;
|
1612 |
}
|
1613 |
|
1614 |
+
function make_checkbox( $name, $sid, $data ) {
|
1615 |
+
$cftnum = $value = $valueLabel = $checked = $hideKey = $label = $code = $class = $style = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
|
1616 |
+
$hide = $addfield = $out = '';
|
1617 |
+
extract($data);
|
1618 |
$options = $this->get_custom_field_template_data();
|
1619 |
|
1620 |
$title = $name;
|
1622 |
|
1623 |
if ( !$value ) $value = "true";
|
1624 |
|
1625 |
+
if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
|
1626 |
+
|
1627 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1628 |
$selected = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1629 |
if ( $selected ) {
|
1656 |
|
1657 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] && $cftnum == 0 )
|
1658 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1659 |
+
$out .= '<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' . esc_attr(stripcslashes(trim($value))) . '"' . $checked . ' type="checkbox"' . $class . $style . $event_output . ' /> ';
|
1660 |
if ( $valueLabel )
|
1661 |
$out .= stripcslashes(trim($valueLabel));
|
1662 |
else
|
1668 |
return $out;
|
1669 |
}
|
1670 |
|
1671 |
+
function make_radio( $name, $sid, $data ) {
|
1672 |
+
$cftnum = $values = $valueLabels = $clearButton = $default = $hideKey = $label = $code = $class = $style = $multipleButton = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
|
1673 |
+
$hide = $addfield = $out = '';
|
1674 |
+
extract($data);
|
1675 |
$options = $this->get_custom_field_template_data();
|
1676 |
|
1677 |
$title = $name;
|
1678 |
$name = $this->sanitize_name( $name );
|
1679 |
|
1680 |
+
if ( isset($code) && is_numeric($code) ) :
|
1681 |
eval(stripcslashes($options['php'][$code]));
|
1682 |
endif;
|
1683 |
|
1684 |
+
if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
|
1685 |
+
|
1686 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1687 |
$selected = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1688 |
$ct_value = count($selected);
|
1689 |
+
$selected = isset($selected[ $cftnum ]) ? $selected[ $cftnum ] : '';
|
1690 |
} else {
|
1691 |
$selected = stripslashes($default);
|
1692 |
}
|
1693 |
+
if ( empty($ct_value) ) :
|
1694 |
+
$ct_value = !empty($startNum) ? $startNum-1 : 1;
|
1695 |
+
endif;
|
1696 |
|
1697 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1698 |
if ( !empty($class) ) $class = ' class="' . $class . '"';
|
1738 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'checked="checked"' : '';
|
1739 |
|
1740 |
$out .=
|
1741 |
+
'<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' . esc_attr(trim(stripcslashes($val))) . '" ' . $checked . ' type="radio"' . $class . $style . $event_output . ' /> ';
|
1742 |
+
if ( isset($valueLabels[$i]) )
|
1743 |
+
$out .= stripcslashes(trim($valueLabels[$i]));
|
1744 |
else
|
1745 |
$out .= stripcslashes(trim($val));
|
1746 |
$out .= '</label><br />';
|
1752 |
return $out;
|
1753 |
}
|
1754 |
|
1755 |
+
function make_select( $name, $sid, $data ) {
|
1756 |
+
$cftnum = $values = $valueLabels = $default = $hideKey = $label = $code = $class = $style = $before = $after = $selectLabel = $multipleButton = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
|
1757 |
+
$hide = $addfield = $out = '';
|
1758 |
+
extract($data);
|
1759 |
$options = $this->get_custom_field_template_data();
|
1760 |
|
1761 |
$title = $name;
|
1762 |
$name = $this->sanitize_name( $name );
|
1763 |
|
1764 |
+
if ( isset($code) && is_numeric($code) ) :
|
1765 |
eval(stripcslashes($options['php'][$code]));
|
1766 |
endif;
|
1767 |
|
1768 |
+
if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
|
1769 |
+
|
1770 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1771 |
$selected = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1772 |
$ct_value = count($selected);
|
1773 |
+
$selected = isset($selected[ $cftnum ]) ? $selected[ $cftnum ] : '';
|
|
|
|
|
1774 |
} else {
|
1775 |
$selected = stripslashes($default);
|
1776 |
}
|
1777 |
+
if ( empty($ct_value) ) :
|
1778 |
+
$ct_value = !empty($startNum) ? $startNum-1 : 1;
|
1779 |
+
endif;
|
1780 |
|
1781 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1782 |
if ( !empty($class) ) $class = ' class="' . $class . '"';
|
1817 |
foreach( $values as $val ) {
|
1818 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'selected="selected"' : '';
|
1819 |
|
1820 |
+
$out .= '<option value="' . esc_attr(stripcslashes(trim($val))) . '" ' . $checked . '>';
|
1821 |
+
if ( isset($valueLabels[$i]) )
|
1822 |
+
$out .= stripcslashes(trim($valueLabels[$i]));
|
1823 |
else
|
1824 |
$out .= stripcslashes(trim($val));
|
1825 |
$out .= '</option>';
|
1831 |
return $out;
|
1832 |
}
|
1833 |
|
1834 |
+
function make_textarea( $name, $sid, $data ) {
|
1835 |
+
$cftnum = $rows = $cols = $tinyMCE = $htmlEditor = $mediaButton = $default = $hideKey = $label = $code = $class = $style = $mediaOffMedia = $mediaOffImage = $mediaOffVideo = $mediaOffAudio = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
|
1836 |
+
$hide = $addfield = $out = $media = $editorcontainer_class = '';
|
1837 |
+
extract($data);
|
1838 |
$options = $this->get_custom_field_template_data();
|
1839 |
|
1840 |
global $wp_version;
|
1846 |
eval(stripcslashes($options['php'][$code]));
|
1847 |
endif;
|
1848 |
|
1849 |
+
if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
|
1850 |
+
|
1851 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1852 |
$value = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1853 |
+
if ( !empty($value) && is_array($value) ) {
|
1854 |
+
$ct_value = count($value);
|
1855 |
+
$value = isset($value[ $cftnum ]) ? $value[ $cftnum ] : '';
|
1856 |
+
}
|
1857 |
} else {
|
1858 |
$value = stripslashes($default);
|
1859 |
}
|
1860 |
+
|
1861 |
+
if ( empty($ct_value) ) :
|
1862 |
+
$ct_value = !empty($startNum) ? $startNum-1 : 1;
|
1863 |
+
endif;
|
1864 |
|
1865 |
$rand = rand();
|
1866 |
|
1868 |
$out = '<script type="text/javascript">' . "\n" .
|
1869 |
'// <![CDATA[' . "\n" .
|
1870 |
'jQuery(document).ready(function() {if ( typeof tinyMCE != "undefined" ) {' . "\n";
|
1871 |
+
if ( !empty($options['custom_field_template_use_wpautop']) ) :
|
1872 |
$out .= 'document.getElementById("'. $name . $rand . '").value = document.getElementById("'. $name . $rand . '").value; tinyMCE.execCommand("mceAddControl", false, "'. $name . $rand . '"); tinyMCEID.push("'. $name . $rand . '");' . "\n";
|
1873 |
else:
|
1874 |
$out .= 'document.getElementById("'. $name . $rand . '").value = switchEditors.wpautop(document.getElementById("'. $name . $rand . '").value); tinyMCE.execCommand("mceAddControl", false, "'. $name . $rand . '"); tinyMCEID.push("'. $name . $rand . '");' . "\n";
|
1930 |
if ( $val )
|
1931 |
$event_output .= " " . $key . '="' . stripcslashes(trim($val)) . '"';
|
1932 |
endforeach;
|
1933 |
+
|
1934 |
+
if ( $multipleButton == true && $ct_value == $cftnum ) :
|
1935 |
+
$addfield .= '<div style="margin-top:-1em;">';
|
1936 |
+
$addfield .= '<a href="#clear" onclick="var original_id, new_id; jQuery(this).parent().parent().parent().find('."'textarea'".').each(function(){original_id = jQuery(this).attr('."'id'".');tinyMCE.execCommand(' . "'mceRemoveControl'" . ',false,jQuery(this).attr('."'id'".'));});var clone = jQuery(this).parent().parent().parent().clone().insertAfter(jQuery(this).parent().parent().parent());
|
1937 |
+
clone.find('."'textarea'".').val('."''".');if(original_id.match(/([0-9]+)$/)) {var matchval = RegExp.$1;re = new RegExp(matchval, '."'ig'".');clone.html(clone.html().replace(re, parseInt(matchval)+1));
|
1938 |
+
new_id = original_id.replace(/([0-9]+)$/, parseInt(matchval)+1);}if ( tinyMCE.get(jQuery(this).attr('."original_id".')) ) {tinyMCE.execCommand(' . "'mceAddControl'" . ',false, original_id);tinyMCE.execCommand(' . "'mceAddControl'" . ',false, new_id);}jQuery(this).parent().css('."'visibility','hidden'".');jQuery(this).parent().prev().css('."'visibility','hidden'".'); return false;">' . __('Add New', 'custom-field-template') . '</a>';
|
1939 |
+
$addfield .= '</div>';
|
1940 |
+
endif;
|
1941 |
|
1942 |
$out .=
|
1943 |
'<dl id="dl_' . $name . $sid . '_' . $cftnum . '" class="dl_textarea">' .
|
1944 |
+
'<dt><span' . $hide . '><label for="' . $name . $sid . '_' . $cftnum . '">' . $title . '</label></span><br />' . $addfield . $media . $switch . '</dt>' .
|
1945 |
'<dd>';
|
1946 |
|
1947 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
|
1951 |
if( $tinyMCE == true ) $quicktags_hide = ' jQuery(\'#qt_' . sha1($name . $rand) . '_qtags\').hide();';
|
1952 |
$out .= '<div class="quicktags"><script type="text/javascript">' . "\n" . '// <![CDATA[' . "\n" . '
|
1953 |
jQuery(document).ready(function() { qt_' . sha1($name . $rand) . ' = new QTags(\'qt_' . sha1($name . $rand) . '\', \'' . $name . $rand . '\', \'editorcontainer_' . $name . $rand . '\', \'more\'); ' . $quicktags_hide . ' });' . "\n" . '// ]]>' . "\n" . '</script>';
|
1954 |
+
$editorcontainer_class = ' class="editorcontainer"';
|
1955 |
endif;
|
1956 |
|
1957 |
+
$out .= '<div' . $editorcontainer_class . ' id="editorcontainer_' . $name . $rand . '"><textarea id="' . $name . $rand . '" name="' . $name . '[' . $sid . '][]" rows="' .$rows. '" cols="' . $cols . '"' . $content_class . $style . $event_output . '>' . esc_attr(trim($value)) . '</textarea><input type="hidden" name="'.$name.'_rand['.$sid.']" value="'.$rand.'" /></div>';
|
1958 |
if ( $htmlEditor == true ) $out .= '</div>';
|
1959 |
$out .= '</dd></dl>'."\n";
|
1960 |
|
1961 |
return $out;
|
1962 |
}
|
1963 |
|
1964 |
+
function make_file( $name, $sid, $data ) {
|
1965 |
+
$cftnum = $size = $hideKey = $label = $class = $style = $before = $after = $multipleButton = $relation = $mediaLibrary = $mediaPicker = '';
|
1966 |
+
$hide = $addfield = $out = $picker = '';
|
1967 |
+
extract($data);
|
1968 |
$options = $this->get_custom_field_template_data();
|
1969 |
|
1970 |
$title = $name;
|
1971 |
$name = $this->sanitize_name( $name );
|
1972 |
|
1973 |
+
if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
|
1974 |
+
|
1975 |
if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 && $_REQUEST['default'] != true ) {
|
1976 |
$value = $this->get_post_meta( $_REQUEST[ 'post' ], $title );
|
1977 |
$ct_value = count($value);
|
1978 |
+
$value = isset($value[ $cftnum ]) ? $value[ $cftnum ] : '';
|
|
|
|
|
|
|
|
|
1979 |
}
|
1980 |
+
|
1981 |
+
if ( empty($ct_value) ) :
|
1982 |
+
$ct_value = !empty($startNum) ? $startNum-1 : 1;
|
1983 |
+
endif;
|
1984 |
|
1985 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1986 |
if ( !empty($class) ) $class = ' class="' . $class . '"';
|
2014 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
2015 |
$out .= trim($before).'<input id="' . $name . $sid . '_' . $cftnum . '" name="' . $name . '['.$sid.'][]" type="file" size="' . $size . '"' . $class . $style . ' onchange="if (jQuery(this).val()) { jQuery(\'#cft_save_button\').attr(\'disabled\', true); jQuery(\'#post-preview\').hide(); } else { jQuery(\'#cft_save_button\').attr(\'disabled\', false); jQuery(\'#post-preview\').show(); }" />'.trim($after).$picker;
|
2016 |
|
2017 |
+
if ( isset($value) && ( $value = intval($value) ) && $thumb_url = wp_get_attachment_image_src( $value ) ) :
|
2018 |
$thumb_url = $thumb_url[0];
|
2019 |
|
2020 |
$post = get_post($value);
|
2021 |
$filename = basename($post->guid);
|
2022 |
+
$title = esc_attr(trim($post->post_title));
|
2023 |
|
2024 |
if ( !empty($mediaLibrary) ) :
|
2025 |
$title = '<a href="'.$image_upload_iframe_src.'&post_id='.$_REQUEST[ 'post' ].'&TB_iframe=1&tab='.$tab.'" class="thickbox">'.$title.'</a>';
|
2041 |
global $userdata, $post, $wp_version;
|
2042 |
get_currentuserinfo();
|
2043 |
$level = $userdata->user_level;
|
2044 |
+
|
2045 |
$options = $this->get_custom_field_template_data();
|
2046 |
|
2047 |
+
if ( isset($_REQUEST['post']) ) $post = get_post($_REQUEST['post']);
|
2048 |
|
2049 |
+
if ( count($options['custom_fields']) > 0 && !isset($_REQUEST['id']) && isset($_REQUEST['post']) && !isset($options['posts'][$_REQUEST['post']]) ) :
|
2050 |
foreach ( $options['custom_fields'] as $key => $val ) :
|
2051 |
if ( !empty($val['template_files']) && !empty($_REQUEST['page_template']) ) :
|
2052 |
$template_files = explode(',', $val['template_files']);
|
2075 |
endforeach;
|
2076 |
endif;
|
2077 |
|
2078 |
+
if ( !empty($options['custom_fields'][$id]['disable']) )
|
2079 |
return;
|
2080 |
|
2081 |
$fields = $this->get_custom_fields( $id );
|
2083 |
if ( $fields == null )
|
2084 |
return;
|
2085 |
|
2086 |
+
if ( (isset($_REQUEST['post_type']) && $_REQUEST['post_type'] == 'page') || $post->post_type=='page' ) :
|
2087 |
$post->page_template = get_post_meta( $post->ID, '_wp_page_template', true );
|
2088 |
if ( !$post->page_template ) $post->page_template = 'default';
|
2089 |
endif;
|
2090 |
|
2091 |
+
if ( !empty($options['custom_fields'][$id]['post_type']) ) :
|
2092 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
2093 |
if ( $options['custom_fields'][$id]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
|
2094 |
return;
|
2103 |
endif;
|
2104 |
endif;
|
2105 |
|
2106 |
+
if ( !empty($options['custom_fields'][$id]['custom_post_type']) ) :
|
2107 |
$custom_post_type = explode(',', $options['custom_fields'][$id]['custom_post_type']);
|
2108 |
$custom_post_type = array_filter( $custom_post_type );
|
2109 |
$custom_post_type = array_unique(array_filter(array_map('trim', $custom_post_type)));
|
2110 |
if ( !in_array($post->post_type, $custom_post_type) )
|
2111 |
return;
|
2112 |
endif;
|
2113 |
+
|
2114 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
2115 |
+
if ( !empty($options['custom_fields'][$id]['category']) && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php')) && empty($options['custom_fields'][$id]['template_files']) ) :
|
2116 |
return;
|
2117 |
endif;
|
2118 |
if ( !empty($options['custom_fields'][$id]['template_files']) && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php')) && empty($options['custom_fields'][$id]['category']) ) :
|
2119 |
return;
|
2120 |
endif;
|
2121 |
else :
|
2122 |
+
if ( !empty($options['custom_fields'][$id]['category']) && ($_REQUEST['post_type']=='page' || $post->post_type=='page') && empty($options['custom_fields'][$id]['template_files']) ) :
|
2123 |
return;
|
2124 |
endif;
|
2125 |
if ( !empty($options['custom_fields'][$id]['template_files']) && ($_REQUEST['post_type']!='page' && $post->post_type!='page') && empty($options['custom_fields'][$id]['category']) ) :
|
2127 |
endif;
|
2128 |
endif;
|
2129 |
|
2130 |
+
if ( (!isset($_REQUEST['post']) || $_REQUEST['post']<0) && !empty($options['custom_fields'][$id]['category']) && $options['custom_fields'][$id]['category'] && $_REQUEST['cft_mode'] != 'ajaxload' )
|
2131 |
return;
|
2132 |
|
2133 |
+
if ( isset($_REQUEST['post']) && !empty($options['custom_fields'][$id]['category']) && $options['custom_fields'][$id]['category'] && !isset($options['posts'][$_REQUEST['post']]) && $options['posts'][$_REQUEST['post']] !== $id && $_REQUEST['cft_mode'] != 'ajaxload' )
|
2134 |
return;
|
2135 |
|
2136 |
+
if ( !isset($_REQUEST['id']) && !empty($options['custom_fields'][$id]['category']) && $options['custom_fields'][$id]['category'] && $_REQUEST['cft_mode'] == 'ajaxload' )
|
2137 |
return;
|
2138 |
|
2139 |
+
if ( !empty($options['custom_fields'][$id]['post']) ) :
|
2140 |
$post_ids = explode(',', $options['custom_fields'][$id]['post']);
|
2141 |
$post_ids = array_filter( $post_ids );
|
2142 |
$post_ids = array_unique(array_filter(array_map('trim', $post_ids)));
|
2144 |
return;
|
2145 |
endif;
|
2146 |
|
2147 |
+
if ( !empty($options['custom_fields'][$id]['template_files']) && (isset($post->page_template) || (isset($_REQUEST['page_template']) && $_REQUEST['page_template'])) ) :
|
2148 |
$template_files = explode(',', $options['custom_fields'][$id]['template_files']);
|
2149 |
$template_files = array_filter( $template_files );
|
2150 |
$template_files = array_unique(array_filter(array_map('trim', $template_files)));
|
2151 |
+
if ( isset($_REQUEST['page_template']) ) :
|
2152 |
if ( !in_array($_REQUEST['page_template'], $template_files) ) :
|
2153 |
return;
|
2154 |
endif;
|
2159 |
endif;
|
2160 |
endif;
|
2161 |
|
2162 |
+
$out = '';
|
2163 |
+
if ( !empty($options['custom_fields'][$id]['instruction']) ) :
|
2164 |
$instruction = $this->EvalBuffer(stripcslashes($options['custom_fields'][$id]['instruction']));
|
2165 |
$out .= '<div id="cft_instruction">' . $instruction . '</div>';
|
2166 |
endif;
|
2169 |
$out .= '<input type="hidden" name="custom-field-template-id" id="custom-field-template-id" value="' . $id . '" />';
|
2170 |
foreach( $fields as $field_key => $field_val ) :
|
2171 |
foreach( $field_val as $title => $data ) {
|
2172 |
+
$class = $style = $addfield = '';
|
2173 |
+
if ( isset($data['parentSN']) && is_numeric($data['parentSN']) ) $parentSN = $data['parentSN'];
|
2174 |
else $parentSN = $field_key;
|
2175 |
+
if ( isset($data['level']) && is_numeric($data['level']) ) :
|
2176 |
if ( $data['level'] > $level ) continue;
|
2177 |
endif;
|
2178 |
if( $data['type'] == 'break' ) {
|
2186 |
$out .= '<fieldset' . $class . $style . '>'."\n";
|
2187 |
$out .= '<input type="hidden" name="' . $this->sanitize_name( $title ) . '[]" value="1" />'."\n";
|
2188 |
|
2189 |
+
if ( isset($data['multipleButton']) && $data['multipleButton'] == true ) :
|
|
|
2190 |
$addfield .= ' <span>';
|
2191 |
+
if ( isset($_REQUEST['post']) ) $addbutton = $this->get_post_meta( $_REQUEST['post'], $title, true )-1;
|
2192 |
+
if ( !isset($addbutton) || $addbutton<=0 ) $addbutton = 0;
|
2193 |
if ( $data['cftnum']/2 == $addbutton ) :
|
2194 |
+
$addfield .= ' <a href="#clear" onclick="var textarea_ids = new Array();jQuery(this).parent().parent().parent().find('."'textarea'".').each(function(){ed = tinyMCE.get(jQuery(this).attr('."'id'".')); if(ed) {textarea_ids.push(jQuery(this).attr('."'id'".'));tinyMCE.execCommand(' . "'mceRemoveControl'" . ',false,jQuery(this).attr('."'id'".'));}});var checked_ids = new Array();jQuery(this).parent().parent().parent().find('."'input[type=radio]:checked'".').each(function(){checked_ids.push(jQuery(this).attr('."'id'".'));});var tmp = jQuery(this).parent().parent().parent().clone().insertAfter(jQuery(this).parent().parent().parent());for( var i=0;i<checked_ids.length;i++) { jQuery('."'#'+checked_ids[i]".').attr('."'checked'".', true); }
|
2195 |
+
tmp.find('."'input[type=text],input[type=hidden],input[type=file]'".').val('."''".');tmp.find('."'select'".').val('."''".');tmp.find('."'textarea'".').val('."''".');tmp.find('."'input'".').attr('."'checked',false".');tmp.find('."'p'".').remove();tmp.find('."'dl'".').each(function(){ if(jQuery(this).attr('."'id'".')){if(jQuery(this).attr('."'id'".').match(/_([0-9]+)$/)) {matchval = RegExp.$1;matchval++;jQuery(this).attr('."'id',".'jQuery(this).attr('."'id'".').replace(/_([0-9]+)$/, \'_\'+matchval)); jQuery(this).find('."'textarea'".').each(function(){if(jQuery(this).attr('."'id'".').match(/([0-9]+)$/)) {var check = false;for( var i=0;i<textarea_ids.length;i++) { if ( jQuery(this).attr('."'id'".')==textarea_ids[i] ) { check = true; } }if ( check ) { matchval2 = RegExp.$1;jQuery(this).attr('."'id',".'jQuery(this).attr('."'id'".').replace(/([0-9]+)$/, parseInt(matchval2)+1));re = new RegExp(matchval2, '."'ig'".');jQuery(this).parent().parent().parent().html(jQuery(this).parent().parent().parent().html().replace(re, parseInt(matchval2)+1)); textarea_ids.push(jQuery(this).attr('."'id'".'));}} jQuery(this).attr('."'name',".'jQuery(this).attr('."'name'".').replace(/\[([0-9]+)\]$/, \'[\'+matchval+\']\'));});jQuery(this).find('."'input'".').each(function(){jQuery(this).attr('."'id',".'jQuery(this).attr('."'id'".').replace(/_([0-9]+)_/, \'_\'+matchval+\'_\'));jQuery(this).attr('."'id',".'jQuery(this).attr('."'id'".').replace(/_([0-9]+)$/, \'_\'+matchval));jQuery(this).attr('."'name',".'jQuery(this).attr('."'name'".').replace(/\[([0-9]+)\]$/, \'[\'+matchval+\']\'));});jQuery(this).find('."'label'".').each(function(){jQuery(this).attr('."'for',".'jQuery(this).attr('."'for'".').replace(/_([0-9]+)_/, \'_\'+matchval+\'_\'));jQuery(this).attr('."'for',".'jQuery(this).attr('."'for'".').replace(/_([0-9]+)$/, \'_\'+matchval));jQuery(this).attr('."'for',".'jQuery(this).attr('."'for'".').replace(/\[([0-9]+)\]$/, \'[\'+matchval+\']\'));});}}});for( var i=0;i<textarea_ids.length;i++) { tinyMCE.execCommand(' . "'mceAddControl'" . ',false, textarea_ids[i]); }jQuery(this).parent().css('."'visibility','hidden'".');return false;">' . __('Add New', 'custom-field-template') . '</a>';
|
2196 |
else :
|
2197 |
$addfield .= ' <a href="#clear" onclick="jQuery(this).parent().parent().parent().remove();return false;">' . __('Delete', 'custom-field-template') . '</a>';
|
2198 |
endif;
|
2199 |
$addfield .= '</span>';
|
2200 |
endif;
|
2201 |
|
2202 |
+
if ( isset($data['legend']) ) $out .= '<legend>' . stripcslashes(trim($data['legend'])) . $addfield . '</legend>';
|
2203 |
}
|
2204 |
else if( $data['type'] == 'fieldset_close' ) {
|
2205 |
$out .= '</fieldset>';
|
2206 |
}
|
2207 |
else if( $data['type'] == 'textfield' || $data['type'] == 'text' ) {
|
2208 |
+
$out .= $this->make_textfield( $title, $parentSN, $data );
|
|
|
2209 |
}
|
2210 |
else if( $data['type'] == 'checkbox' ) {
|
2211 |
+
$out .= $this->make_checkbox( $title, $parentSN, $data );
|
|
|
|
|
2212 |
}
|
2213 |
else if( $data['type'] == 'radio' ) {
|
2214 |
+
$data['values'] = explode( '#', $data['value'] );
|
2215 |
+
if ( isset($data['valueLabel']) ) $data['valueLabels'] = explode( '#', $data['valueLabel'] );
|
2216 |
+
$out .= $this->make_radio( $title, $parentSN, $data );
|
|
|
2217 |
}
|
2218 |
else if( $data['type'] == 'select' ) {
|
2219 |
+
$data['values'] = explode( '#', $data['value'] );
|
2220 |
+
if ( isset($data['valueLabel']) ) $data['valueLabels'] = explode( '#', $data['valueLabel'] );
|
2221 |
+
$out .= $this->make_select( $title, $parentSN, $data );
|
|
|
2222 |
}
|
2223 |
else if( $data['type'] == 'textarea' ) {
|
2224 |
+
$out .= $this->make_textarea( $title, $parentSN, $data );
|
|
|
|
|
|
|
2225 |
}
|
2226 |
else if( $data['type'] == 'file' ) {
|
2227 |
+
$out .= $this->make_file( $title, $parentSN, $data );
|
|
|
2228 |
}
|
2229 |
}
|
2230 |
endforeach;
|
2244 |
function insert_custom_field() {
|
2245 |
global $wp_version, $post;
|
2246 |
$options = $this->get_custom_field_template_data();
|
2247 |
+
$out = '';
|
2248 |
|
2249 |
if( $options == null)
|
2250 |
return;
|
2283 |
' else edInsertContent(edCanvas, h);' . "\n" .
|
2284 |
' }' . "\n";
|
2285 |
|
2286 |
+
if ( empty($options['custom_field_template_use_multiple_insert']) ) {
|
2287 |
$out .= ' tb_remove();' . "\n" .
|
2288 |
' tmpFocus = undefined;' . "\n" .
|
2289 |
' isTinyMCE = false;' . "\n";
|
2342 |
var fields = win.jQuery("#cft :input").fieldSerialize();
|
2343 |
win.jQuery.ajax({type: "POST", url: "?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post="+win.jQuery(\'#post_ID\').val()+"&custom-field-template-verify-key="+win.jQuery("#custom-field-template-verify-key").val(), data: fields, success: function() {win.jQuery.ajax({type: "GET", url: "?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id="+win.jQuery("#custom-field-template-id").val()+"&post="+win.jQuery(\'#post_ID\').val(), success: function(html) {win.jQuery("#cft").html(html);win.tb_remove();}});}});
|
2344 |
}';
|
2345 |
+
if ( isset($_REQUEST['post']) ) $request_post = $_REQUEST['post'];
|
2346 |
+
else $request_post = '';
|
2347 |
+
if( isset($options['posts'][$request_post]) && count($options['custom_fields'])>$options['posts'][$request_post] ) $init_id = $options['posts'][$request_post];
|
2348 |
else $init_id = 0;
|
2349 |
|
2350 |
$out .= 'jQuery(document).ready(function() {' . "\n";
|
2354 |
if ( is_array($fields) ) :
|
2355 |
foreach( $fields as $field_key => $field_val ) :
|
2356 |
foreach( $field_val as $title => $data ) :
|
2357 |
+
if( $data[ 'type' ] == 'textarea' && !empty($data['tinyMCE']) ) :
|
2358 |
if ( substr($wp_version, 0, 3) >= '2.7' ) :
|
2359 |
/*$out .= ' if ( getUserSetting( "editor" ) == "html" ) {
|
2360 |
jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
2370 |
|
2371 |
if ( $options['custom_fields'] ) :
|
2372 |
foreach ( $options['custom_fields'] as $key => $val ) :
|
2373 |
+
if ( !empty($val['category']) ) :
|
2374 |
$val['category'] = preg_replace('/\s/', '', $val['category']);
|
2375 |
$categories = explode(',', $val['category']);
|
2376 |
$categories = array_filter($categories);
|
2378 |
foreach($categories as $cat_id) :
|
2379 |
if ( is_numeric($cat_id) ) :
|
2380 |
$out .= 'jQuery(\'#in-category-' . $cat_id . '\').click(function(){if(jQuery(\'#in-category-' . $cat_id . '\').attr(\'checked\') == true) { if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;}; jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), function(html) { jQuery(\'#cft_selectbox\').html(html);';
|
2381 |
+
if ( !empty($options['custom_field_template_use_autosave']) ) :
|
2382 |
$out .= ' var fields = jQuery(\'#cft :input\').fieldSerialize();';
|
2383 |
$out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields, success: function(){jQuery(\'#custom_field_template_select\').val(\'' . $key . '\');jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=' . $key . '&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
|
2384 |
+
if ( !empty($options['custom_field_template_replace_the_title']) ) :
|
2385 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$key]['title'] . '\');';
|
2386 |
endif;
|
2387 |
$out .= 'jQuery(\'#cft\').html(html);}});}});';
|
2388 |
else :
|
2389 |
$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()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), success: function(html) {';
|
2390 |
+
if ( !empty($options['custom_field_template_replace_the_title']) ) :
|
2391 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$key]['title'] . '\');';
|
2392 |
endif;
|
2393 |
$out .= 'jQuery(\'#cft\').html(html);}});';
|
2395 |
$out .= ' });';
|
2396 |
|
2397 |
$out .= ' }else{ jQuery(\'#cft\').html(\'\');jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), function(html) { jQuery(\'#cft_selectbox\').html(html); jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), success: function(html) { jQuery(\'#cft\').html(html);}}); });';
|
2398 |
+
if ( !empty($options['custom_field_template_replace_the_title']) ) :
|
2399 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . __('Custom Field Template', 'custom-field-template') . '\');';
|
2400 |
endif;
|
2401 |
$out .= '}});' . "\n";
|
2406 |
endif;
|
2407 |
|
2408 |
if ( 0 != count( get_page_templates() ) ):
|
2409 |
+
if ( empty($_REQUEST['post_type']) ) $_REQUEST['post_type'] = 'post';
|
2410 |
+
$out .= 'jQuery(\'#page_template\').change(function(){ if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;}; jQuery.get(\'?post_type='.$_REQUEST['post_type'].'&page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&page_template=\'+jQuery(\'#page_template\').val(), function(html) { jQuery(\'#cft_selectbox\').html(html); jQuery.ajax({type: \'GET\', url: \'?post_type='.$_REQUEST['post_type'].'&page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&page_template=\'+jQuery(\'#page_template\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) { jQuery(\'#cft\').html(html);';
|
2411 |
+
if ( !empty($options['custom_field_template_replace_the_title']) ) :
|
2412 |
+
$out .= 'if(html) { jQuery(\'#cftdiv h3 span\').text(jQuery(\'#custom_field_template_select :selected\').text());}';
|
2413 |
+
endif;
|
2414 |
$out .= '}});});';
|
2415 |
$out .= '});' . "\n";
|
2416 |
endif;
|
2448 |
|
2449 |
$out .= '<div style="position:absolute; top:30px; right:5px;">';
|
2450 |
$out .= '<img class="waiting" style="display:none; vertical-align:middle;" src="images/loading.gif" alt="" id="cftloading_img" /> ';
|
2451 |
+
if ( !empty($options['custom_field_template_use_disable_button']) ) :
|
2452 |
$out .= '<input type="hidden" id="disable_value" value="0" />';
|
2453 |
$out .= '<input type="button" value="' . __('Disable', 'custom-field-template') . '" onclick="';
|
2454 |
$out .= 'if(jQuery(\'#disable_value\').val()==0) { jQuery(\'#disable_value\').val(1);jQuery(this).val(\''.__('Enable', 'custom-field-template').'\');jQuery(\'#cft input, #cft select, #cft textarea\').attr(\'disabled\',true);}else{ jQuery(\'#disable_value\').val(0);jQuery(this).val(\''.__('Disable', 'custom-field-template').'\');jQuery(\'#cft input, #cft select, #cft textarea\').attr(\'disabled\',false);}';
|
2455 |
$out .= '" class="button" style="vertical-align:middle;" />';
|
2456 |
endif;
|
2457 |
+
if ( empty($options['custom_field_template_disable_initialize_button']) ) :
|
2458 |
$out .= '<input type="button" value="' . __('Initialize', 'custom-field-template') . '" onclick="';
|
2459 |
$out .= 'if(confirm(\''.__('Are you sure to reset current values? Default values will be loaded.', 'custom-field-template').'\')){if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;};jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&default=true&id=\'+jQuery(\'#custom-field-template-id\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
|
2460 |
$out .= 'jQuery(\'#cft\').html(html);}});}';
|
2461 |
$out .= '" class="button" style="vertical-align:middle;" />';
|
2462 |
endif;
|
2463 |
+
if ( empty($options['custom_field_template_disable_save_button']) ) :
|
2464 |
$out .= '<input type="button" id="cft_save_button" value="' . __('Save', 'custom-field-template') . '" onclick="';
|
2465 |
+
if ( !empty($options['custom_field_template_use_validation']) ) :
|
2466 |
+
$out .= 'if(!jQuery(\'#post\').valid()) return false;';
|
2467 |
+
endif;
|
2468 |
$out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
|
2469 |
$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(), data: fields, success: function() {jQuery(\'.delete_file_checkbox:checked\').each(function() {jQuery(this).parent().parent().remove();});}});';
|
2470 |
$out .= '" class="button" style="vertical-align:middle;" />';
|
2475 |
if ( substr($wp_version, 0, 3) < '2.5' ) {
|
2476 |
$out .= '</div></fieldset></div>';
|
2477 |
} else {
|
2478 |
+
if ( $body && !empty($options['custom_field_template_replace_the_title']) ) :
|
2479 |
$out .= '<script type="text/javascript">' . "\n" . '// <![CDATA[' . "\n";
|
2480 |
$out .= 'jQuery(document).ready(function() {jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$init_id]['title'] . '\');});' . "\n";
|
2481 |
$out .= '// ]]>' . "\n" . '</script>';
|
2495 |
$options = $this->get_custom_field_template_data();
|
2496 |
$filtered_cfts = array();
|
2497 |
|
2498 |
+
$post_id = isset($_REQUEST['post']) ? $_REQUEST['post'] : '';
|
2499 |
|
2500 |
// Page Categories
|
2501 |
$categories = get_the_category($post_id);
|
2502 |
$cats = array();
|
2503 |
if ( is_array($categories) ) foreach($categories as $category) $cats[] = $category->cat_ID;
|
2504 |
+
if ( !empty($_REQUEST['post_category']) ) $cats = array_merge($cats, $_REQUEST['post_category']);
|
2505 |
|
2506 |
for ( $i=0; $i < count($options['custom_fields']); $i++ ) :
|
2507 |
// If only shows up on pages or posts if set
|
2508 |
+
if ( !empty($options['custom_fields'][$i]['post_type']) ) :
|
2509 |
if ( substr($wp_version, 0, 3) < '3.0' ) :
|
2510 |
if ( $options['custom_fields'][$i]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
|
2511 |
continue;
|
2520 |
endif;
|
2521 |
endif;
|
2522 |
|
2523 |
+
if ( !empty($options['custom_fields'][$i]['custom_post_type']) ) :
|
2524 |
$custom_post_type = explode(',', $options['custom_fields'][$i]['custom_post_type']);
|
2525 |
$custom_post_type = array_filter( $custom_post_type );
|
2526 |
$custom_post_type = array_unique(array_filter(array_map('trim', $custom_post_type)));
|
2540 |
|
2541 |
if ( (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') || strstr($_SERVER['REQUEST_URI'], 'post_type=page') || $post->post_type=='page') ) :
|
2542 |
// Check if there are page template files to filter by and there is a page template
|
2543 |
+
if ( count($template_files) && (isset($post->page_template) || isset($_REQUEST['page_template'])) ) :
|
2544 |
// If the page_template is not in the template_files filter remove this custom field
|
2545 |
+
if( !in_array($post->page_template, $template_files) && (!isset($_REQUEST['page_template']) || (isset($_REQUEST['page_template']) && !in_array($_REQUEST['page_template'], $template_files))) ) :
|
2546 |
continue;
|
2547 |
endif;
|
2548 |
elseif ( $options['custom_fields'][$i]['category'] ) :
|
2551 |
endif;
|
2552 |
|
2553 |
// If there is post_ids and this post id doesn't match them skip
|
2554 |
+
if ( count($post_ids) && (!isset($_REQUEST['post']) || (isset($_REQUEST['post']) &&!in_array($_REQUEST['post'], $post_ids))) ) :
|
2555 |
continue;
|
2556 |
endif;
|
2557 |
|
2595 |
return ' ';
|
2596 |
endif;
|
2597 |
|
2598 |
+
$out = '<select id="custom_field_template_select">';
|
2599 |
foreach ( $filtered_cfts as $filtered_cft ) :
|
2600 |
+
if ( isset($options['custom_fields'][$filtered_cft['id']]['disable']) ) :
|
2601 |
|
2602 |
+
elseif ( isset($_REQUEST['post']) && isset($options['posts'][$_REQUEST['post']]) && $filtered_cft['id'] == $options['posts'][$_REQUEST['post']] ) :
|
2603 |
$out .= '<option value="' . $filtered_cft['id'] . '" selected="selected">' . stripcslashes($filtered_cft['title']) . '</option>';
|
2604 |
else :
|
2605 |
$out .= '<option value="' . $filtered_cft['id'] . '">' . stripcslashes($filtered_cft['title']) . '</option>';
|
2609 |
|
2610 |
$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.length=0;};';
|
2611 |
$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) {';
|
2612 |
+
if ( !empty($options['custom_field_template_replace_the_title']) ) :
|
2613 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(jQuery(\'#custom_field_template_select :selected\').text());';
|
2614 |
endif;
|
2615 |
$out .= 'jQuery(\'#cft\').html(html);}});};';
|
2616 |
+
if ( !empty($options['custom_field_template_use_autosave']) ) :
|
2617 |
$out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
|
2618 |
$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});';
|
2619 |
else :
|
2628 |
global $wpdb, $wp_version;
|
2629 |
$options = $this->get_custom_field_template_data();
|
2630 |
|
2631 |
+
if( !isset( $id ) || isset($_REQUEST['post_ID']) )
|
2632 |
+
$id = $_REQUEST['post_ID'];
|
2633 |
|
2634 |
if( !current_user_can('edit_post', $id) )
|
2635 |
return $id;
|
2636 |
|
2637 |
+
if( isset($_REQUEST['custom-field-template-verify-key']) && !wp_verify_nonce($_REQUEST['custom-field-template-verify-key'], 'custom-field-template') )
|
2638 |
return $id;
|
2639 |
|
2640 |
if ( !isset($_REQUEST['custom-field-template-id']) ) :
|
2698 |
default :
|
2699 |
$value = trim($_REQUEST[$name][$field_key][$data['cftnum']]);
|
2700 |
|
2701 |
+
if ( !empty($options['custom_field_template_use_wpautop']) && $data['type'] == 'textarea' && !empty($value) )
|
2702 |
$value = wpautop($value);
|
2703 |
+
if ( isset($data['editCode']) && is_numeric($data['editCode']) ) :
|
2704 |
eval(stripcslashes($options['php'][$data['editCode']]));
|
2705 |
endif;
|
2706 |
if ( $data['type'] != 'file' ) :
|
2707 |
if( isset( $value ) && strlen( $value ) ) :
|
2708 |
+
if ( isset($data['insertTag']) && $data['insertTag'] == true ) :
|
2709 |
if ( !empty($data['tagName']) ) :
|
2710 |
$tags_input[trim($data['tagName'])][] = $value;
|
2711 |
else :
|
2712 |
$tags_input['post_tag'][] = $value;
|
2713 |
endif;
|
2714 |
endif;
|
2715 |
+
if ( isset($data['valueCount']) && $data['valueCount'] == true ) :
|
2716 |
$options['value_count'][$title][$value] = $this->set_value_count($title, $value, $id)+1;
|
2717 |
endif;
|
2718 |
|
2719 |
+
if ( isset($_REQUEST['TinyMCE_' . $name . trim($_REQUEST[ $name."_rand" ][$i]) . '_size']) ) {
|
2720 |
preg_match('/cw=[0-9]+&ch=([0-9]+)/', $_REQUEST['TinyMCE_' . $name . trim($_REQUEST[ $name."_rand" ][$i]) . '_size'], $matched);
|
2721 |
$options['tinyMCE'][$id][$name][$i] = (int)($matched[1]/20);
|
2722 |
}
|
2723 |
$save_value[$title][] = $value;
|
2724 |
+
elseif ( isset($data['blank']) && $data['blank'] == true ) :
|
2725 |
$save_value[$title][] = '';
|
2726 |
else :
|
2727 |
$tmp_value = $this->get_post_meta( $id, $title, false );
|
2734 |
endif;
|
2735 |
|
2736 |
if ( $data['type'] == 'file' ) :
|
2737 |
+
if ( isset($_REQUEST[$name.'_delete'][$field_key][$data['cftnum']]) ) :
|
2738 |
wp_delete_attachment($value);
|
2739 |
delete_post_meta($id, $title, $value);
|
2740 |
endif;
|
2744 |
wp_delete_attachment($value);
|
2745 |
endif;
|
2746 |
|
2747 |
+
if ( isset($data['relation']) && $data['relation'] == true ) :
|
2748 |
$upload_id = media_handle_upload($title, $id);
|
2749 |
else :
|
2750 |
$upload_id = media_handle_upload($title, '');
|
2795 |
endif;
|
2796 |
endforeach;
|
2797 |
|
2798 |
+
if ( !empty($tags_input) && is_array($tags_input) ) :
|
2799 |
foreach ( $tags_input as $tags_key => $tags_value ) :
|
2800 |
if ( class_exists('SimpleTags') && $tags_key == 'post_tag' ) :
|
2801 |
wp_cache_flush();
|
2865 |
}
|
2866 |
} while ($Temp = strtok("\r\n"));
|
2867 |
|
2868 |
+
$gap = $key = 0;
|
2869 |
+
$returndata = array();
|
2870 |
foreach( $Data as $Data_key => $Data_val ) :
|
2871 |
foreach( $Data_val as $title => $data) :
|
2872 |
if ( isset($cftisexist[$title]) ) $tmp_parentSN = $cftisexist[$title];
|
2873 |
else $tmp_parentSN = count($returndata);
|
2874 |
switch ( $data["type"]) :
|
2875 |
case 'checkbox' :
|
2876 |
+
if ( isset($data["code"]) && is_numeric($data["code"]) ) :
|
2877 |
eval(stripcslashes($options['php'][$data["code"]]));
|
2878 |
else :
|
2879 |
+
if ( isset($data["value"]) ) $values = explode( '#', $data["value"] );
|
2880 |
+
if ( isset($data["valueLabel"]) ) $valueLabel = explode( '#', $data["valueLabel"] );
|
2881 |
+
if ( isset($data["default"]) ) $defaults = explode( '#', $data["default"] );
|
2882 |
endif;
|
2883 |
|
2884 |
if ( is_array($defaults) )
|
2885 |
foreach($defaults as $dkey => $dval)
|
2886 |
$defaults[$dkey] = trim($dval);
|
2887 |
+
|
2888 |
$tmp = $key;
|
2889 |
$i = 0;
|
2890 |
if ( is_array($values) ) :
|
2893 |
$Data[$Data_key][$title]["value"] = trim($value);
|
2894 |
$Data[$Data_key][$title]["originalValue"] = $data["value"];
|
2895 |
$Data[$Data_key][$title]['cftnum'] = $i;
|
2896 |
+
if ( isset($valueLabel[$i]) )
|
2897 |
$Data[$Data_key][$title]["valueLabel"] = trim($valueLabel[$i]);
|
2898 |
if ( $tmp!=$key )
|
2899 |
$Data[$Data_key][$title]["hideKey"] = true;
|
2913 |
default :
|
2914 |
if ( $data['type'] == 'fieldset_open' ) :
|
2915 |
$fieldset = array();
|
2916 |
+
if ( isset($_REQUEST[$this->sanitize_name($title)]) ) $fieldsetcounter = count($_REQUEST[$this->sanitize_name($title)])-1;
|
2917 |
+
else if ( isset($_REQUEST['post']) ) $fieldsetcounter = $this->get_post_meta( $_REQUEST['post'], $title, true )-1;
|
2918 |
else $fieldsetcounter = 0;
|
2919 |
+
if ( !empty($data['multiple']) ) $fieldset_multiple = 1;
|
2920 |
endif;
|
2921 |
+
if ( isset($fieldset) && is_array($fieldset) ) :
|
2922 |
+
if ( empty($tmp_parentSN2[$title]) ) $tmp_parentSN2[$title] = $tmp_parentSN;
|
2923 |
endif;
|
2924 |
+
if ( isset($data['multiple']) && $data['multiple'] == true && $data['type'] != 'checkbox' && $data['type'] != 'fieldset_open' && !isset($fieldset) ) :
|
2925 |
+
$counter = isset($_REQUEST[$this->sanitize_name($title)][$tmp_parentSN+$gap]) ? count($_REQUEST[$this->sanitize_name($title)][$tmp_parentSN+$gap]) : 0;
|
2926 |
if ( $data['type'] == 'file' && $_FILES[$this->sanitize_name($title)] ) $counter = (int)count($_FILES[$this->sanitize_name($title)]['name'][$tmp_parentSN+$gap])+1;
|
2927 |
+
if ( isset($_REQUEST['post_ID']) ) $org_counter = count($this->get_post_meta( $_REQUEST['post_ID'], $title ));
|
2928 |
+
else if ( isset($_REQUEST['post']) ) $org_counter = count($this->get_post_meta( $_REQUEST['post'], $title ));
|
2929 |
else $org_counter = 1;
|
2930 |
if ( !$counter ) :
|
2931 |
$counter = $org_counter;
|
2934 |
if ( empty($_REQUEST[$this->sanitize_name($title)][$tmp_parentSN+$gap][$counter-1]) ) $counter--;
|
2935 |
endif;
|
2936 |
if ( !$org_counter ) $org_counter = 2;
|
2937 |
+
if ( isset($data['startNum']) && is_numeric($data['startNum']) && $data['startNum']>$counter ) $counter = $data['startNum'];
|
2938 |
+
if ( isset($data['endNum']) && is_numeric($data['endNum']) && $data['endNum']<$counter ) $counter = $data['endNum'];
|
2939 |
if ( $counter ) :
|
2940 |
for($i=0;$i<$counter; $i++) :
|
2941 |
$count_key = count($returndata);
|
2944 |
$Data[$Data_key][$title]['cftnum'] = $i;
|
2945 |
$Data[$Data_key][$title]['parentSN'] = $tmp_parentSN+$gap;
|
2946 |
$returndata[$count_key] = $Data[$Data_key];
|
2947 |
+
if ( isset($fieldset) && is_array($fieldset) ) :
|
2948 |
$fieldset[] = $Data[$Data_key];
|
2949 |
endif;
|
2950 |
endfor;
|
2956 |
if ( !isset($cftisexist[$title]) ) $Data[$Data_key][$title]['parentSN'] = $tmp_parentSN+$gap;
|
2957 |
else $Data[$Data_key][$title]['parentSN'] = $tmp_parentSN;
|
2958 |
$returndata[] = $Data[$Data_key];
|
2959 |
+
if ( isset($fieldset) && is_array($fieldset) ) :
|
2960 |
$Data[$Data_key][$title]['parentSN'] = $tmp_parentSN2[$title];
|
2961 |
$fieldset[] = $Data[$Data_key];
|
2962 |
endif;
|
2965 |
for($i=0;$i<$fieldsetcounter;$i++) :
|
2966 |
$returndata = array_merge($returndata, $fieldset);
|
2967 |
endfor;
|
2968 |
+
if ( isset($_REQUEST['post_ID']) ) $groupcounter = (int)$this->get_post_meta( $_REQUEST['post_ID'], $title, true );
|
2969 |
+
if ( !isset($groupcounter) || $groupcounter == 0 ) $groupcounter = $fieldsetcounter;
|
2970 |
+
if ( isset($_REQUEST[$this->sanitize_name($title)]) && $fieldset_multiple ) :
|
2971 |
$gap += ($groupcounter - count($_REQUEST[$this->sanitize_name($title)]))*count($fieldset);
|
2972 |
unset($fieldset_multiple);
|
2973 |
endif;
|
2979 |
endforeach;
|
2980 |
endforeach;
|
2981 |
|
2982 |
+
$cftnum = array();
|
2983 |
if ( is_array($returndata) ) :
|
2984 |
foreach( $returndata as $Data_key => $Data_val ) :
|
2985 |
foreach( $Data_val as $title => $data ) :
|
2986 |
+
if ( isset($cftnum[$title]) && is_numeric($cftnum[$title]) ) $cftnum[$title]++;
|
2987 |
else $cftnum[$title] = 0;
|
2988 |
$returndata[$Data_key][$title]['cftnum'] = $cftnum[$title];
|
2989 |
endforeach;
|
2990 |
endforeach;
|
2991 |
endif;
|
2992 |
}
|
2993 |
+
|
2994 |
return $returndata;
|
2995 |
}
|
2996 |
|
3094 |
if ( $val['outputNone'] ) $replace_val = $val['outputNone'];
|
3095 |
else $replace_val = '';
|
3096 |
endif;
|
3097 |
+
if ( isset($options['shortcode_format_use_php'][$format]) )
|
3098 |
$output = $this->EvalBuffer($output);
|
3099 |
|
3100 |
$key = preg_quote($key, '/');
|
3197 |
case 'textfield':
|
3198 |
case 'textarea':
|
3199 |
if ( $rval['class'] ) $class = ' class="' . $rval['class'] . '"';
|
3200 |
+
$replace_val[$rkey] .= '<input type="text" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' . esc_attr($_REQUEST['cftsearch'][rawurlencode($key)][$rkey][0]) . '"' . $class . ' />';
|
3201 |
break;
|
3202 |
case 'checkbox':
|
3203 |
if ( $rval['class'] ) $class = ' class="' . $rval['class'] . '"';
|
3226 |
if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][rawurlencode($key)][$rkey] )
|
3227 |
$checked = ' checked="checked"';
|
3228 |
|
3229 |
+
$replace_val[$rkey] .= '<li><label><input type="checkbox" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' . esc_attr($metavalue) . '"' . $class . $checked . ' /> ';
|
3230 |
if ( $valueLabel[$j] ) $replace_val[$rkey] .= stripcslashes($valueLabel[$j]);
|
3231 |
else $replace_val[$rkey] .= stripcslashes($metavalue);
|
3232 |
$replace_val[$rkey] .= '</label></li>';
|
3234 |
endforeach;
|
3235 |
$replace_val[$rkey] .= '</ul>';
|
3236 |
else :
|
3237 |
+
if ( $_REQUEST['cftsearch'][rawurlencode($key)][$rkey][0] == esc_attr(trim($values[0])) )
|
3238 |
$checked = ' checked="checked"';
|
3239 |
+
$replace_val[$rkey] .= '<label><input type="checkbox" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' . esc_attr(trim($values[0])) . '"' . $class . $checked . ' /> ';
|
3240 |
if ( $valueLabel[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabel[0]));
|
3241 |
else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
|
3242 |
$replace_val[$rkey] .= '</label>';
|
3264 |
endif;
|
3265 |
if ( in_array($metavalue, $default) && !$_REQUEST['cftsearch'][rawurlencode($key)][$rkey] )
|
3266 |
$checked = ' checked="checked"';
|
3267 |
+
$replace_val[$rkey] .= '<li><label><input type="radio" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' . esc_attr($metavalue) . '"' . $class . $checked . ' /> ';
|
3268 |
if ( $valueLabel[$j] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabel[$j]));
|
3269 |
else $replace_val[$rkey] .= stripcslashes($metavalue);
|
3270 |
$replace_val[$rkey] .= '</label></li>';
|
3272 |
endforeach;
|
3273 |
$replace_val[$rkey] .= '</ul>';
|
3274 |
else :
|
3275 |
+
if ( $_REQUEST['cftsearch'][rawurlencode($key)][$rkey][0] == esc_attr(trim($values[0])) )
|
3276 |
$checked = ' checked="checked"';
|
3277 |
+
$replace_val[$rkey] .= '<label><input type="radio" name="cftsearch[' . rawurlencode($key) . '][]" value="' . esc_attr(trim($values[0])) . '"' . $class . $checked . ' /> ';
|
3278 |
if ( $valueLabel[0] ) $replace_val[$rkey] .= stripcslashes(trim($valueLabel[0]));
|
3279 |
else $replace_val[$rkey] .= stripcslashes(trim($values[0]));
|
3280 |
$replace_val[$rkey] .= '</label>';
|
3300 |
|
3301 |
if ( $_REQUEST['cftsearch'][rawurlencode($key)][$rkey][0] == $metaval ) $selected = ' selected="selected"';
|
3302 |
else $selected = "";
|
3303 |
+
$replace_val[$rkey] .= '<option value="' . esc_attr($metaval) . '"' . $selected . '>';
|
3304 |
if ( $valueLabel[$j] )
|
3305 |
$replace_val[$rkey] .= stripcslashes(trim($valueLabel[$j]));
|
3306 |
else
|
3313 |
endswitch;
|
3314 |
endforeach;
|
3315 |
|
3316 |
+
if ( isset($options['shortcode_format_use_php'][$format]) )
|
3317 |
$output = $this->EvalBuffer($output);
|
3318 |
$key = preg_quote($key, '/');
|
3319 |
$output = preg_replace('/\['.$key.'\](?!\[[0-9]+\])/', $replace_val[0], $output);
|
3350 |
case 'textfield':
|
3351 |
case 'textarea':
|
3352 |
if ( $val['class'] ) $class = ' class="' . $val['class'] . '"';
|
3353 |
+
$output .= '<dd><input type="text" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' . esc_attr($_REQUEST['cftsearch'][rawurlencode($key)][0][0]) . '"' . $class . ' /></dd>';
|
3354 |
break;
|
3355 |
case 'checkbox':
|
3356 |
unset($checked);
|
3358 |
if ( is_array($_REQUEST['cftsearch'][rawurlencode($key)]) )
|
3359 |
foreach ( $_REQUEST['cftsearch'][rawurlencode($key)] as $values )
|
3360 |
if ( $val['value'] == $values[0] ) $checked = ' checked="checked"';
|
3361 |
+
$output .= '<dd><label><input type="checkbox" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' . esc_attr($val['value']) . '"' . $class . $checked . ' /> ';
|
3362 |
if ( $val['valueLabel'] )
|
3363 |
$output .= stripcslashes($val['valueLabel']);
|
3364 |
else
|
3374 |
unset($checked);
|
3375 |
$metaval = trim($metaval);
|
3376 |
if ( $_REQUEST['cftsearch'][rawurlencode($key)][0][0] == $metaval ) $checked = 'checked="checked"';
|
3377 |
+
$output .= '<dd><label>' . '<input type="radio" name="cftsearch[' . rawurlencode($key) . '][' . $rkey . '][]" value="' . esc_attr($metaval) . '"' . $class . $checked . ' /> ';
|
3378 |
if ( $val['valueLabel'] )
|
3379 |
$output .= stripcslashes(trim($valueLabel[$i]));
|
3380 |
else
|
3395 |
$metaval = trim($metaval);
|
3396 |
if ( $_REQUEST['cftsearch'][rawurlencode($key)][0][0] == $metaval ) $selected = 'selected="selected"';
|
3397 |
else $selected = "";
|
3398 |
+
$output .= '<option value="' . esc_attr($metaval) . '"' . $selected . '>';
|
3399 |
if ( $val['valueLabel'] )
|
3400 |
$output .= stripcslashes(trim($valueLabel[$i]));
|
3401 |
else
|
3702 |
}
|
3703 |
}
|
3704 |
|
3705 |
+
if ( !function_exists('esc_html') ) :
|
3706 |
+
function esc_html( $text ) {
|
3707 |
+
$safe_text = wp_specialchars( $safe_text, ENT_QUOTES );
|
3708 |
+
return apply_filters( 'esc_html', $safe_text, $text );
|
3709 |
+
}
|
3710 |
+
function esc_attr( $text ) {
|
3711 |
+
return attribute_escape($text);
|
3712 |
+
}
|
3713 |
+
function esc_url( $url, $protocols = null ) {
|
3714 |
+
return clean_url( $url, $protocols, 'display' );
|
3715 |
+
}
|
3716 |
+
endif;
|
3717 |
+
|
3718 |
$custom_field_template = new custom_field_template();
|
3719 |
?>
|
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:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -13,497 +13,506 @@ msgstr ""
|
|
13 |
"X-Poedit-Basepath: ../\n"
|
14 |
"X-Poedit-SearchPath-0: custom-field-template\n"
|
15 |
|
16 |
-
#: custom-field-template/custom-field-template.php:144
|
17 |
#: custom-field-template/custom-field-template.php:145
|
18 |
-
#: custom-field-template/custom-field-template.php:
|
19 |
-
#: custom-field-template/custom-field-template.php:
|
20 |
-
#: custom-field-template/custom-field-template.php:
|
21 |
-
#: custom-field-template/custom-field-template.php:
|
22 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
23 |
msgid "Custom Field Template"
|
24 |
msgstr ""
|
25 |
|
26 |
-
#: custom-field-template/custom-field-template.php:
|
27 |
msgid "Media Picker"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: custom-field-template/custom-field-template.php:
|
31 |
msgid "Use this"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: custom-field-template/custom-field-template.php:
|
35 |
-
#: custom-field-template/custom-field-template.php:
|
36 |
msgid "Load"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: custom-field-template/custom-field-template.php:
|
40 |
msgid "read more"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: custom-field-template/custom-field-template.php:
|
44 |
-
#: custom-field-template/custom-field-template.php:
|
45 |
msgid "Custom Fields"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: custom-field-template/custom-field-template.php:
|
49 |
msgid "Settings"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: custom-field-template/custom-field-template.php:
|
53 |
msgid "Default Template"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: custom-field-template/custom-field-template.php:
|
57 |
-
msgid "You can not use the following words as the field key: `content`, `post_title`, and `excerpt`."
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: custom-field-template/custom-field-template.php:
|
61 |
-
#: custom-field-template/custom-field-template.php:
|
62 |
-
#: custom-field-template/custom-field-template.php:
|
63 |
-
#: custom-field-template/custom-field-template.php:
|
64 |
-
#: custom-field-template/custom-field-template.php:
|
65 |
-
#: custom-field-template/custom-field-template.php:
|
66 |
msgid "Options updated."
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: custom-field-template/custom-field-template.php:
|
70 |
msgid "Value Counts rebuilt."
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: custom-field-template/custom-field-template.php:
|
74 |
msgid "Tags rebuilt."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: custom-field-template/custom-field-template.php:
|
78 |
msgid "Options imported."
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: custom-field-template/custom-field-template.php:
|
82 |
msgid "Options resetted."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: custom-field-template/custom-field-template.php:
|
86 |
msgid "Options deleted."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: custom-field-template/custom-field-template.php:
|
90 |
-
#: custom-field-template/custom-field-template.php:
|
91 |
-
#: custom-field-template/custom-field-template.php:
|
92 |
-
#: custom-field-template/custom-field-template.php:
|
93 |
-
#: custom-field-template/custom-field-template.php:
|
94 |
-
#: custom-field-template/custom-field-template.php:
|
95 |
-
#: custom-field-template/custom-field-template.php:
|
96 |
-
#: custom-field-template/custom-field-template.php:
|
97 |
-
#: custom-field-template/custom-field-template.php:
|
98 |
-
#: custom-field-template/custom-field-template.php:
|
99 |
-
#: custom-field-template/custom-field-template.php:
|
100 |
-
#: custom-field-template/custom-field-template.php:
|
101 |
-
#: custom-field-template/custom-field-template.php:
|
102 |
-
#: custom-field-template/custom-field-template.php:
|
103 |
msgid "Click to toggle"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: custom-field-template/custom-field-template.php:
|
107 |
msgid "Custom Field Template Options"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: custom-field-template/custom-field-template.php:
|
111 |
-
#: custom-field-template/custom-field-template.php:
|
112 |
-
#: custom-field-template/custom-field-template.php:
|
113 |
msgid "Disable"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: custom-field-template/custom-field-template.php:
|
117 |
msgid "Template Title"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: custom-field-template/custom-field-template.php:
|
121 |
msgid "Template Instruction"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: custom-field-template/custom-field-template.php:
|
125 |
-
#: custom-field-template/custom-field-template.php:
|
126 |
msgid "Post Type"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: custom-field-template/custom-field-template.php:
|
130 |
-
#: custom-field-template/custom-field-template.php:
|
131 |
msgid "Both"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: custom-field-template/custom-field-template.php:
|
135 |
-
#: custom-field-template/custom-field-template.php:
|
136 |
msgid "Post"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: custom-field-template/custom-field-template.php:
|
140 |
-
#: custom-field-template/custom-field-template.php:
|
141 |
msgid "Page"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: custom-field-template/custom-field-template.php:
|
145 |
-
#: custom-field-template/custom-field-template.php:
|
146 |
msgid "Custom Post Type (comma-deliminated)"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: custom-field-template/custom-field-template.php:
|
150 |
msgid "Post ID (comma-deliminated)"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: custom-field-template/custom-field-template.php:
|
154 |
-
#: custom-field-template/custom-field-template.php:
|
155 |
msgid "Category ID (comma-deliminated)"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: custom-field-template/custom-field-template.php:
|
159 |
msgid "Page Template file name(s) (comma-deliminated)"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: custom-field-template/custom-field-template.php:
|
163 |
msgid "Template Content"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: custom-field-template/custom-field-template.php:
|
167 |
-
#: custom-field-template/custom-field-template.php:
|
168 |
-
#: custom-field-template/custom-field-template.php:
|
169 |
-
#: custom-field-template/custom-field-template.php:
|
170 |
-
#: custom-field-template/custom-field-template.php:
|
171 |
-
#: custom-field-template/custom-field-template.php:
|
172 |
msgid "Update Options »"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: custom-field-template/custom-field-template.php:
|
176 |
msgid "Global Settings"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: custom-field-template/custom-field-template.php:
|
180 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: custom-field-template/custom-field-template.php:
|
184 |
msgid "Use labels in place of custom keys"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: custom-field-template/custom-field-template.php:
|
188 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: custom-field-template/custom-field-template.php:
|
192 |
msgid "Use wpautop function"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: custom-field-template/custom-field-template.php:
|
196 |
msgid "In case that you would like to save values automatically in switching templates"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: custom-field-template/custom-field-template.php:
|
200 |
msgid "Use the auto save in switching templates"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: custom-field-template/custom-field-template.php:
|
204 |
msgid "In case that you would like to disable input fields of the custom field template temporarily"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: custom-field-template/custom-field-template.php:
|
208 |
msgid "Use the `Disable` button. The default custom fields will be superseded."
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: custom-field-template/custom-field-template.php:
|
212 |
msgid "In case that you would like to forbid to use the initialize button."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: custom-field-template/custom-field-template.php:
|
216 |
msgid "Disable the initialize button"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: custom-field-template/custom-field-template.php:
|
220 |
msgid "In case that you would like to forbid to use the save button."
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: custom-field-template/custom-field-template.php:
|
224 |
msgid "Disable the save button"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: custom-field-template/custom-field-template.php:
|
228 |
msgid "In case that you would like to forbid to use the default custom fields."
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: custom-field-template/custom-field-template.php:
|
232 |
msgid "Disable the default custom fields"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: custom-field-template/custom-field-template.php:
|
236 |
msgid "In case that you would like to forbid to use the quick edit."
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: custom-field-template/custom-field-template.php:
|
240 |
msgid "Disable the quick edit"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: custom-field-template/custom-field-template.php:
|
244 |
msgid "In case that you would like to forbid to display the custom field column on the edit post list page."
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: custom-field-template/custom-field-template.php:
|
248 |
msgid "Disable the custom field column (The quick edit also does not work.)"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: custom-field-template/custom-field-template.php:
|
252 |
msgid "In case that you would like to replace the box title with the template title."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: custom-field-template/custom-field-template.php:
|
256 |
msgid "Replace the box title"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: custom-field-template/custom-field-template.php:
|
260 |
msgid "In case that you would like to use the shortcode in the widget."
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: custom-field-template/custom-field-template.php:
|
264 |
msgid "Use the shortcode in the widget"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: custom-field-template/custom-field-template.php:
|
268 |
msgid "In case that you would like to use the shortcode in the excerpt."
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: custom-field-template/custom-field-template.php:
|
272 |
msgid "Use the shortcode in the excerpt"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
msgid "Text to place before every list which is called by the cft shortcode"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: custom-field-template/custom-field-template.php:
|
280 |
msgid "Text to place after every list which is called by the cft shortcode"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: custom-field-template/custom-field-template.php:
|
284 |
msgid "Text to place before every value which is called by the cft shortcode"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: custom-field-template/custom-field-template.php:
|
288 |
msgid "Text to place after every value which is called by the cft shortcode"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: custom-field-template/custom-field-template.php:
|
292 |
msgid "ADMIN CSS"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: custom-field-template/custom-field-template.php:
|
296 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: custom-field-template/custom-field-template.php:
|
300 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: custom-field-template/custom-field-template.php:
|
304 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: custom-field-template/custom-field-template.php:
|
308 |
-
#: custom-field-template/custom-field-template.php:
|
309 |
msgid "Use PHP"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: custom-field-template/custom-field-template.php:
|
313 |
msgid "PHP CODE (Experimental Option)"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: custom-field-template/custom-field-template.php:
|
317 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: custom-field-template/custom-field-template.php:
|
321 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: custom-field-template/custom-field-template.php:
|
325 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: custom-field-template/custom-field-template.php:
|
329 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: custom-field-template/custom-field-template.php:
|
333 |
msgid "Position"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: custom-field-template/custom-field-template.php:
|
337 |
msgid "Before the content"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: custom-field-template/custom-field-template.php:
|
341 |
msgid "After the content"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: custom-field-template/custom-field-template.php:
|
345 |
#, php-format
|
346 |
msgid "Inside the content ([cfthook hook=%d])"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: custom-field-template/custom-field-template.php:
|
350 |
msgid "Content"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: custom-field-template/custom-field-template.php:
|
354 |
msgid "Apply to feeds"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: custom-field-template/custom-field-template.php:
|
358 |
msgid "Rebuild Value Counts"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: custom-field-template/custom-field-template.php:
|
362 |
msgid "Are you sure to rebuild all value counts?"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: custom-field-template/custom-field-template.php:
|
366 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: custom-field-template/custom-field-template.php:
|
370 |
msgid "Rebuild Value Counts »"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: custom-field-template/custom-field-template.php:
|
374 |
msgid "Rebuild Tags"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: custom-field-template/custom-field-template.php:
|
378 |
msgid "Are you sure to rebuild tags?"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: custom-field-template/custom-field-template.php:
|
382 |
msgid "Rebuild Tags »"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: custom-field-template/custom-field-template.php:
|
386 |
msgid "Option List"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: custom-field-template/custom-field-template.php:
|
390 |
msgid "Export Options"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: custom-field-template/custom-field-template.php:
|
394 |
msgid "Export Options »"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: custom-field-template/custom-field-template.php:
|
398 |
msgid "Import Options"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: custom-field-template/custom-field-template.php:
|
402 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: custom-field-template/custom-field-template.php:
|
406 |
msgid "Import Options »"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: custom-field-template/custom-field-template.php:
|
410 |
msgid "Reset Options"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: custom-field-template/custom-field-template.php:
|
414 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: custom-field-template/custom-field-template.php:
|
418 |
msgid "Reset Options »"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: custom-field-template/custom-field-template.php:
|
422 |
msgid "Delete Options"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: custom-field-template/custom-field-template.php:
|
426 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: custom-field-template/custom-field-template.php:
|
430 |
msgid "Delete Options »"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: custom-field-template/custom-field-template.php:
|
434 |
msgid "Donation"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: custom-field-template/custom-field-template.php:
|
438 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: custom-field-template/custom-field-template.php:
|
442 |
-
#: custom-field-template/custom-field-template.php:
|
443 |
-
#: custom-field-template/custom-field-template.php:
|
444 |
-
#: custom-field-template/custom-field-template.php:
|
445 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
446 |
msgid "Add New"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: custom-field-template/custom-field-template.php:
|
450 |
msgid "Clear"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: custom-field-template/custom-field-template.php:
|
454 |
msgid "Select"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: custom-field-template/custom-field-template.php:
|
458 |
msgid "Add an Image"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: custom-field-template/custom-field-template.php:
|
462 |
msgid "Add Video"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: custom-field-template/custom-field-template.php:
|
466 |
msgid "Add Audio"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: custom-field-template/custom-field-template.php:
|
470 |
msgid "Add Media"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: custom-field-template/custom-field-template.php:
|
474 |
msgid "Toggle"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: custom-field-template/custom-field-template.php:
|
478 |
msgid " OR "
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: custom-field-template/custom-field-template.php:
|
482 |
msgid "Select by Media Picker"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: custom-field-template/custom-field-template.php:
|
486 |
-
#: custom-field-template/custom-field-template.php:
|
487 |
msgid "Delete"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: custom-field-template/custom-field-template.php:
|
491 |
msgid "Enable"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: custom-field-template/custom-field-template.php:
|
495 |
msgid "Initialize"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: custom-field-template/custom-field-template.php:
|
499 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: custom-field-template/custom-field-template.php:
|
503 |
msgid "Save"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: custom-field-template/custom-field-template.php:
|
507 |
msgid "Search »"
|
508 |
msgstr ""
|
509 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-04-13 00:18+0900\n"
|
6 |
+
"PO-Revision-Date: 2011-04-13 00:18+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:145
|
17 |
+
#: custom-field-template/custom-field-template.php:146
|
18 |
+
#: custom-field-template/custom-field-template.php:168
|
19 |
+
#: custom-field-template/custom-field-template.php:642
|
20 |
+
#: custom-field-template/custom-field-template.php:919
|
21 |
+
#: custom-field-template/custom-field-template.php:2262
|
22 |
+
#: custom-field-template/custom-field-template.php:2399
|
23 |
msgid "Custom Field Template"
|
24 |
msgstr ""
|
25 |
|
26 |
+
#: custom-field-template/custom-field-template.php:184
|
27 |
msgid "Media Picker"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: custom-field-template/custom-field-template.php:186
|
31 |
msgid "Use this"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: custom-field-template/custom-field-template.php:288
|
35 |
+
#: custom-field-template/custom-field-template.php:2610
|
36 |
msgid "Load"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: custom-field-template/custom-field-template.php:464
|
40 |
msgid "read more"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: custom-field-template/custom-field-template.php:482
|
44 |
+
#: custom-field-template/custom-field-template.php:492
|
45 |
msgid "Custom Fields"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: custom-field-template/custom-field-template.php:524
|
49 |
msgid "Settings"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: custom-field-template/custom-field-template.php:562
|
53 |
msgid "Default Template"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: custom-field-template/custom-field-template.php:776
|
57 |
+
msgid "You can not use the following words as the field key: `content`, `post_title`, and `excerpt`, and `action`."
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: custom-field-template/custom-field-template.php:791
|
61 |
+
#: custom-field-template/custom-field-template.php:815
|
62 |
+
#: custom-field-template/custom-field-template.php:819
|
63 |
+
#: custom-field-template/custom-field-template.php:831
|
64 |
+
#: custom-field-template/custom-field-template.php:839
|
65 |
+
#: custom-field-template/custom-field-template.php:856
|
66 |
msgid "Options updated."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: custom-field-template/custom-field-template.php:860
|
70 |
msgid "Value Counts rebuilt."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: custom-field-template/custom-field-template.php:863
|
74 |
msgid "Tags rebuilt."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: custom-field-template/custom-field-template.php:872
|
78 |
msgid "Options imported."
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: custom-field-template/custom-field-template.php:879
|
82 |
msgid "Options resetted."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: custom-field-template/custom-field-template.php:883
|
86 |
msgid "Options deleted."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: custom-field-template/custom-field-template.php:925
|
90 |
+
#: custom-field-template/custom-field-template.php:971
|
91 |
+
#: custom-field-template/custom-field-template.php:1077
|
92 |
+
#: custom-field-template/custom-field-template.php:1096
|
93 |
+
#: custom-field-template/custom-field-template.php:1127
|
94 |
+
#: custom-field-template/custom-field-template.php:1160
|
95 |
+
#: custom-field-template/custom-field-template.php:1203
|
96 |
+
#: custom-field-template/custom-field-template.php:1224
|
97 |
+
#: custom-field-template/custom-field-template.php:1241
|
98 |
+
#: custom-field-template/custom-field-template.php:1412
|
99 |
+
#: custom-field-template/custom-field-template.php:1428
|
100 |
+
#: custom-field-template/custom-field-template.php:1444
|
101 |
+
#: custom-field-template/custom-field-template.php:1460
|
102 |
+
#: custom-field-template/custom-field-template.php:1476
|
103 |
msgid "Click to toggle"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: custom-field-template/custom-field-template.php:926
|
107 |
msgid "Custom Field Template Options"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: custom-field-template/custom-field-template.php:936
|
111 |
+
#: custom-field-template/custom-field-template.php:2453
|
112 |
+
#: custom-field-template/custom-field-template.php:2454
|
113 |
msgid "Disable"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: custom-field-template/custom-field-template.php:938
|
117 |
msgid "Template Title"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: custom-field-template/custom-field-template.php:940
|
121 |
msgid "Template Instruction"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: custom-field-template/custom-field-template.php:942
|
125 |
+
#: custom-field-template/custom-field-template.php:1178
|
126 |
msgid "Post Type"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: custom-field-template/custom-field-template.php:944
|
130 |
+
#: custom-field-template/custom-field-template.php:1179
|
131 |
msgid "Both"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: custom-field-template/custom-field-template.php:945
|
135 |
+
#: custom-field-template/custom-field-template.php:1180
|
136 |
msgid "Post"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: custom-field-template/custom-field-template.php:946
|
140 |
+
#: custom-field-template/custom-field-template.php:1181
|
141 |
msgid "Page"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: custom-field-template/custom-field-template.php:947
|
145 |
+
#: custom-field-template/custom-field-template.php:1182
|
146 |
msgid "Custom Post Type (comma-deliminated)"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: custom-field-template/custom-field-template.php:949
|
150 |
msgid "Post ID (comma-deliminated)"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: custom-field-template/custom-field-template.php:951
|
154 |
+
#: custom-field-template/custom-field-template.php:1184
|
155 |
msgid "Category ID (comma-deliminated)"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: custom-field-template/custom-field-template.php:953
|
159 |
msgid "Page Template file name(s) (comma-deliminated)"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: custom-field-template/custom-field-template.php:955
|
163 |
msgid "Template Content"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: custom-field-template/custom-field-template.php:962
|
167 |
+
#: custom-field-template/custom-field-template.php:1068
|
168 |
+
#: custom-field-template/custom-field-template.php:1087
|
169 |
+
#: custom-field-template/custom-field-template.php:1118
|
170 |
+
#: custom-field-template/custom-field-template.php:1151
|
171 |
+
#: custom-field-template/custom-field-template.php:1194
|
172 |
msgid "Update Options »"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: custom-field-template/custom-field-template.php:972
|
176 |
msgid "Global Settings"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: custom-field-template/custom-field-template.php:987
|
180 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: custom-field-template/custom-field-template.php:988
|
184 |
msgid "Use labels in place of custom keys"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: custom-field-template/custom-field-template.php:991
|
188 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: custom-field-template/custom-field-template.php:992
|
192 |
msgid "Use wpautop function"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: custom-field-template/custom-field-template.php:996
|
196 |
msgid "In case that you would like to save values automatically in switching templates"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: custom-field-template/custom-field-template.php:997
|
200 |
msgid "Use the auto save in switching templates"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: custom-field-template/custom-field-template.php:1001
|
204 |
msgid "In case that you would like to disable input fields of the custom field template temporarily"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: custom-field-template/custom-field-template.php:1002
|
208 |
msgid "Use the `Disable` button. The default custom fields will be superseded."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: custom-field-template/custom-field-template.php:1006
|
212 |
msgid "In case that you would like to forbid to use the initialize button."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: custom-field-template/custom-field-template.php:1007
|
216 |
msgid "Disable the initialize button"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: custom-field-template/custom-field-template.php:1011
|
220 |
msgid "In case that you would like to forbid to use the save button."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: custom-field-template/custom-field-template.php:1012
|
224 |
msgid "Disable the save button"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: custom-field-template/custom-field-template.php:1016
|
228 |
msgid "In case that you would like to forbid to use the default custom fields."
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: custom-field-template/custom-field-template.php:1017
|
232 |
msgid "Disable the default custom fields"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: custom-field-template/custom-field-template.php:1021
|
236 |
msgid "In case that you would like to forbid to use the quick edit."
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: custom-field-template/custom-field-template.php:1022
|
240 |
msgid "Disable the quick edit"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: custom-field-template/custom-field-template.php:1026
|
244 |
msgid "In case that you would like to forbid to display the custom field column on the edit post list page."
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: custom-field-template/custom-field-template.php:1027
|
248 |
msgid "Disable the custom field column (The quick edit also does not work.)"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: custom-field-template/custom-field-template.php:1031
|
252 |
msgid "In case that you would like to replace the box title with the template title."
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: custom-field-template/custom-field-template.php:1032
|
256 |
msgid "Replace the box title"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: custom-field-template/custom-field-template.php:1036
|
260 |
msgid "In case that you would like to use the shortcode in the widget."
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: custom-field-template/custom-field-template.php:1037
|
264 |
msgid "Use the shortcode in the widget"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: custom-field-template/custom-field-template.php:1041
|
268 |
msgid "In case that you would like to use the shortcode in the excerpt."
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: custom-field-template/custom-field-template.php:1042
|
272 |
msgid "Use the shortcode in the excerpt"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: custom-field-template/custom-field-template.php:1046
|
276 |
+
msgid "In case that you would like to use the jQuery validation."
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: custom-field-template/custom-field-template.php:1047
|
280 |
+
msgid "Use the jQuery validation"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: custom-field-template/custom-field-template.php:1057
|
284 |
msgid "Text to place before every list which is called by the cft shortcode"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: custom-field-template/custom-field-template.php:1059
|
288 |
msgid "Text to place after every list which is called by the cft shortcode"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: custom-field-template/custom-field-template.php:1061
|
292 |
msgid "Text to place before every value which is called by the cft shortcode"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: custom-field-template/custom-field-template.php:1063
|
296 |
msgid "Text to place after every value which is called by the cft shortcode"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: custom-field-template/custom-field-template.php:1078
|
300 |
msgid "ADMIN CSS"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: custom-field-template/custom-field-template.php:1097
|
304 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: custom-field-template/custom-field-template.php:1100
|
308 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: custom-field-template/custom-field-template.php:1101
|
312 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: custom-field-template/custom-field-template.php:1112
|
316 |
+
#: custom-field-template/custom-field-template.php:1187
|
317 |
msgid "Use PHP"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: custom-field-template/custom-field-template.php:1128
|
321 |
msgid "PHP CODE (Experimental Option)"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: custom-field-template/custom-field-template.php:1130
|
325 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: custom-field-template/custom-field-template.php:1131
|
329 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: custom-field-template/custom-field-template.php:1133
|
333 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: custom-field-template/custom-field-template.php:1161
|
337 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: custom-field-template/custom-field-template.php:1173
|
341 |
msgid "Position"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: custom-field-template/custom-field-template.php:1174
|
345 |
msgid "Before the content"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: custom-field-template/custom-field-template.php:1175
|
349 |
msgid "After the content"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: custom-field-template/custom-field-template.php:1176
|
353 |
#, php-format
|
354 |
msgid "Inside the content ([cfthook hook=%d])"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: custom-field-template/custom-field-template.php:1186
|
358 |
msgid "Content"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: custom-field-template/custom-field-template.php:1188
|
362 |
msgid "Apply to feeds"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: custom-field-template/custom-field-template.php:1204
|
366 |
msgid "Rebuild Value Counts"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: custom-field-template/custom-field-template.php:1206
|
370 |
msgid "Are you sure to rebuild all value counts?"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: custom-field-template/custom-field-template.php:1210
|
374 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: custom-field-template/custom-field-template.php:1214
|
378 |
msgid "Rebuild Value Counts »"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: custom-field-template/custom-field-template.php:1225
|
382 |
msgid "Rebuild Tags"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: custom-field-template/custom-field-template.php:1227
|
386 |
msgid "Are you sure to rebuild tags?"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: custom-field-template/custom-field-template.php:1231
|
390 |
msgid "Rebuild Tags »"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: custom-field-template/custom-field-template.php:1242
|
394 |
msgid "Option List"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: custom-field-template/custom-field-template.php:1413
|
398 |
msgid "Export Options"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: custom-field-template/custom-field-template.php:1419
|
402 |
msgid "Export Options »"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: custom-field-template/custom-field-template.php:1429
|
406 |
msgid "Import Options"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: custom-field-template/custom-field-template.php:1431
|
410 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: custom-field-template/custom-field-template.php:1435
|
414 |
msgid "Import Options »"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: custom-field-template/custom-field-template.php:1445
|
418 |
msgid "Reset Options"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: custom-field-template/custom-field-template.php:1447
|
422 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: custom-field-template/custom-field-template.php:1451
|
426 |
msgid "Reset Options »"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: custom-field-template/custom-field-template.php:1461
|
430 |
msgid "Delete Options"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: custom-field-template/custom-field-template.php:1463
|
434 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: custom-field-template/custom-field-template.php:1467
|
438 |
msgid "Delete Options »"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: custom-field-template/custom-field-template.php:1477
|
442 |
msgid "Donation"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: custom-field-template/custom-field-template.php:1479
|
446 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: custom-field-template/custom-field-template.php:1582
|
450 |
+
#: custom-field-template/custom-field-template.php:1713
|
451 |
+
#: custom-field-template/custom-field-template.php:1797
|
452 |
+
#: custom-field-template/custom-field-template.php:1938
|
453 |
+
#: custom-field-template/custom-field-template.php:1994
|
454 |
+
#: custom-field-template/custom-field-template.php:2195
|
455 |
msgid "Add New"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: custom-field-template/custom-field-template.php:1723
|
459 |
msgid "Clear"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: custom-field-template/custom-field-template.php:1813
|
463 |
msgid "Select"
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: custom-field-template/custom-field-template.php:1889
|
467 |
msgid "Add an Image"
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: custom-field-template/custom-field-template.php:1894
|
471 |
msgid "Add Video"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: custom-field-template/custom-field-template.php:1899
|
475 |
msgid "Add Audio"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: custom-field-template/custom-field-template.php:1903
|
479 |
msgid "Add Media"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: custom-field-template/custom-field-template.php:1910
|
483 |
msgid "Toggle"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: custom-field-template/custom-field-template.php:2004
|
487 |
msgid " OR "
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: custom-field-template/custom-field-template.php:2005
|
491 |
msgid "Select by Media Picker"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: custom-field-template/custom-field-template.php:2028
|
495 |
+
#: custom-field-template/custom-field-template.php:2197
|
496 |
msgid "Delete"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: custom-field-template/custom-field-template.php:2454
|
500 |
msgid "Enable"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: custom-field-template/custom-field-template.php:2458
|
504 |
msgid "Initialize"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: custom-field-template/custom-field-template.php:2459
|
508 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: custom-field-template/custom-field-template.php:2464
|
512 |
msgid "Save"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: custom-field-template/custom-field-template.php:3157
|
516 |
msgid "Search »"
|
517 |
msgstr ""
|
518 |
|
js/additional-methods.js
ADDED
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jQuery Validation Plugin 1.8.0
|
3 |
+
*
|
4 |
+
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
|
5 |
+
* http://docs.jquery.com/Plugins/Validation
|
6 |
+
*
|
7 |
+
* Copyright (c) 2006 - 2011 Jörn Zaefferer
|
8 |
+
*
|
9 |
+
* Dual licensed under the MIT and GPL licenses:
|
10 |
+
* http://www.opensource.org/licenses/mit-license.php
|
11 |
+
* http://www.gnu.org/licenses/gpl.html
|
12 |
+
*/
|
13 |
+
|
14 |
+
(function() {
|
15 |
+
|
16 |
+
function stripHtml(value) {
|
17 |
+
// remove html tags and space chars
|
18 |
+
return value.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' ')
|
19 |
+
// remove numbers and punctuation
|
20 |
+
.replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,'');
|
21 |
+
}
|
22 |
+
jQuery.validator.addMethod("maxWords", function(value, element, params) {
|
23 |
+
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params;
|
24 |
+
}, jQuery.validator.format("Please enter {0} words or less."));
|
25 |
+
|
26 |
+
jQuery.validator.addMethod("minWords", function(value, element, params) {
|
27 |
+
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
|
28 |
+
}, jQuery.validator.format("Please enter at least {0} words."));
|
29 |
+
|
30 |
+
jQuery.validator.addMethod("rangeWords", function(value, element, params) {
|
31 |
+
return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1];
|
32 |
+
}, jQuery.validator.format("Please enter between {0} and {1} words."));
|
33 |
+
|
34 |
+
})();
|
35 |
+
|
36 |
+
jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
|
37 |
+
return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value);
|
38 |
+
}, "Letters or punctuation only please");
|
39 |
+
|
40 |
+
jQuery.validator.addMethod("alphanumeric", function(value, element) {
|
41 |
+
return this.optional(element) || /^\w+$/i.test(value);
|
42 |
+
}, "Letters, numbers, spaces or underscores only please");
|
43 |
+
|
44 |
+
jQuery.validator.addMethod("lettersonly", function(value, element) {
|
45 |
+
return this.optional(element) || /^[a-z]+$/i.test(value);
|
46 |
+
}, "Letters only please");
|
47 |
+
|
48 |
+
jQuery.validator.addMethod("nowhitespace", function(value, element) {
|
49 |
+
return this.optional(element) || /^\S+$/i.test(value);
|
50 |
+
}, "No white space please");
|
51 |
+
|
52 |
+
jQuery.validator.addMethod("ziprange", function(value, element) {
|
53 |
+
return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
|
54 |
+
}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
|
55 |
+
|
56 |
+
jQuery.validator.addMethod("integer", function(value, element) {
|
57 |
+
return this.optional(element) || /^-?\d+$/.test(value);
|
58 |
+
}, "A positive or negative non-decimal number please");
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Return true, if the value is a valid vehicle identification number (VIN).
|
62 |
+
*
|
63 |
+
* Works with all kind of text inputs.
|
64 |
+
*
|
65 |
+
* @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
|
66 |
+
* @desc Declares a required input element whose value must be a valid vehicle identification number.
|
67 |
+
*
|
68 |
+
* @name jQuery.validator.methods.vinUS
|
69 |
+
* @type Boolean
|
70 |
+
* @cat Plugins/Validate/Methods
|
71 |
+
*/
|
72 |
+
jQuery.validator.addMethod(
|
73 |
+
"vinUS",
|
74 |
+
function(v){
|
75 |
+
if (v.length != 17)
|
76 |
+
return false;
|
77 |
+
var i, n, d, f, cd, cdv;
|
78 |
+
var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
|
79 |
+
var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
|
80 |
+
var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
|
81 |
+
var rs = 0;
|
82 |
+
for(i = 0; i < 17; i++){
|
83 |
+
f = FL[i];
|
84 |
+
d = v.slice(i,i+1);
|
85 |
+
if(i == 8){
|
86 |
+
cdv = d;
|
87 |
+
}
|
88 |
+
if(!isNaN(d)){
|
89 |
+
d *= f;
|
90 |
+
}
|
91 |
+
else{
|
92 |
+
for(n = 0; n < LL.length; n++){
|
93 |
+
if(d.toUpperCase() === LL[n]){
|
94 |
+
d = VL[n];
|
95 |
+
d *= f;
|
96 |
+
if(isNaN(cdv) && n == 8){
|
97 |
+
cdv = LL[n];
|
98 |
+
}
|
99 |
+
break;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
rs += d;
|
104 |
+
}
|
105 |
+
cd = rs % 11;
|
106 |
+
if(cd == 10){cd = "X";}
|
107 |
+
if(cd == cdv){return true;}
|
108 |
+
return false;
|
109 |
+
},
|
110 |
+
"The specified vehicle identification number (VIN) is invalid."
|
111 |
+
);
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
|
115 |
+
*
|
116 |
+
* @example jQuery.validator.methods.date("01/01/1900")
|
117 |
+
* @result true
|
118 |
+
*
|
119 |
+
* @example jQuery.validator.methods.date("01/13/1990")
|
120 |
+
* @result false
|
121 |
+
*
|
122 |
+
* @example jQuery.validator.methods.date("01.01.1900")
|
123 |
+
* @result false
|
124 |
+
*
|
125 |
+
* @example <input name="pippo" class="{dateITA:true}" />
|
126 |
+
* @desc Declares an optional input element whose value must be a valid date.
|
127 |
+
*
|
128 |
+
* @name jQuery.validator.methods.dateITA
|
129 |
+
* @type Boolean
|
130 |
+
* @cat Plugins/Validate/Methods
|
131 |
+
*/
|
132 |
+
jQuery.validator.addMethod(
|
133 |
+
"dateITA",
|
134 |
+
function(value, element) {
|
135 |
+
var check = false;
|
136 |
+
var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
|
137 |
+
if( re.test(value)){
|
138 |
+
var adata = value.split('/');
|
139 |
+
var gg = parseInt(adata[0],10);
|
140 |
+
var mm = parseInt(adata[1],10);
|
141 |
+
var aaaa = parseInt(adata[2],10);
|
142 |
+
var xdata = new Date(aaaa,mm-1,gg);
|
143 |
+
if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
|
144 |
+
check = true;
|
145 |
+
else
|
146 |
+
check = false;
|
147 |
+
} else
|
148 |
+
check = false;
|
149 |
+
return this.optional(element) || check;
|
150 |
+
},
|
151 |
+
"Please enter a correct date"
|
152 |
+
);
|
153 |
+
|
154 |
+
jQuery.validator.addMethod("dateNL", function(value, element) {
|
155 |
+
return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
|
156 |
+
}, "Vul hier een geldige datum in."
|
157 |
+
);
|
158 |
+
|
159 |
+
jQuery.validator.addMethod("time", function(value, element) {
|
160 |
+
return this.optional(element) || /^([01][0-9])|(2[0123]):([0-5])([0-9])$/.test(value);
|
161 |
+
}, "Please enter a valid time, between 00:00 and 23:59"
|
162 |
+
);
|
163 |
+
|
164 |
+
/**
|
165 |
+
* matches US phone number format
|
166 |
+
*
|
167 |
+
* where the area code may not start with 1 and the prefix may not start with 1
|
168 |
+
* allows '-' or ' ' as a separator and allows parens around area code
|
169 |
+
* some people may want to put a '1' in front of their number
|
170 |
+
*
|
171 |
+
* 1(212)-999-2345
|
172 |
+
* or
|
173 |
+
* 212 999 2344
|
174 |
+
* or
|
175 |
+
* 212-999-0983
|
176 |
+
*
|
177 |
+
* but not
|
178 |
+
* 111-123-5434
|
179 |
+
* and not
|
180 |
+
* 212 123 4567
|
181 |
+
*/
|
182 |
+
jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
|
183 |
+
phone_number = phone_number.replace(/\s+/g, "");
|
184 |
+
return this.optional(element) || phone_number.length > 9 &&
|
185 |
+
phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
|
186 |
+
}, "Please specify a valid phone number");
|
187 |
+
|
188 |
+
jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
|
189 |
+
return this.optional(element) || phone_number.length > 9 &&
|
190 |
+
phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
|
191 |
+
}, 'Please specify a valid phone number');
|
192 |
+
|
193 |
+
jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
|
194 |
+
return this.optional(element) || phone_number.length > 9 &&
|
195 |
+
phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/);
|
196 |
+
}, 'Please specify a valid mobile number');
|
197 |
+
|
198 |
+
// TODO check if value starts with <, otherwise don't try stripping anything
|
199 |
+
jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
|
200 |
+
return jQuery(value).text().length >= param;
|
201 |
+
}, jQuery.validator.format("Please enter at least {0} characters"));
|
202 |
+
|
203 |
+
// same as email, but TLD is optional
|
204 |
+
jQuery.validator.addMethod("email2", function(value, element, param) {
|
205 |
+
return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
|
206 |
+
}, jQuery.validator.messages.email);
|
207 |
+
|
208 |
+
// same as url, but TLD is optional
|
209 |
+
jQuery.validator.addMethod("url2", function(value, element, param) {
|
210 |
+
return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
|
211 |
+
}, jQuery.validator.messages.url);
|
212 |
+
|
213 |
+
// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
|
214 |
+
// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
|
215 |
+
// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
|
216 |
+
jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
|
217 |
+
|
218 |
+
if (/[^0-9-]+/.test(value))
|
219 |
+
return false;
|
220 |
+
|
221 |
+
value = value.replace(/\D/g, "");
|
222 |
+
|
223 |
+
var validTypes = 0x0000;
|
224 |
+
|
225 |
+
if (param.mastercard)
|
226 |
+
validTypes |= 0x0001;
|
227 |
+
if (param.visa)
|
228 |
+
validTypes |= 0x0002;
|
229 |
+
if (param.amex)
|
230 |
+
validTypes |= 0x0004;
|
231 |
+
if (param.dinersclub)
|
232 |
+
validTypes |= 0x0008;
|
233 |
+
if (param.enroute)
|
234 |
+
validTypes |= 0x0010;
|
235 |
+
if (param.discover)
|
236 |
+
validTypes |= 0x0020;
|
237 |
+
if (param.jcb)
|
238 |
+
validTypes |= 0x0040;
|
239 |
+
if (param.unknown)
|
240 |
+
validTypes |= 0x0080;
|
241 |
+
if (param.all)
|
242 |
+
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
|
243 |
+
|
244 |
+
if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
|
245 |
+
return value.length == 16;
|
246 |
+
}
|
247 |
+
if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
|
248 |
+
return value.length == 16;
|
249 |
+
}
|
250 |
+
if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex
|
251 |
+
return value.length == 15;
|
252 |
+
}
|
253 |
+
if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub
|
254 |
+
return value.length == 14;
|
255 |
+
}
|
256 |
+
if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute
|
257 |
+
return value.length == 15;
|
258 |
+
}
|
259 |
+
if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
|
260 |
+
return value.length == 16;
|
261 |
+
}
|
262 |
+
if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
|
263 |
+
return value.length == 16;
|
264 |
+
}
|
265 |
+
if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
|
266 |
+
return value.length == 15;
|
267 |
+
}
|
268 |
+
if (validTypes & 0x0080) { //unknown
|
269 |
+
return true;
|
270 |
+
}
|
271 |
+
return false;
|
272 |
+
}, "Please enter a valid credit card number.");
|
273 |
+
|
274 |
+
jQuery.validator.addMethod("ipv4", function(value, element, param) {
|
275 |
+
return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);
|
276 |
+
}, "Please enter a valid IP v4 address.");
|
277 |
+
|
278 |
+
jQuery.validator.addMethod("ipv6", function(value, element, param) {
|
279 |
+
return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
|
280 |
+
}, "Please enter a valid IP v6 address.");
|
js/jquery.validate.js
ADDED
@@ -0,0 +1,1159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jQuery Validation Plugin 1.8.0
|
3 |
+
*
|
4 |
+
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
|
5 |
+
* http://docs.jquery.com/Plugins/Validation
|
6 |
+
*
|
7 |
+
* Copyright (c) 2006 - 2011 Jörn Zaefferer
|
8 |
+
*
|
9 |
+
* Dual licensed under the MIT and GPL licenses:
|
10 |
+
* http://www.opensource.org/licenses/mit-license.php
|
11 |
+
* http://www.gnu.org/licenses/gpl.html
|
12 |
+
*/
|
13 |
+
|
14 |
+
(function($) {
|
15 |
+
|
16 |
+
$.extend($.fn, {
|
17 |
+
// http://docs.jquery.com/Plugins/Validation/validate
|
18 |
+
validate: function( options ) {
|
19 |
+
|
20 |
+
// if nothing is selected, return nothing; can't chain anyway
|
21 |
+
if (!this.length) {
|
22 |
+
options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
|
23 |
+
return;
|
24 |
+
}
|
25 |
+
|
26 |
+
// check if a validator for this form was already created
|
27 |
+
var validator = $.data(this[0], 'validator');
|
28 |
+
if ( validator ) {
|
29 |
+
return validator;
|
30 |
+
}
|
31 |
+
|
32 |
+
validator = new $.validator( options, this[0] );
|
33 |
+
$.data(this[0], 'validator', validator);
|
34 |
+
|
35 |
+
if ( validator.settings.onsubmit ) {
|
36 |
+
|
37 |
+
// allow suppresing validation by adding a cancel class to the submit button
|
38 |
+
this.find("input, button").filter(".cancel").click(function() {
|
39 |
+
validator.cancelSubmit = true;
|
40 |
+
});
|
41 |
+
|
42 |
+
// when a submitHandler is used, capture the submitting button
|
43 |
+
if (validator.settings.submitHandler) {
|
44 |
+
this.find("input, button").filter(":submit").click(function() {
|
45 |
+
validator.submitButton = this;
|
46 |
+
});
|
47 |
+
}
|
48 |
+
|
49 |
+
// validate the form on submit
|
50 |
+
this.submit( function( event ) {
|
51 |
+
if ( validator.settings.debug )
|
52 |
+
// prevent form submit to be able to see console output
|
53 |
+
event.preventDefault();
|
54 |
+
|
55 |
+
function handle() {
|
56 |
+
if ( validator.settings.submitHandler ) {
|
57 |
+
if (validator.submitButton) {
|
58 |
+
// insert a hidden input as a replacement for the missing submit button
|
59 |
+
var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);
|
60 |
+
}
|
61 |
+
validator.settings.submitHandler.call( validator, validator.currentForm );
|
62 |
+
if (validator.submitButton) {
|
63 |
+
// and clean up afterwards; thanks to no-block-scope, hidden can be referenced
|
64 |
+
hidden.remove();
|
65 |
+
}
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
return true;
|
69 |
+
}
|
70 |
+
|
71 |
+
// prevent submit for invalid forms or custom submit handlers
|
72 |
+
if ( validator.cancelSubmit ) {
|
73 |
+
validator.cancelSubmit = false;
|
74 |
+
return handle();
|
75 |
+
}
|
76 |
+
if ( validator.form() ) {
|
77 |
+
if ( validator.pendingRequest ) {
|
78 |
+
validator.formSubmitted = true;
|
79 |
+
return false;
|
80 |
+
}
|
81 |
+
return handle();
|
82 |
+
} else {
|
83 |
+
validator.focusInvalid();
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
});
|
87 |
+
}
|
88 |
+
|
89 |
+
return validator;
|
90 |
+
},
|
91 |
+
// http://docs.jquery.com/Plugins/Validation/valid
|
92 |
+
valid: function() {
|
93 |
+
if ( $(this[0]).is('form')) {
|
94 |
+
return this.validate().form();
|
95 |
+
} else {
|
96 |
+
var valid = true;
|
97 |
+
var validator = $(this[0].form).validate();
|
98 |
+
this.each(function() {
|
99 |
+
valid &= validator.element(this);
|
100 |
+
});
|
101 |
+
return valid;
|
102 |
+
}
|
103 |
+
},
|
104 |
+
// attributes: space seperated list of attributes to retrieve and remove
|
105 |
+
removeAttrs: function(attributes) {
|
106 |
+
var result = {},
|
107 |
+
$element = this;
|
108 |
+
$.each(attributes.split(/\s/), function(index, value) {
|
109 |
+
result[value] = $element.attr(value);
|
110 |
+
$element.removeAttr(value);
|
111 |
+
});
|
112 |
+
return result;
|
113 |
+
},
|
114 |
+
// http://docs.jquery.com/Plugins/Validation/rules
|
115 |
+
rules: function(command, argument) {
|
116 |
+
var element = this[0];
|
117 |
+
|
118 |
+
if (command) {
|
119 |
+
var settings = $.data(element.form, 'validator').settings;
|
120 |
+
var staticRules = settings.rules;
|
121 |
+
var existingRules = $.validator.staticRules(element);
|
122 |
+
switch(command) {
|
123 |
+
case "add":
|
124 |
+
$.extend(existingRules, $.validator.normalizeRule(argument));
|
125 |
+
staticRules[element.name] = existingRules;
|
126 |
+
if (argument.messages)
|
127 |
+
settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
|
128 |
+
break;
|
129 |
+
case "remove":
|
130 |
+
if (!argument) {
|
131 |
+
delete staticRules[element.name];
|
132 |
+
return existingRules;
|
133 |
+
}
|
134 |
+
var filtered = {};
|
135 |
+
$.each(argument.split(/\s/), function(index, method) {
|
136 |
+
filtered[method] = existingRules[method];
|
137 |
+
delete existingRules[method];
|
138 |
+
});
|
139 |
+
return filtered;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
var data = $.validator.normalizeRules(
|
144 |
+
$.extend(
|
145 |
+
{},
|
146 |
+
$.validator.metadataRules(element),
|
147 |
+
$.validator.classRules(element),
|
148 |
+
$.validator.attributeRules(element),
|
149 |
+
$.validator.staticRules(element)
|
150 |
+
), element);
|
151 |
+
|
152 |
+
// make sure required is at front
|
153 |
+
if (data.required) {
|
154 |
+
var param = data.required;
|
155 |
+
delete data.required;
|
156 |
+
data = $.extend({required: param}, data);
|
157 |
+
}
|
158 |
+
|
159 |
+
return data;
|
160 |
+
}
|
161 |
+
});
|
162 |
+
|
163 |
+
// Custom selectors
|
164 |
+
$.extend($.expr[":"], {
|
165 |
+
// http://docs.jquery.com/Plugins/Validation/blank
|
166 |
+
blank: function(a) {return !$.trim("" + a.value);},
|
167 |
+
// http://docs.jquery.com/Plugins/Validation/filled
|
168 |
+
filled: function(a) {return !!$.trim("" + a.value);},
|
169 |
+
// http://docs.jquery.com/Plugins/Validation/unchecked
|
170 |
+
unchecked: function(a) {return !a.checked;}
|
171 |
+
});
|
172 |
+
|
173 |
+
// constructor for validator
|
174 |
+
$.validator = function( options, form ) {
|
175 |
+
this.settings = $.extend( true, {}, $.validator.defaults, options );
|
176 |
+
this.currentForm = form;
|
177 |
+
this.init();
|
178 |
+
};
|
179 |
+
|
180 |
+
$.validator.format = function(source, params) {
|
181 |
+
if ( arguments.length == 1 )
|
182 |
+
return function() {
|
183 |
+
var args = $.makeArray(arguments);
|
184 |
+
args.unshift(source);
|
185 |
+
return $.validator.format.apply( this, args );
|
186 |
+
};
|
187 |
+
if ( arguments.length > 2 && params.constructor != Array ) {
|
188 |
+
params = $.makeArray(arguments).slice(1);
|
189 |
+
}
|
190 |
+
if ( params.constructor != Array ) {
|
191 |
+
params = [ params ];
|
192 |
+
}
|
193 |
+
$.each(params, function(i, n) {
|
194 |
+
source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
|
195 |
+
});
|
196 |
+
return source;
|
197 |
+
};
|
198 |
+
|
199 |
+
$.extend($.validator, {
|
200 |
+
|
201 |
+
defaults: {
|
202 |
+
messages: {},
|
203 |
+
groups: {},
|
204 |
+
rules: {},
|
205 |
+
errorClass: "error",
|
206 |
+
validClass: "valid",
|
207 |
+
errorElement: "label",
|
208 |
+
focusInvalid: true,
|
209 |
+
errorContainer: $( [] ),
|
210 |
+
errorLabelContainer: $( [] ),
|
211 |
+
onsubmit: true,
|
212 |
+
ignore: [],
|
213 |
+
ignoreTitle: false,
|
214 |
+
onfocusin: function(element) {
|
215 |
+
this.lastActive = element;
|
216 |
+
|
217 |
+
// hide error label and remove error class on focus if enabled
|
218 |
+
if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
|
219 |
+
this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
|
220 |
+
this.addWrapper(this.errorsFor(element)).hide();
|
221 |
+
}
|
222 |
+
},
|
223 |
+
onfocusout: function(element) {
|
224 |
+
if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
|
225 |
+
this.element(element);
|
226 |
+
}
|
227 |
+
},
|
228 |
+
onkeyup: function(element) {
|
229 |
+
if ( element.name in this.submitted || element == this.lastElement ) {
|
230 |
+
this.element(element);
|
231 |
+
}
|
232 |
+
},
|
233 |
+
onclick: function(element) {
|
234 |
+
// click on selects, radiobuttons and checkboxes
|
235 |
+
if ( element.name in this.submitted )
|
236 |
+
this.element(element);
|
237 |
+
// or option elements, check parent select in that case
|
238 |
+
else if (element.parentNode.name in this.submitted)
|
239 |
+
this.element(element.parentNode);
|
240 |
+
},
|
241 |
+
highlight: function( element, errorClass, validClass ) {
|
242 |
+
$(element).addClass(errorClass).removeClass(validClass);
|
243 |
+
},
|
244 |
+
unhighlight: function( element, errorClass, validClass ) {
|
245 |
+
$(element).removeClass(errorClass).addClass(validClass);
|
246 |
+
}
|
247 |
+
},
|
248 |
+
|
249 |
+
// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
|
250 |
+
setDefaults: function(settings) {
|
251 |
+
$.extend( $.validator.defaults, settings );
|
252 |
+
},
|
253 |
+
|
254 |
+
messages: {
|
255 |
+
required: "This field is required.",
|
256 |
+
remote: "Please fix this field.",
|
257 |
+
email: "Please enter a valid email address.",
|
258 |
+
url: "Please enter a valid URL.",
|
259 |
+
date: "Please enter a valid date.",
|
260 |
+
dateISO: "Please enter a valid date (ISO).",
|
261 |
+
number: "Please enter a valid number.",
|
262 |
+
digits: "Please enter only digits.",
|
263 |
+
creditcard: "Please enter a valid credit card number.",
|
264 |
+
equalTo: "Please enter the same value again.",
|
265 |
+
accept: "Please enter a value with a valid extension.",
|
266 |
+
maxlength: $.validator.format("Please enter no more than {0} characters."),
|
267 |
+
minlength: $.validator.format("Please enter at least {0} characters."),
|
268 |
+
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
|
269 |
+
range: $.validator.format("Please enter a value between {0} and {1}."),
|
270 |
+
max: $.validator.format("Please enter a value less than or equal to {0}."),
|
271 |
+
min: $.validator.format("Please enter a value greater than or equal to {0}.")
|
272 |
+
},
|
273 |
+
|
274 |
+
autoCreateRanges: false,
|
275 |
+
|
276 |
+
prototype: {
|
277 |
+
|
278 |
+
init: function() {
|
279 |
+
this.labelContainer = $(this.settings.errorLabelContainer);
|
280 |
+
this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
|
281 |
+
this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
|
282 |
+
this.submitted = {};
|
283 |
+
this.valueCache = {};
|
284 |
+
this.pendingRequest = 0;
|
285 |
+
this.pending = {};
|
286 |
+
this.invalid = {};
|
287 |
+
this.reset();
|
288 |
+
|
289 |
+
var groups = (this.groups = {});
|
290 |
+
$.each(this.settings.groups, function(key, value) {
|
291 |
+
$.each(value.split(/\s/), function(index, name) {
|
292 |
+
groups[name] = key;
|
293 |
+
});
|
294 |
+
});
|
295 |
+
var rules = this.settings.rules;
|
296 |
+
$.each(rules, function(key, value) {
|
297 |
+
rules[key] = $.validator.normalizeRule(value);
|
298 |
+
});
|
299 |
+
|
300 |
+
function delegate(event) {
|
301 |
+
var validator = $.data(this[0].form, "validator"),
|
302 |
+
eventType = "on" + event.type.replace(/^validate/, "");
|
303 |
+
validator.settings[eventType] && validator.settings[eventType].call(validator, this[0] );
|
304 |
+
}
|
305 |
+
$(this.currentForm)
|
306 |
+
.validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate)
|
307 |
+
.validateDelegate(":radio, :checkbox, select, option", "click", delegate);
|
308 |
+
|
309 |
+
if (this.settings.invalidHandler)
|
310 |
+
$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
|
311 |
+
},
|
312 |
+
|
313 |
+
// http://docs.jquery.com/Plugins/Validation/Validator/form
|
314 |
+
form: function() {
|
315 |
+
this.checkForm();
|
316 |
+
$.extend(this.submitted, this.errorMap);
|
317 |
+
this.invalid = $.extend({}, this.errorMap);
|
318 |
+
if (!this.valid())
|
319 |
+
$(this.currentForm).triggerHandler("invalid-form", [this]);
|
320 |
+
this.showErrors();
|
321 |
+
return this.valid();
|
322 |
+
},
|
323 |
+
|
324 |
+
checkForm: function() {
|
325 |
+
this.prepareForm();
|
326 |
+
for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
|
327 |
+
this.check( elements[i] );
|
328 |
+
}
|
329 |
+
return this.valid();
|
330 |
+
},
|
331 |
+
|
332 |
+
// http://docs.jquery.com/Plugins/Validation/Validator/element
|
333 |
+
element: function( element ) {
|
334 |
+
element = this.clean( element );
|
335 |
+
this.lastElement = element;
|
336 |
+
this.prepareElement( element );
|
337 |
+
this.currentElements = $(element);
|
338 |
+
var result = this.check( element );
|
339 |
+
if ( result ) {
|
340 |
+
delete this.invalid[element.name];
|
341 |
+
} else {
|
342 |
+
this.invalid[element.name] = true;
|
343 |
+
}
|
344 |
+
if ( !this.numberOfInvalids() ) {
|
345 |
+
// Hide error containers on last error
|
346 |
+
this.toHide = this.toHide.add( this.containers );
|
347 |
+
}
|
348 |
+
this.showErrors();
|
349 |
+
return result;
|
350 |
+
},
|
351 |
+
|
352 |
+
// http://docs.jquery.com/Plugins/Validation/Validator/showErrors
|
353 |
+
showErrors: function(errors) {
|
354 |
+
if(errors) {
|
355 |
+
// add items to error list and map
|
356 |
+
$.extend( this.errorMap, errors );
|
357 |
+
this.errorList = [];
|
358 |
+
for ( var name in errors ) {
|
359 |
+
this.errorList.push({
|
360 |
+
message: errors[name],
|
361 |
+
element: this.findByName(name)[0]
|
362 |
+
});
|
363 |
+
}
|
364 |
+
// remove items from success list
|
365 |
+
this.successList = $.grep( this.successList, function(element) {
|
366 |
+
return !(element.name in errors);
|
367 |
+
});
|
368 |
+
}
|
369 |
+
this.settings.showErrors
|
370 |
+
? this.settings.showErrors.call( this, this.errorMap, this.errorList )
|
371 |
+
: this.defaultShowErrors();
|
372 |
+
},
|
373 |
+
|
374 |
+
// http://docs.jquery.com/Plugins/Validation/Validator/resetForm
|
375 |
+
resetForm: function() {
|
376 |
+
if ( $.fn.resetForm )
|
377 |
+
$( this.currentForm ).resetForm();
|
378 |
+
this.submitted = {};
|
379 |
+
this.prepareForm();
|
380 |
+
this.hideErrors();
|
381 |
+
this.elements().removeClass( this.settings.errorClass );
|
382 |
+
},
|
383 |
+
|
384 |
+
numberOfInvalids: function() {
|
385 |
+
return this.objectLength(this.invalid);
|
386 |
+
},
|
387 |
+
|
388 |
+
objectLength: function( obj ) {
|
389 |
+
var count = 0;
|
390 |
+
for ( var i in obj )
|
391 |
+
count++;
|
392 |
+
return count;
|
393 |
+
},
|
394 |
+
|
395 |
+
hideErrors: function() {
|
396 |
+
this.addWrapper( this.toHide ).hide();
|
397 |
+
},
|
398 |
+
|
399 |
+
valid: function() {
|
400 |
+
return this.size() == 0;
|
401 |
+
},
|
402 |
+
|
403 |
+
size: function() {
|
404 |
+
return this.errorList.length;
|
405 |
+
},
|
406 |
+
|
407 |
+
focusInvalid: function() {
|
408 |
+
if( this.settings.focusInvalid ) {
|
409 |
+
try {
|
410 |
+
$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
|
411 |
+
.filter(":visible")
|
412 |
+
.focus()
|
413 |
+
// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
|
414 |
+
.trigger("focusin");
|
415 |
+
} catch(e) {
|
416 |
+
// ignore IE throwing errors when focusing hidden elements
|
417 |
+
}
|
418 |
+
}
|
419 |
+
},
|
420 |
+
|
421 |
+
findLastActive: function() {
|
422 |
+
var lastActive = this.lastActive;
|
423 |
+
return lastActive && $.grep(this.errorList, function(n) {
|
424 |
+
return n.element.name == lastActive.name;
|
425 |
+
}).length == 1 && lastActive;
|
426 |
+
},
|
427 |
+
|
428 |
+
elements: function() {
|
429 |
+
var validator = this,
|
430 |
+
rulesCache = {};
|
431 |
+
|
432 |
+
// select all valid inputs inside the form (no submit or reset buttons)
|
433 |
+
// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
|
434 |
+
return $([]).add(this.currentForm.elements)
|
435 |
+
.filter(":input")
|
436 |
+
.not(":submit, :reset, :image, [disabled]")
|
437 |
+
.not( this.settings.ignore )
|
438 |
+
.filter(function() {
|
439 |
+
!this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
|
440 |
+
|
441 |
+
// select only the first element for each name, and only those with rules specified
|
442 |
+
if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
|
443 |
+
return false;
|
444 |
+
|
445 |
+
rulesCache[this.name] = true;
|
446 |
+
return true;
|
447 |
+
});
|
448 |
+
},
|
449 |
+
|
450 |
+
clean: function( selector ) {
|
451 |
+
return $( selector )[0];
|
452 |
+
},
|
453 |
+
|
454 |
+
errors: function() {
|
455 |
+
return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
|
456 |
+
},
|
457 |
+
|
458 |
+
reset: function() {
|
459 |
+
this.successList = [];
|
460 |
+
this.errorList = [];
|
461 |
+
this.errorMap = {};
|
462 |
+
this.toShow = $([]);
|
463 |
+
this.toHide = $([]);
|
464 |
+
this.currentElements = $([]);
|
465 |
+
},
|
466 |
+
|
467 |
+
prepareForm: function() {
|
468 |
+
this.reset();
|
469 |
+
this.toHide = this.errors().add( this.containers );
|
470 |
+
},
|
471 |
+
|
472 |
+
prepareElement: function( element ) {
|
473 |
+
this.reset();
|
474 |
+
this.toHide = this.errorsFor(element);
|
475 |
+
},
|
476 |
+
|
477 |
+
check: function( element ) {
|
478 |
+
element = this.clean( element );
|
479 |
+
|
480 |
+
// if radio/checkbox, validate first element in group instead
|
481 |
+
if (this.checkable(element)) {
|
482 |
+
element = this.findByName( element.name ).not(this.settings.ignore)[0];
|
483 |
+
}
|
484 |
+
|
485 |
+
var rules = $(element).rules();
|
486 |
+
var dependencyMismatch = false;
|
487 |
+
for (var method in rules ) {
|
488 |
+
var rule = { method: method, parameters: rules[method] };
|
489 |
+
try {
|
490 |
+
var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
|
491 |
+
|
492 |
+
// if a method indicates that the field is optional and therefore valid,
|
493 |
+
// don't mark it as valid when there are no other rules
|
494 |
+
if ( result == "dependency-mismatch" ) {
|
495 |
+
dependencyMismatch = true;
|
496 |
+
continue;
|
497 |
+
}
|
498 |
+
dependencyMismatch = false;
|
499 |
+
|
500 |
+
if ( result == "pending" ) {
|
501 |
+
this.toHide = this.toHide.not( this.errorsFor(element) );
|
502 |
+
return;
|
503 |
+
}
|
504 |
+
|
505 |
+
if( !result ) {
|
506 |
+
this.formatAndAdd( element, rule );
|
507 |
+
return false;
|
508 |
+
}
|
509 |
+
} catch(e) {
|
510 |
+
this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
|
511 |
+
+ ", check the '" + rule.method + "' method", e);
|
512 |
+
throw e;
|
513 |
+
}
|
514 |
+
}
|
515 |
+
if (dependencyMismatch)
|
516 |
+
return;
|
517 |
+
if ( this.objectLength(rules) )
|
518 |
+
this.successList.push(element);
|
519 |
+
return true;
|
520 |
+
},
|
521 |
+
|
522 |
+
// return the custom message for the given element and validation method
|
523 |
+
// specified in the element's "messages" metadata
|
524 |
+
customMetaMessage: function(element, method) {
|
525 |
+
if (!$.metadata)
|
526 |
+
return;
|
527 |
+
|
528 |
+
var meta = this.settings.meta
|
529 |
+
? $(element).metadata()[this.settings.meta]
|
530 |
+
: $(element).metadata();
|
531 |
+
|
532 |
+
return meta && meta.messages && meta.messages[method];
|
533 |
+
},
|
534 |
+
|
535 |
+
// return the custom message for the given element name and validation method
|
536 |
+
customMessage: function( name, method ) {
|
537 |
+
var m = this.settings.messages[name];
|
538 |
+
return m && (m.constructor == String
|
539 |
+
? m
|
540 |
+
: m[method]);
|
541 |
+
},
|
542 |
+
|
543 |
+
// return the first defined argument, allowing empty strings
|
544 |
+
findDefined: function() {
|
545 |
+
for(var i = 0; i < arguments.length; i++) {
|
546 |
+
if (arguments[i] !== undefined)
|
547 |
+
return arguments[i];
|
548 |
+
}
|
549 |
+
return undefined;
|
550 |
+
},
|
551 |
+
|
552 |
+
defaultMessage: function( element, method) {
|
553 |
+
return this.findDefined(
|
554 |
+
this.customMessage( element.name, method ),
|
555 |
+
this.customMetaMessage( element, method ),
|
556 |
+
// title is never undefined, so handle empty string as undefined
|
557 |
+
!this.settings.ignoreTitle && element.title || undefined,
|
558 |
+
$.validator.messages[method],
|
559 |
+
"<strong>Warning: No message defined for " + element.name + "</strong>"
|
560 |
+
);
|
561 |
+
},
|
562 |
+
|
563 |
+
formatAndAdd: function( element, rule ) {
|
564 |
+
var message = this.defaultMessage( element, rule.method ),
|
565 |
+
theregex = /\$?\{(\d+)\}/g;
|
566 |
+
if ( typeof message == "function" ) {
|
567 |
+
message = message.call(this, rule.parameters, element);
|
568 |
+
} else if (theregex.test(message)) {
|
569 |
+
message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);
|
570 |
+
}
|
571 |
+
this.errorList.push({
|
572 |
+
message: message,
|
573 |
+
element: element
|
574 |
+
});
|
575 |
+
|
576 |
+
this.errorMap[element.name] = message;
|
577 |
+
this.submitted[element.name] = message;
|
578 |
+
},
|
579 |
+
|
580 |
+
addWrapper: function(toToggle) {
|
581 |
+
if ( this.settings.wrapper )
|
582 |
+
toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
|
583 |
+
return toToggle;
|
584 |
+
},
|
585 |
+
|
586 |
+
defaultShowErrors: function() {
|
587 |
+
for ( var i = 0; this.errorList[i]; i++ ) {
|
588 |
+
var error = this.errorList[i];
|
589 |
+
this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
|
590 |
+
this.showLabel( error.element, error.message );
|
591 |
+
}
|
592 |
+
if( this.errorList.length ) {
|
593 |
+
this.toShow = this.toShow.add( this.containers );
|
594 |
+
}
|
595 |
+
if (this.settings.success) {
|
596 |
+
for ( var i = 0; this.successList[i]; i++ ) {
|
597 |
+
this.showLabel( this.successList[i] );
|
598 |
+
}
|
599 |
+
}
|
600 |
+
if (this.settings.unhighlight) {
|
601 |
+
for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
|
602 |
+
this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
|
603 |
+
}
|
604 |
+
}
|
605 |
+
this.toHide = this.toHide.not( this.toShow );
|
606 |
+
this.hideErrors();
|
607 |
+
this.addWrapper( this.toShow ).show();
|
608 |
+
},
|
609 |
+
|
610 |
+
validElements: function() {
|
611 |
+
return this.currentElements.not(this.invalidElements());
|
612 |
+
},
|
613 |
+
|
614 |
+
invalidElements: function() {
|
615 |
+
return $(this.errorList).map(function() {
|
616 |
+
return this.element;
|
617 |
+
});
|
618 |
+
},
|
619 |
+
|
620 |
+
showLabel: function(element, message) {
|
621 |
+
var label = this.errorsFor( element );
|
622 |
+
if ( label.length ) {
|
623 |
+
// refresh error/success class
|
624 |
+
label.removeClass().addClass( this.settings.errorClass );
|
625 |
+
|
626 |
+
// check if we have a generated label, replace the message then
|
627 |
+
label.attr("generated") && label.html(message);
|
628 |
+
} else {
|
629 |
+
// create label
|
630 |
+
label = $("<" + this.settings.errorElement + "/>")
|
631 |
+
.attr({"for": this.idOrName(element), generated: true})
|
632 |
+
.addClass(this.settings.errorClass)
|
633 |
+
.html(message || "");
|
634 |
+
if ( this.settings.wrapper ) {
|
635 |
+
// make sure the element is visible, even in IE
|
636 |
+
// actually showing the wrapped element is handled elsewhere
|
637 |
+
label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
|
638 |
+
}
|
639 |
+
if ( !this.labelContainer.append(label).length )
|
640 |
+
this.settings.errorPlacement
|
641 |
+
? this.settings.errorPlacement(label, $(element) )
|
642 |
+
: label.insertAfter(element);
|
643 |
+
}
|
644 |
+
if ( !message && this.settings.success ) {
|
645 |
+
label.text("");
|
646 |
+
typeof this.settings.success == "string"
|
647 |
+
? label.addClass( this.settings.success )
|
648 |
+
: this.settings.success( label );
|
649 |
+
}
|
650 |
+
this.toShow = this.toShow.add(label);
|
651 |
+
},
|
652 |
+
|
653 |
+
errorsFor: function(element) {
|
654 |
+
var name = this.idOrName(element);
|
655 |
+
return this.errors().filter(function() {
|
656 |
+
return $(this).attr('for') == name;
|
657 |
+
});
|
658 |
+
},
|
659 |
+
|
660 |
+
idOrName: function(element) {
|
661 |
+
return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
|
662 |
+
},
|
663 |
+
|
664 |
+
checkable: function( element ) {
|
665 |
+
return /radio|checkbox/i.test(element.type);
|
666 |
+
},
|
667 |
+
|
668 |
+
findByName: function( name ) {
|
669 |
+
// select by name and filter by form for performance over form.find("[name=...]")
|
670 |
+
var form = this.currentForm;
|
671 |
+
return $(document.getElementsByName(name)).map(function(index, element) {
|
672 |
+
return element.form == form && element.name == name && element || null;
|
673 |
+
});
|
674 |
+
},
|
675 |
+
|
676 |
+
getLength: function(value, element) {
|
677 |
+
switch( element.nodeName.toLowerCase() ) {
|
678 |
+
case 'select':
|
679 |
+
return $("option:selected", element).length;
|
680 |
+
case 'input':
|
681 |
+
if( this.checkable( element) )
|
682 |
+
return this.findByName(element.name).filter(':checked').length;
|
683 |
+
}
|
684 |
+
return value.length;
|
685 |
+
},
|
686 |
+
|
687 |
+
depend: function(param, element) {
|
688 |
+
return this.dependTypes[typeof param]
|
689 |
+
? this.dependTypes[typeof param](param, element)
|
690 |
+
: true;
|
691 |
+
},
|
692 |
+
|
693 |
+
dependTypes: {
|
694 |
+
"boolean": function(param, element) {
|
695 |
+
return param;
|
696 |
+
},
|
697 |
+
"string": function(param, element) {
|
698 |
+
return !!$(param, element.form).length;
|
699 |
+
},
|
700 |
+
"function": function(param, element) {
|
701 |
+
return param(element);
|
702 |
+
}
|
703 |
+
},
|
704 |
+
|
705 |
+
optional: function(element) {
|
706 |
+
return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
|
707 |
+
},
|
708 |
+
|
709 |
+
startRequest: function(element) {
|
710 |
+
if (!this.pending[element.name]) {
|
711 |
+
this.pendingRequest++;
|
712 |
+
this.pending[element.name] = true;
|
713 |
+
}
|
714 |
+
},
|
715 |
+
|
716 |
+
stopRequest: function(element, valid) {
|
717 |
+
this.pendingRequest--;
|
718 |
+
// sometimes synchronization fails, make sure pendingRequest is never < 0
|
719 |
+
if (this.pendingRequest < 0)
|
720 |
+
this.pendingRequest = 0;
|
721 |
+
delete this.pending[element.name];
|
722 |
+
if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
|
723 |
+
$(this.currentForm).submit();
|
724 |
+
this.formSubmitted = false;
|
725 |
+
} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
|
726 |
+
$(this.currentForm).triggerHandler("invalid-form", [this]);
|
727 |
+
this.formSubmitted = false;
|
728 |
+
}
|
729 |
+
},
|
730 |
+
|
731 |
+
previousValue: function(element) {
|
732 |
+
return $.data(element, "previousValue") || $.data(element, "previousValue", {
|
733 |
+
old: null,
|
734 |
+
valid: true,
|
735 |
+
message: this.defaultMessage( element, "remote" )
|
736 |
+
});
|
737 |
+
}
|
738 |
+
|
739 |
+
},
|
740 |
+
|
741 |
+
classRuleSettings: {
|
742 |
+
required: {required: true},
|
743 |
+
email: {email: true},
|
744 |
+
url: {url: true},
|
745 |
+
date: {date: true},
|
746 |
+
dateISO: {dateISO: true},
|
747 |
+
dateDE: {dateDE: true},
|
748 |
+
number: {number: true},
|
749 |
+
numberDE: {numberDE: true},
|
750 |
+
digits: {digits: true},
|
751 |
+
creditcard: {creditcard: true}
|
752 |
+
},
|
753 |
+
|
754 |
+
addClassRules: function(className, rules) {
|
755 |
+
className.constructor == String ?
|
756 |
+
this.classRuleSettings[className] = rules :
|
757 |
+
$.extend(this.classRuleSettings, className);
|
758 |
+
},
|
759 |
+
|
760 |
+
classRules: function(element) {
|
761 |
+
var rules = {};
|
762 |
+
var classes = $(element).attr('class');
|
763 |
+
classes && $.each(classes.split(' '), function() {
|
764 |
+
if (this in $.validator.classRuleSettings) {
|
765 |
+
$.extend(rules, $.validator.classRuleSettings[this]);
|
766 |
+
}
|
767 |
+
});
|
768 |
+
return rules;
|
769 |
+
},
|
770 |
+
|
771 |
+
attributeRules: function(element) {
|
772 |
+
var rules = {};
|
773 |
+
var $element = $(element);
|
774 |
+
|
775 |
+
for (var method in $.validator.methods) {
|
776 |
+
var value = $element.attr(method);
|
777 |
+
if (value) {
|
778 |
+
rules[method] = value;
|
779 |
+
}
|
780 |
+
}
|
781 |
+
|
782 |
+
// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
|
783 |
+
if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
|
784 |
+
delete rules.maxlength;
|
785 |
+
}
|
786 |
+
|
787 |
+
return rules;
|
788 |
+
},
|
789 |
+
|
790 |
+
metadataRules: function(element) {
|
791 |
+
if (!$.metadata) return {};
|
792 |
+
|
793 |
+
var meta = $.data(element.form, 'validator').settings.meta;
|
794 |
+
return meta ?
|
795 |
+
$(element).metadata()[meta] :
|
796 |
+
$(element).metadata();
|
797 |
+
},
|
798 |
+
|
799 |
+
staticRules: function(element) {
|
800 |
+
var rules = {};
|
801 |
+
var validator = $.data(element.form, 'validator');
|
802 |
+
if (validator.settings.rules) {
|
803 |
+
rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
|
804 |
+
}
|
805 |
+
return rules;
|
806 |
+
},
|
807 |
+
|
808 |
+
normalizeRules: function(rules, element) {
|
809 |
+
// handle dependency check
|
810 |
+
$.each(rules, function(prop, val) {
|
811 |
+
// ignore rule when param is explicitly false, eg. required:false
|
812 |
+
if (val === false) {
|
813 |
+
delete rules[prop];
|
814 |
+
return;
|
815 |
+
}
|
816 |
+
if (val.param || val.depends) {
|
817 |
+
var keepRule = true;
|
818 |
+
switch (typeof val.depends) {
|
819 |
+
case "string":
|
820 |
+
keepRule = !!$(val.depends, element.form).length;
|
821 |
+
break;
|
822 |
+
case "function":
|
823 |
+
keepRule = val.depends.call(element, element);
|
824 |
+
break;
|
825 |
+
}
|
826 |
+
if (keepRule) {
|
827 |
+
rules[prop] = val.param !== undefined ? val.param : true;
|
828 |
+
} else {
|
829 |
+
delete rules[prop];
|
830 |
+
}
|
831 |
+
}
|
832 |
+
});
|
833 |
+
|
834 |
+
// evaluate parameters
|
835 |
+
$.each(rules, function(rule, parameter) {
|
836 |
+
rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
|
837 |
+
});
|
838 |
+
|
839 |
+
// clean number parameters
|
840 |
+
$.each(['minlength', 'maxlength', 'min', 'max'], function() {
|
841 |
+
if (rules[this]) {
|
842 |
+
rules[this] = Number(rules[this]);
|
843 |
+
}
|
844 |
+
});
|
845 |
+
$.each(['rangelength', 'range'], function() {
|
846 |
+
if (rules[this]) {
|
847 |
+
rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
|
848 |
+
}
|
849 |
+
});
|
850 |
+
|
851 |
+
if ($.validator.autoCreateRanges) {
|
852 |
+
// auto-create ranges
|
853 |
+
if (rules.min && rules.max) {
|
854 |
+
rules.range = [rules.min, rules.max];
|
855 |
+
delete rules.min;
|
856 |
+
delete rules.max;
|
857 |
+
}
|
858 |
+
if (rules.minlength && rules.maxlength) {
|
859 |
+
rules.rangelength = [rules.minlength, rules.maxlength];
|
860 |
+
delete rules.minlength;
|
861 |
+
delete rules.maxlength;
|
862 |
+
}
|
863 |
+
}
|
864 |
+
|
865 |
+
// To support custom messages in metadata ignore rule methods titled "messages"
|
866 |
+
if (rules.messages) {
|
867 |
+
delete rules.messages;
|
868 |
+
}
|
869 |
+
|
870 |
+
return rules;
|
871 |
+
},
|
872 |
+
|
873 |
+
// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
|
874 |
+
normalizeRule: function(data) {
|
875 |
+
if( typeof data == "string" ) {
|
876 |
+
var transformed = {};
|
877 |
+
$.each(data.split(/\s/), function() {
|
878 |
+
transformed[this] = true;
|
879 |
+
});
|
880 |
+
data = transformed;
|
881 |
+
}
|
882 |
+
return data;
|
883 |
+
},
|
884 |
+
|
885 |
+
// http://docs.jquery.com/Plugins/Validation/Validator/addMethod
|
886 |
+
addMethod: function(name, method, message) {
|
887 |
+
$.validator.methods[name] = method;
|
888 |
+
$.validator.messages[name] = message != undefined ? message : $.validator.messages[name];
|
889 |
+
if (method.length < 3) {
|
890 |
+
$.validator.addClassRules(name, $.validator.normalizeRule(name));
|
891 |
+
}
|
892 |
+
},
|
893 |
+
|
894 |
+
methods: {
|
895 |
+
|
896 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/required
|
897 |
+
required: function(value, element, param) {
|
898 |
+
// check if dependency is met
|
899 |
+
if ( !this.depend(param, element) )
|
900 |
+
return "dependency-mismatch";
|
901 |
+
switch( element.nodeName.toLowerCase() ) {
|
902 |
+
case 'select':
|
903 |
+
// could be an array for select-multiple or a string, both are fine this way
|
904 |
+
var val = $(element).val();
|
905 |
+
return val && val.length > 0;
|
906 |
+
case 'input':
|
907 |
+
if ( this.checkable(element) )
|
908 |
+
return this.getLength(value, element) > 0;
|
909 |
+
default:
|
910 |
+
return $.trim(value).length > 0;
|
911 |
+
}
|
912 |
+
},
|
913 |
+
|
914 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/remote
|
915 |
+
remote: function(value, element, param) {
|
916 |
+
if ( this.optional(element) )
|
917 |
+
return "dependency-mismatch";
|
918 |
+
|
919 |
+
var previous = this.previousValue(element);
|
920 |
+
if (!this.settings.messages[element.name] )
|
921 |
+
this.settings.messages[element.name] = {};
|
922 |
+
previous.originalMessage = this.settings.messages[element.name].remote;
|
923 |
+
this.settings.messages[element.name].remote = previous.message;
|
924 |
+
|
925 |
+
param = typeof param == "string" && {url:param} || param;
|
926 |
+
|
927 |
+
if ( this.pending[element.name] ) {
|
928 |
+
return "pending";
|
929 |
+
}
|
930 |
+
if ( previous.old === value ) {
|
931 |
+
return previous.valid;
|
932 |
+
}
|
933 |
+
|
934 |
+
previous.old = value;
|
935 |
+
var validator = this;
|
936 |
+
this.startRequest(element);
|
937 |
+
var data = {};
|
938 |
+
data[element.name] = value;
|
939 |
+
$.ajax($.extend(true, {
|
940 |
+
url: param,
|
941 |
+
mode: "abort",
|
942 |
+
port: "validate" + element.name,
|
943 |
+
dataType: "json",
|
944 |
+
data: data,
|
945 |
+
success: function(response) {
|
946 |
+
validator.settings.messages[element.name].remote = previous.originalMessage;
|
947 |
+
var valid = response === true;
|
948 |
+
if ( valid ) {
|
949 |
+
var submitted = validator.formSubmitted;
|
950 |
+
validator.prepareElement(element);
|
951 |
+
validator.formSubmitted = submitted;
|
952 |
+
validator.successList.push(element);
|
953 |
+
validator.showErrors();
|
954 |
+
} else {
|
955 |
+
var errors = {};
|
956 |
+
var message = response || validator.defaultMessage( element, "remote" );
|
957 |
+
errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
|
958 |
+
validator.showErrors(errors);
|
959 |
+
}
|
960 |
+
previous.valid = valid;
|
961 |
+
validator.stopRequest(element, valid);
|
962 |
+
}
|
963 |
+
}, param));
|
964 |
+
return "pending";
|
965 |
+
},
|
966 |
+
|
967 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/minlength
|
968 |
+
minlength: function(value, element, param) {
|
969 |
+
return this.optional(element) || this.getLength($.trim(value), element) >= param;
|
970 |
+
},
|
971 |
+
|
972 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/maxlength
|
973 |
+
maxlength: function(value, element, param) {
|
974 |
+
return this.optional(element) || this.getLength($.trim(value), element) <= param;
|
975 |
+
},
|
976 |
+
|
977 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/rangelength
|
978 |
+
rangelength: function(value, element, param) {
|
979 |
+
var length = this.getLength($.trim(value), element);
|
980 |
+
return this.optional(element) || ( length >= param[0] && length <= param[1] );
|
981 |
+
},
|
982 |
+
|
983 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/min
|
984 |
+
min: function( value, element, param ) {
|
985 |
+
return this.optional(element) || value >= param;
|
986 |
+
},
|
987 |
+
|
988 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/max
|
989 |
+
max: function( value, element, param ) {
|
990 |
+
return this.optional(element) || value <= param;
|
991 |
+
},
|
992 |
+
|
993 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/range
|
994 |
+
range: function( value, element, param ) {
|
995 |
+
return this.optional(element) || ( value >= param[0] && value <= param[1] );
|
996 |
+
},
|
997 |
+
|
998 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/email
|
999 |
+
email: function(value, element) {
|
1000 |
+
// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
|
1001 |
+
return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
|
1002 |
+
},
|
1003 |
+
|
1004 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/url
|
1005 |
+
url: function(value, element) {
|
1006 |
+
// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
|
1007 |
+
return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
|
1008 |
+
},
|
1009 |
+
|
1010 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/date
|
1011 |
+
date: function(value, element) {
|
1012 |
+
return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
|
1013 |
+
},
|
1014 |
+
|
1015 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
|
1016 |
+
dateISO: function(value, element) {
|
1017 |
+
return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
|
1018 |
+
},
|
1019 |
+
|
1020 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/number
|
1021 |
+
number: function(value, element) {
|
1022 |
+
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
|
1023 |
+
},
|
1024 |
+
|
1025 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/digits
|
1026 |
+
digits: function(value, element) {
|
1027 |
+
return this.optional(element) || /^\d+$/.test(value);
|
1028 |
+
},
|
1029 |
+
|
1030 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/creditcard
|
1031 |
+
// based on http://en.wikipedia.org/wiki/Luhn
|
1032 |
+
creditcard: function(value, element) {
|
1033 |
+
if ( this.optional(element) )
|
1034 |
+
return "dependency-mismatch";
|
1035 |
+
// accept only digits and dashes
|
1036 |
+
if (/[^0-9-]+/.test(value))
|
1037 |
+
return false;
|
1038 |
+
var nCheck = 0,
|
1039 |
+
nDigit = 0,
|
1040 |
+
bEven = false;
|
1041 |
+
|
1042 |
+
value = value.replace(/\D/g, "");
|
1043 |
+
|
1044 |
+
for (var n = value.length - 1; n >= 0; n--) {
|
1045 |
+
var cDigit = value.charAt(n);
|
1046 |
+
var nDigit = parseInt(cDigit, 10);
|
1047 |
+
if (bEven) {
|
1048 |
+
if ((nDigit *= 2) > 9)
|
1049 |
+
nDigit -= 9;
|
1050 |
+
}
|
1051 |
+
nCheck += nDigit;
|
1052 |
+
bEven = !bEven;
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
return (nCheck % 10) == 0;
|
1056 |
+
},
|
1057 |
+
|
1058 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/accept
|
1059 |
+
accept: function(value, element, param) {
|
1060 |
+
param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
|
1061 |
+
return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
|
1062 |
+
},
|
1063 |
+
|
1064 |
+
// http://docs.jquery.com/Plugins/Validation/Methods/equalTo
|
1065 |
+
equalTo: function(value, element, param) {
|
1066 |
+
// bind to the blur event of the target in order to revalidate whenever the target field is updated
|
1067 |
+
// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
|
1068 |
+
var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
|
1069 |
+
$(element).valid();
|
1070 |
+
});
|
1071 |
+
return value == target.val();
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
});
|
1077 |
+
|
1078 |
+
// deprecated, use $.validator.format instead
|
1079 |
+
$.format = $.validator.format;
|
1080 |
+
|
1081 |
+
})(jQuery);
|
1082 |
+
|
1083 |
+
// ajax mode: abort
|
1084 |
+
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
|
1085 |
+
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
|
1086 |
+
;(function($) {
|
1087 |
+
var pendingRequests = {};
|
1088 |
+
// Use a prefilter if available (1.5+)
|
1089 |
+
if ( $.ajaxPrefilter ) {
|
1090 |
+
$.ajaxPrefilter(function(settings, _, xhr) {
|
1091 |
+
var port = settings.port;
|
1092 |
+
if (settings.mode == "abort") {
|
1093 |
+
if ( pendingRequests[port] ) {
|
1094 |
+
pendingRequests[port].abort();
|
1095 |
+
}
|
1096 |
+
pendingRequests[port] = xhr;
|
1097 |
+
}
|
1098 |
+
});
|
1099 |
+
} else {
|
1100 |
+
// Proxy ajax
|
1101 |
+
var ajax = $.ajax;
|
1102 |
+
$.ajax = function(settings) {
|
1103 |
+
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
|
1104 |
+
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
|
1105 |
+
if (mode == "abort") {
|
1106 |
+
if ( pendingRequests[port] ) {
|
1107 |
+
pendingRequests[port].abort();
|
1108 |
+
}
|
1109 |
+
return (pendingRequests[port] = ajax.apply(this, arguments));
|
1110 |
+
}
|
1111 |
+
return ajax.apply(this, arguments);
|
1112 |
+
};
|
1113 |
+
}
|
1114 |
+
})(jQuery);
|
1115 |
+
|
1116 |
+
// provides cross-browser focusin and focusout events
|
1117 |
+
// IE has native support, in other browsers, use event caputuring (neither bubbles)
|
1118 |
+
|
1119 |
+
// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
|
1120 |
+
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
|
1121 |
+
;(function($) {
|
1122 |
+
// only implement if not provided by jQuery core (since 1.4)
|
1123 |
+
// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
|
1124 |
+
if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
|
1125 |
+
$.each({
|
1126 |
+
focus: 'focusin',
|
1127 |
+
blur: 'focusout'
|
1128 |
+
}, function( original, fix ){
|
1129 |
+
$.event.special[fix] = {
|
1130 |
+
setup:function() {
|
1131 |
+
this.addEventListener( original, handler, true );
|
1132 |
+
},
|
1133 |
+
teardown:function() {
|
1134 |
+
this.removeEventListener( original, handler, true );
|
1135 |
+
},
|
1136 |
+
handler: function(e) {
|
1137 |
+
arguments[0] = $.event.fix(e);
|
1138 |
+
arguments[0].type = fix;
|
1139 |
+
return $.event.handle.apply(this, arguments);
|
1140 |
+
}
|
1141 |
+
};
|
1142 |
+
function handler(e) {
|
1143 |
+
e = $.event.fix(e);
|
1144 |
+
e.type = fix;
|
1145 |
+
return $.event.handle.call(this, e);
|
1146 |
+
}
|
1147 |
+
});
|
1148 |
+
};
|
1149 |
+
$.extend($.fn, {
|
1150 |
+
validateDelegate: function(delegate, type, handler) {
|
1151 |
+
return this.bind(type, function(event) {
|
1152 |
+
var target = $(event.target);
|
1153 |
+
if (target.is(delegate)) {
|
1154 |
+
return handler.apply(target, arguments);
|
1155 |
+
}
|
1156 |
+
});
|
1157 |
+
}
|
1158 |
+
});
|
1159 |
+
})(jQuery);
|
js/messages_ca.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: CA
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Aquest camp és obligatori.",
|
7 |
+
remote: "Si us plau, omple aquest camp.",
|
8 |
+
email: "Si us plau, escriu una adreça de correu-e vàlida",
|
9 |
+
url: "Si us plau, escriu una URL vàlida.",
|
10 |
+
date: "Si us plau, escriu una data vàlida.",
|
11 |
+
dateISO: "Si us plau, escriu una data (ISO) vàlida.",
|
12 |
+
number: "Si us plau, escriu un número enter vàlid.",
|
13 |
+
digits: "Si us plau, escriu només dígits.",
|
14 |
+
creditcard: "Si us plau, escriu un número de tarjeta vàlid.",
|
15 |
+
equalTo: "Si us plau, escriu el maateix valor de nou.",
|
16 |
+
accept: "Si us plau, escriu un valor amb una extensió acceptada.",
|
17 |
+
maxlength: jQuery.validator.format("Si us plau, no escriguis més de {0} caracters."),
|
18 |
+
minlength: jQuery.validator.format("Si us plau, no escriguis menys de {0} caracters."),
|
19 |
+
rangelength: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1} caracters."),
|
20 |
+
range: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1}."),
|
21 |
+
max: jQuery.validator.format("Si us plau, escriu un valor menor o igual a {0}."),
|
22 |
+
min: jQuery.validator.format("Si us plau, escriu un valor major o igual a {0}.")
|
23 |
+
});
|
js/messages_de.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: DE
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Dieses Feld ist ein Pflichtfeld.",
|
7 |
+
maxlength: jQuery.validator.format("Geben Sie bitte maximal {0} Zeichen ein."),
|
8 |
+
minlength: jQuery.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."),
|
9 |
+
rangelength: jQuery.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."),
|
10 |
+
email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
|
11 |
+
url: "Geben Sie bitte eine gültige URL ein.",
|
12 |
+
date: "Bitte geben Sie ein gültiges Datum ein.",
|
13 |
+
number: "Geben Sie bitte eine Nummer ein.",
|
14 |
+
digits: "Geben Sie bitte nur Ziffern ein.",
|
15 |
+
equalTo: "Bitte denselben Wert wiederholen.",
|
16 |
+
range: jQuery.validator.format("Geben Sie bitten einen Wert zwischen {0} und {1}."),
|
17 |
+
max: jQuery.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."),
|
18 |
+
min: jQuery.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."),
|
19 |
+
creditcard: "Geben Sie bitte ein gültige Kreditkarten-Nummer ein."
|
20 |
+
});
|
js/messages_es.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: ES
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Este campo es obligatorio.",
|
7 |
+
remote: "Por favor, rellena este campo.",
|
8 |
+
email: "Por favor, escribe una dirección de correo válida",
|
9 |
+
url: "Por favor, escribe una URL válida.",
|
10 |
+
date: "Por favor, escribe una fecha válida.",
|
11 |
+
dateISO: "Por favor, escribe una fecha (ISO) válida.",
|
12 |
+
number: "Por favor, escribe un número entero válido.",
|
13 |
+
digits: "Por favor, escribe sólo dígitos.",
|
14 |
+
creditcard: "Por favor, escribe un número de tarjeta válido.",
|
15 |
+
equalTo: "Por favor, escribe el mismo valor de nuevo.",
|
16 |
+
accept: "Por favor, escribe un valor con una extensión aceptada.",
|
17 |
+
maxlength: jQuery.validator.format("Por favor, no escribas más de {0} caracteres."),
|
18 |
+
minlength: jQuery.validator.format("Por favor, no escribas menos de {0} caracteres."),
|
19 |
+
rangelength: jQuery.validator.format("Por favor, escribe un valor entre {0} y {1} caracteres."),
|
20 |
+
range: jQuery.validator.format("Por favor, escribe un valor entre {0} y {1}."),
|
21 |
+
max: jQuery.validator.format("Por favor, escribe un valor menor o igual a {0}."),
|
22 |
+
min: jQuery.validator.format("Por favor, escribe un valor mayor o igual a {0}.")
|
23 |
+
});
|
js/messages_fr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: FR
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Ce champ est requis.",
|
7 |
+
remote: "Veuillez remplir ce champ pour continuer.",
|
8 |
+
email: "Veuillez entrer une adresse email valide.",
|
9 |
+
url: "Veuillez entrer une URL valide.",
|
10 |
+
date: "Veuillez entrer une date valide.",
|
11 |
+
dateISO: "Veuillez entrer une date valide (ISO).",
|
12 |
+
number: "Veuillez entrer un nombre valide.",
|
13 |
+
digits: "Veuillez entrer (seulement) une valeur numérique.",
|
14 |
+
creditcard: "Veuillez entrer un numéro de carte de crédit valide.",
|
15 |
+
equalTo: "Veuillez entrer une nouvelle fois la même valeur.",
|
16 |
+
accept: "Veuillez entrer une valeur avec une extension valide.",
|
17 |
+
maxlength: jQuery.validator.format("Veuillez ne pas entrer plus de {0} caractères."),
|
18 |
+
minlength: jQuery.validator.format("Veuillez entrer au moins {0} caractères."),
|
19 |
+
rangelength: jQuery.validator.format("Veuillez entrer entre {0} et {1} caractères."),
|
20 |
+
range: jQuery.validator.format("Veuillez entrer une valeur entre {0} et {1}."),
|
21 |
+
max: jQuery.validator.format("Veuillez entrer une valeur inférieure ou égale à {0}."),
|
22 |
+
min: jQuery.validator.format("Veuillez entrer une valeur supérieure ou égale à {0}.")
|
23 |
+
});
|
js/messages_hu.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: HU
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Kötelező megadni.",
|
7 |
+
maxlength: jQuery.validator.format("Legfeljebb {0} karakter hosszú legyen."),
|
8 |
+
minlength: jQuery.validator.format("Legalább {0} karakter hosszú legyen."),
|
9 |
+
rangelength: jQuery.validator.format("Legalább {0} és legfeljebb {1} karakter hosszú legyen."),
|
10 |
+
email: "Érvényes e-mail címnek kell lennie.",
|
11 |
+
url: "Érvényes URL-nek kell lennie.",
|
12 |
+
date: "Dátumnak kell lennie.",
|
13 |
+
number: "Számnak kell lennie.",
|
14 |
+
digits: "Csak számjegyek lehetnek.",
|
15 |
+
equalTo: "Meg kell egyeznie a két értéknek.",
|
16 |
+
range: jQuery.validator.format("{0} és {1} közé kell esnie."),
|
17 |
+
max: jQuery.validator.format("Nem lehet nagyobb, mint {0}."),
|
18 |
+
min: jQuery.validator.format("Nem lehet kisebb, mint {0}."),
|
19 |
+
creditcard: "Érvényes hitelkártyaszámnak kell lennie."
|
20 |
+
});
|
js/messages_it.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: IT
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Campo obbligatorio.",
|
7 |
+
remote: "Controlla questo campo.",
|
8 |
+
email: "Inserisci un indirizzo email valido.",
|
9 |
+
url: "Inserisci un indirizzo web valido.",
|
10 |
+
date: "Inserisci una data valida.",
|
11 |
+
dateISO: "Inserisci una data valida (ISO).",
|
12 |
+
number: "Inserisci un numero valido.",
|
13 |
+
digits: "Inserisci solo numeri.",
|
14 |
+
creditcard: "Inserisci un numero di carta di credito valido.",
|
15 |
+
equalTo: "Il valore non corrisponde.",
|
16 |
+
accept: "Inserisci un valore con un'estensione valida.",
|
17 |
+
maxlength: jQuery.validator.format("Non inserire più di {0} caratteri."),
|
18 |
+
minlength: jQuery.validator.format("Inserisci almeno {0} caratteri."),
|
19 |
+
rangelength: jQuery.validator.format("Inserisci un valore compreso tra {0} e {1} caratteri."),
|
20 |
+
range: jQuery.validator.format("Inserisci un valore compreso tra {0} e {1}."),
|
21 |
+
max: jQuery.validator.format("Inserisci un valore minore o uguale a {0}."),
|
22 |
+
min: jQuery.validator.format("Inserisci un valore maggiore o uguale a {0}.")
|
23 |
+
});
|
js/messages_ja.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Language: JA
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "このフィールドは必須です。",
|
7 |
+
remote: "このフィールドを修正してください。",
|
8 |
+
email: "有効なEメールアドレスを入力してください。",
|
9 |
+
url: "有効なURLを入力してください。",
|
10 |
+
date: "有効な日付を入力してください。",
|
11 |
+
dateISO: "有効な日付(ISO)を入力してください。",
|
12 |
+
number: "有効な数字を入力してください。",
|
13 |
+
digits: "数字のみを入力してください。",
|
14 |
+
creditcard: "有効なクレジットカード番号を入力してください。",
|
15 |
+
equalTo: "同じ値をもう一度入力してください。",
|
16 |
+
accept: "有効な拡張子を含む値を入力してください。",
|
17 |
+
maxlength: jQuery.format("{0} 文字以内で入力してください。"),
|
18 |
+
minlength: jQuery.format("{0} 文字以上で入力してください。"),
|
19 |
+
rangelength: jQuery.format("{0} 文字から {1} 文字までの値を入力してください。"),
|
20 |
+
range: jQuery.format("{0} から {1} までの値を入力してください。"),
|
21 |
+
max: jQuery.format("{0} 以下の値を入力してください。"),
|
22 |
+
min: jQuery.format("{1} 以上の値を入力してください。")
|
23 |
+
});
|
js/messages_nl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: NL
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Dit is een verplicht veld.",
|
7 |
+
remote: "Controleer dit veld.",
|
8 |
+
email: "Vul hier een geldig e-mailadres in.",
|
9 |
+
url: "Vul hier een geldige URL in.",
|
10 |
+
date: "Vul hier een geldige datum in.",
|
11 |
+
dateISO: "Vul hier een geldige datum in (ISO-formaat).",
|
12 |
+
number: "Vul hier een geldig getal in.",
|
13 |
+
digits: "Vul hier alleen getallen in.",
|
14 |
+
creditcard: "Vul hier een geldig creditcardnummer in.",
|
15 |
+
equalTo: "Vul hier dezelfde waarde in.",
|
16 |
+
accept: "Vul hier een waarde in met een geldige extensie.",
|
17 |
+
maxlength: jQuery.validator.format("Vul hier maximaal {0} tekens in."),
|
18 |
+
minlength: jQuery.validator.format("Vul hier minimaal {0} tekens in."),
|
19 |
+
rangelength: jQuery.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1} tekens."),
|
20 |
+
range: jQuery.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1}."),
|
21 |
+
max: jQuery.validator.format("Vul hier een waarde in kleiner dan of gelijk aan {0}."),
|
22 |
+
min: jQuery.validator.format("Vul hier een waarde in groter dan of gelijk aan {0}.")
|
23 |
+
});
|
js/messages_ru.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: RU
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Это поле необходимо заполнить.",
|
7 |
+
remote: "Пожалуйста, введите правильное значение.",
|
8 |
+
email: "Пожалуйста, введите корретный адрес электронной почты.",
|
9 |
+
url: "Пожалуйста, введите корректный URL.",
|
10 |
+
date: "Пожалуйста, введите корректную дату.",
|
11 |
+
dateISO: "Пожалуйста, введите корректную дату в формате ISO.",
|
12 |
+
number: "Пожалуйста, введите число.",
|
13 |
+
digits: "Пожалуйста, вводите только цифры.",
|
14 |
+
creditcard: "Пожалуйста, введите правильный номер кредитной карты.",
|
15 |
+
equalTo: "Пожалуйста, введите такое же значение ещё раз.",
|
16 |
+
accept: "Пожалуйста, выберите файл с правильным расширением.",
|
17 |
+
maxlength: jQuery.validator.format("Пожалуйста, введите не больше {0} символов."),
|
18 |
+
minlength: jQuery.validator.format("Пожалуйста, введите не меньше {0} символов."),
|
19 |
+
rangelength: jQuery.validator.format("Пожалуйста, введите значение длиной от {0} до {1} символов."),
|
20 |
+
range: jQuery.validator.format("Пожалуйста, введите число от {0} до {1}."),
|
21 |
+
max: jQuery.validator.format("Пожалуйста, введите число, меньшее или равное {0}."),
|
22 |
+
min: jQuery.validator.format("Пожалуйста, введите число, большее или равное {0}.")
|
23 |
+
});
|
js/messages_tr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Translated default messages for the jQuery validation plugin.
|
3 |
+
* Locale: TR
|
4 |
+
*/
|
5 |
+
jQuery.extend(jQuery.validator.messages, {
|
6 |
+
required: "Bu alanın doldurulması zorunludur.",
|
7 |
+
remote: "Lütfen bu alanı düzeltin.",
|
8 |
+
email: "Lütfen geçerli bir e-posta adresi giriniz.",
|
9 |
+
url: "Lütfen geçerli bir web adresi (URL) giriniz.",
|
10 |
+
date: "Lütfen geçerli bir tarih giriniz.",
|
11 |
+
dateISO: "Lütfen geçerli bir tarih giriniz(ISO formatında)",
|
12 |
+
number: "Lütfen geçerli bir sayı giriniz.",
|
13 |
+
digits: "Lütfen sadece sayısal karakterler giriniz.",
|
14 |
+
creditcard: "Lütfen geçerli bir kredi kartı giriniz.",
|
15 |
+
equalTo: "Lütfen aynı değeri tekrar giriniz.",
|
16 |
+
accept: "Lütfen geçerli uzantıya sahip bir değer giriniz.",
|
17 |
+
maxlength: jQuery.validator.format("Lütfen en fazla {0} karakter uzunluğunda bir değer giriniz."),
|
18 |
+
minlength: jQuery.validator.format("Lütfen en az {0} karakter uzunluğunda bir değer giriniz."),
|
19 |
+
rangelength: jQuery.validator.format("Lütfen en az {0} ve en fazla {1} uzunluğunda bir değer giriniz."),
|
20 |
+
range: jQuery.validator.format("Lütfen {0} ile {1} arasında bir değer giriniz."),
|
21 |
+
max: jQuery.validator.format("Lütfen {0} değerine eşit ya da daha küçük bir değer giriniz."),
|
22 |
+
min: jQuery.validator.format("Lütfen {0} değerine eşit ya da daha büyük bir değer giriniz.")
|
23 |
+
});
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Hiroaki Miyashita
|
|
3 |
Donate link: http://wpgogo.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: 3.1
|
7 |
-
Stable tag: 1.8.
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
@@ -64,6 +64,7 @@ Localization
|
|
64 |
|
65 |
* Belorussian (by_BY) - [Marcis Gasuns](http://www.fatcow.com/)
|
66 |
* Catalan (ca) - [Andreu Llos](http://andreullos.com/)
|
|
|
67 |
* German (de_DE) - F J Kaiser
|
68 |
* Spanish (es_ES) - [Dario Ferrer](http://www.darioferrer.com/)
|
69 |
* French (fr_FR) - Nicolas Lemoine
|
@@ -103,14 +104,20 @@ See the default template and modify it.
|
|
103 |
|
104 |
== Changelog ==
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
= 1.8.3 =
|
107 |
-
Bugfix: combination of the fieldset type and the normal type.
|
108 |
|
109 |
= 1.8.2 =
|
110 |
-
Bugfix: multiple options for the fieldset type.
|
111 |
|
112 |
= 1.8.1 =
|
113 |
-
Bugfix: tag save.
|
114 |
|
115 |
= 1.8 =
|
116 |
* Added the `tagName` attribute for the `insertTag` of the custom taxonomy.
|
3 |
Donate link: http://wpgogo.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: 3.1.1
|
7 |
+
Stable tag: 1.8.4
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
64 |
|
65 |
* Belorussian (by_BY) - [Marcis Gasuns](http://www.fatcow.com/)
|
66 |
* Catalan (ca) - [Andreu Llos](http://andreullos.com/)
|
67 |
+
* Czech (cs_CZ) - [Jakub](http://www.webees.cz/)
|
68 |
* German (de_DE) - F J Kaiser
|
69 |
* Spanish (es_ES) - [Dario Ferrer](http://www.darioferrer.com/)
|
70 |
* French (fr_FR) - Nicolas Lemoine
|
104 |
|
105 |
== Changelog ==
|
106 |
|
107 |
+
= 1.8.4 =
|
108 |
+
* Form validation with the jQuery validatation plugin. You need to check `Use the jQuery validation` in the global settings. ex) class = required, class = email, class = url, etc.
|
109 |
+
* Support of the multiple option of the textarea type with TinyMCE.
|
110 |
+
* Code cleaning.
|
111 |
+
* Czech (cs_CZ) - Jakub
|
112 |
+
|
113 |
= 1.8.3 =
|
114 |
+
* Bugfix: combination of the fieldset type and the normal type.
|
115 |
|
116 |
= 1.8.2 =
|
117 |
+
* Bugfix: multiple options for the fieldset type.
|
118 |
|
119 |
= 1.8.1 =
|
120 |
+
* Bugfix: tag save.
|
121 |
|
122 |
= 1.8 =
|
123 |
* Added the `tagName` attribute for the `insertTag` of the custom taxonomy.
|