Version Description
No known upgrade issues.
Download this release
Release Info
Developer | mpwalsh8 |
Plugin | Google Forms |
Version | 0.56 |
Comparing to | |
See all releases |
Code changes from version 0.55 to 0.56
- index.php +3 -3
- languages/wpgform-es_ES.mo +0 -0
- languages/wpgform-es_ES.po +480 -0
- readme.txt +11 -2
- wpgform-core.php +83 -10
- wpgform-post-type.php +130 -20
index.php
CHANGED
@@ -4,8 +4,8 @@
|
|
4 |
* Plugin Name: WordPress Google Form
|
5 |
* Plugin URI: http://michaelwalsh.org/wordpress/wordpress-plugins/wpgform/
|
6 |
* Description: Add Google Forms to a WordPress web site. Display a Google Form directly into your posts, pages or sidebar. Style the Google Form to match your existing theme and display a custom confirmation page after form submission.
|
7 |
-
* Version: 0.
|
8 |
-
* Build: 0.
|
9 |
* Last Modified: $WCDATE$
|
10 |
* Author: Mike Walsh
|
11 |
* Author URI: http://www.michaelwalsh.org
|
@@ -25,7 +25,7 @@
|
|
25 |
*
|
26 |
*/
|
27 |
|
28 |
-
define('WPGFORM_VERSION', '0.
|
29 |
|
30 |
require_once('wpgform-core.php') ;
|
31 |
require_once('wpgform-post-type.php') ;
|
4 |
* Plugin Name: WordPress Google Form
|
5 |
* Plugin URI: http://michaelwalsh.org/wordpress/wordpress-plugins/wpgform/
|
6 |
* Description: Add Google Forms to a WordPress web site. Display a Google Form directly into your posts, pages or sidebar. Style the Google Form to match your existing theme and display a custom confirmation page after form submission.
|
7 |
+
* Version: 0.56
|
8 |
+
* Build: 0.56.$WCREV$
|
9 |
* Last Modified: $WCDATE$
|
10 |
* Author: Mike Walsh
|
11 |
* Author URI: http://www.michaelwalsh.org
|
25 |
*
|
26 |
*/
|
27 |
|
28 |
+
define('WPGFORM_VERSION', '0.56') ;
|
29 |
|
30 |
require_once('wpgform-core.php') ;
|
31 |
require_once('wpgform-post-type.php') ;
|
languages/wpgform-es_ES.mo
ADDED
Binary file
|
languages/wpgform-es_ES.po
ADDED
@@ -0,0 +1,480 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress Google Form\n"
|
4 |
+
"POT-Creation-Date: 2013-06-21 18:44-0000\n"
|
5 |
+
"PO-Revision-Date: 2013-08-06 22:53-0300\n"
|
6 |
+
"Last-Translator: Camilo Flores <camilo.ignacio@gmail.com>\n"
|
7 |
+
"Language-Team: Mike Walsh (@mpwalsh8) <mpwalsh8@gmail.com>\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.5.5\n"
|
12 |
+
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-SearchPath-0: ..\n"
|
15 |
+
|
16 |
+
#: ../wpgform-core.php:139
|
17 |
+
msgid "Required"
|
18 |
+
msgstr "Obligatorio"
|
19 |
+
|
20 |
+
#: ../wpgform-core.php:140
|
21 |
+
msgid "Submit"
|
22 |
+
msgstr "Enviar"
|
23 |
+
|
24 |
+
#: ../wpgform-core.php:141
|
25 |
+
msgid "Back"
|
26 |
+
msgstr "Volver"
|
27 |
+
|
28 |
+
#: ../wpgform-core.php:142
|
29 |
+
msgid "Continue"
|
30 |
+
msgstr "Continuar"
|
31 |
+
|
32 |
+
#: ../wpgform-core.php:143
|
33 |
+
msgid "Mark only one oval."
|
34 |
+
msgstr "Selecciona sólo una marca."
|
35 |
+
|
36 |
+
#: ../wpgform-core.php:144
|
37 |
+
msgid "Other:"
|
38 |
+
msgstr "Otros:"
|
39 |
+
|
40 |
+
#: ../wpgform-core.php:145
|
41 |
+
msgid "Check all that apply."
|
42 |
+
msgstr "Selecciona todos los que apliquen."
|
43 |
+
|
44 |
+
#: ../wpgform-core.php:197
|
45 |
+
#: ../wpgform-core.php:198
|
46 |
+
msgid "Google Forms"
|
47 |
+
msgstr "Formularios de Google"
|
48 |
+
|
49 |
+
#: ../wpgform-core.php:375
|
50 |
+
#: ../wpgform-core.php:389
|
51 |
+
msgid "Unable to process Google Form short code."
|
52 |
+
msgstr "Error al procesar el shortcode del Formulario de Google."
|
53 |
+
|
54 |
+
#: ../wpgform-core.php:539
|
55 |
+
msgid "Unable to process Google Form."
|
56 |
+
msgstr "Error al procesar el Formulario de Google"
|
57 |
+
|
58 |
+
#: ../wpgform-core.php:540
|
59 |
+
msgid "Server is responding with"
|
60 |
+
msgstr "El servidor responde con"
|
61 |
+
|
62 |
+
#: ../wpgform-core.php:541
|
63 |
+
msgid "403 Permission Denied"
|
64 |
+
msgstr "403 Acceso denegado"
|
65 |
+
|
66 |
+
#: ../wpgform-core.php:541
|
67 |
+
msgid "error"
|
68 |
+
msgstr "error"
|
69 |
+
|
70 |
+
#: ../wpgform-core.php:585
|
71 |
+
msgid "Email Address"
|
72 |
+
msgstr "Dirección de correo"
|
73 |
+
|
74 |
+
#: ../wpgform-core.php:717
|
75 |
+
msgid "Unable to retrieve Google Form. Please try reloading this page."
|
76 |
+
msgstr "Error al cargar el Formulario de Google. Por favor inténtalo nuevamente recargando la página."
|
77 |
+
|
78 |
+
#: ../wpgform-core.php:779
|
79 |
+
msgid "Unexpected content encountered, unable to retrieve Google Form."
|
80 |
+
msgstr "Error al cargar el Formulario de Google: se encontró contenido no esperado."
|
81 |
+
|
82 |
+
#: ../wpgform-core.php:930
|
83 |
+
msgid "A valid email address is required."
|
84 |
+
msgstr "Se requiere una dirección de correo válida."
|
85 |
+
|
86 |
+
#: ../wpgform-core.php:954
|
87 |
+
msgid "Incorrect answer."
|
88 |
+
msgstr "Respuesta incorrecta."
|
89 |
+
|
90 |
+
#: ../wpgform-core.php:1125
|
91 |
+
msgid "Warning: You are using an insecure browser!"
|
92 |
+
msgstr "Advertencia: Estás ocupando un navegador no seguro!"
|
93 |
+
|
94 |
+
#: ../wpgform-core.php:1128
|
95 |
+
msgid "Warning: Your browser is out of date! Please update now."
|
96 |
+
msgstr "Advertencia: Tu navegador está obsoleto. Por favor actualízalo ahora."
|
97 |
+
|
98 |
+
#: ../wpgform-core.php:1144
|
99 |
+
msgid "Form Id:"
|
100 |
+
msgstr "Id del Formulario:"
|
101 |
+
|
102 |
+
#: ../wpgform-core.php:1146
|
103 |
+
msgid "Submitted Form Id"
|
104 |
+
msgstr "Id de la respuesta al Formulario"
|
105 |
+
|
106 |
+
#: ../wpgform-core.php:1149
|
107 |
+
msgid "No Submitted Form Id"
|
108 |
+
msgstr "No se envió un ID de Formulario"
|
109 |
+
|
110 |
+
#: ../wpgform-core.php:1336
|
111 |
+
msgid "Unable to submit Google Form. Please try reloading this page."
|
112 |
+
msgstr "Error al enviar la información del Formulario Google. Por favor inténtalo nuevamente recargando esta página."
|
113 |
+
|
114 |
+
#: ../wpgform-core.php:1418
|
115 |
+
msgid "View Form Results"
|
116 |
+
msgstr "Ver los resultados a los formularios"
|
117 |
+
|
118 |
+
#: ../wpgform-core.php:1472
|
119 |
+
msgid "A form was submitted on your web site."
|
120 |
+
msgstr "Han respondido un formulario en tu sitio web."
|
121 |
+
|
122 |
+
#: ../wpgform-core.php:1473
|
123 |
+
#: ../wpgform-core.php:1485
|
124 |
+
msgid "Form"
|
125 |
+
msgstr "Formulario"
|
126 |
+
|
127 |
+
#: ../wpgform-core.php:1474
|
128 |
+
#: ../wpgform-core.php:1486
|
129 |
+
#: ../wpgform-logging.php:182
|
130 |
+
msgid "URL"
|
131 |
+
msgstr "URL"
|
132 |
+
|
133 |
+
#: ../wpgform-core.php:1475
|
134 |
+
#: ../wpgform-core.php:1487
|
135 |
+
msgid "Responses"
|
136 |
+
msgstr "Respuestas"
|
137 |
+
|
138 |
+
#: ../wpgform-core.php:1476
|
139 |
+
#: ../wpgform-core.php:1488
|
140 |
+
msgid "Date"
|
141 |
+
msgstr "Fecha"
|
142 |
+
|
143 |
+
#: ../wpgform-core.php:1477
|
144 |
+
#: ../wpgform-core.php:1489
|
145 |
+
msgid "Time"
|
146 |
+
msgstr "Hora"
|
147 |
+
|
148 |
+
#: ../wpgform-core.php:1478
|
149 |
+
#: ../wpgform-core.php:1491
|
150 |
+
msgid "Thank you"
|
151 |
+
msgstr "Gracias"
|
152 |
+
|
153 |
+
#: ../wpgform-core.php:1484
|
154 |
+
msgid "A form was submitted on your web site"
|
155 |
+
msgstr "Han respondido un formulario en tu sitio web"
|
156 |
+
|
157 |
+
#: ../wpgform-core.php:1555
|
158 |
+
msgid "This field is required."
|
159 |
+
msgstr "Este campo es obligatorio."
|
160 |
+
|
161 |
+
#: ../wpgform-core.php:1556
|
162 |
+
msgid "Please fix this field."
|
163 |
+
msgstr "Por favor arregla este campo."
|
164 |
+
|
165 |
+
#: ../wpgform-core.php:1557
|
166 |
+
msgid "Please enter a valid email address."
|
167 |
+
msgstr "Por favor ingresa una dirección de correo válida."
|
168 |
+
|
169 |
+
#: ../wpgform-core.php:1558
|
170 |
+
msgid "Please enter a valid URL."
|
171 |
+
msgstr "Por favor ingresa una URL válida."
|
172 |
+
|
173 |
+
#: ../wpgform-core.php:1559
|
174 |
+
msgid "Please enter a valid date."
|
175 |
+
msgstr "Por favor ingresa una fecha válida."
|
176 |
+
|
177 |
+
#: ../wpgform-core.php:1560
|
178 |
+
msgid "Please enter a valid date (ISO)."
|
179 |
+
msgstr "Por favor ingresa una fecha válida (ISO)."
|
180 |
+
|
181 |
+
#: ../wpgform-core.php:1561
|
182 |
+
msgid "Please enter a valid number."
|
183 |
+
msgstr "Por favor ingresa un número válido."
|
184 |
+
|
185 |
+
#: ../wpgform-core.php:1562
|
186 |
+
msgid "Please enter only digits."
|
187 |
+
msgstr "Por favor ingresa sólo números."
|
188 |
+
|
189 |
+
#: ../wpgform-core.php:1563
|
190 |
+
msgid "Please enter a valid credit card number."
|
191 |
+
msgstr "Por favor ingresa un número de tarjeta de crédito válido."
|
192 |
+
|
193 |
+
#: ../wpgform-core.php:1564
|
194 |
+
msgid "Please enter the same value again.,"
|
195 |
+
msgstr "Por favor ingresa el mismo valor nuevamente."
|
196 |
+
|
197 |
+
#: ../wpgform-core.php:1565
|
198 |
+
msgid "Please enter a value with a valid extension."
|
199 |
+
msgstr "Por favor ingresa un valor con una extensión válida."
|
200 |
+
|
201 |
+
#: ../wpgform-core.php:1566
|
202 |
+
msgid "Please enter no more than {0} characters."
|
203 |
+
msgstr "Por favor ingresa no mas de {0} caracteres."
|
204 |
+
|
205 |
+
#: ../wpgform-core.php:1567
|
206 |
+
msgid "Please enter at least {0} characters."
|
207 |
+
msgstr "Por favor ingresa al menos {0} caracteres."
|
208 |
+
|
209 |
+
#: ../wpgform-core.php:1568
|
210 |
+
msgid "Please enter a value between {0} and {1} characters long."
|
211 |
+
msgstr "Por favor ingresa al menos entre {0} y {1} caracteres."
|
212 |
+
|
213 |
+
#: ../wpgform-core.php:1569
|
214 |
+
msgid "Please enter a value between {0} and {1}."
|
215 |
+
msgstr "Por favor ingresa un número entre {0} y {1}."
|
216 |
+
|
217 |
+
#: ../wpgform-core.php:1570
|
218 |
+
msgid "Please enter a value less than or equal to {0}."
|
219 |
+
msgstr "Por favor ingresa un valor menor o igual a {0}."
|
220 |
+
|
221 |
+
#: ../wpgform-core.php:1571
|
222 |
+
msgid "Please enter a value greater than or equal to {0}."
|
223 |
+
msgstr "Por favor ingresa un valor mayor o igual a {0}."
|
224 |
+
|
225 |
+
#: ../wpgform-logging.php:30
|
226 |
+
msgid "You are not allowed to view the submission log."
|
227 |
+
msgstr "No tienes permiso para ver el log de respuestas."
|
228 |
+
|
229 |
+
#: ../wpgform-logging.php:181
|
230 |
+
msgid "Timestamp"
|
231 |
+
msgstr "Fecha"
|
232 |
+
|
233 |
+
#: ../wpgform-logging.php:183
|
234 |
+
msgid "Remote Addr"
|
235 |
+
msgstr "Dirección remota"
|
236 |
+
|
237 |
+
#: ../wpgform-logging.php:184
|
238 |
+
msgid "Remote Host"
|
239 |
+
msgstr "Servidor remoto"
|
240 |
+
|
241 |
+
#: ../wpgform-logging.php:185
|
242 |
+
msgid "HTTP Refer"
|
243 |
+
msgstr "Referencia HTTP"
|
244 |
+
|
245 |
+
#: ../wpgform-logging.php:186
|
246 |
+
msgid "HTTP User Agent"
|
247 |
+
msgstr "Navegador HTTP"
|
248 |
+
|
249 |
+
#: ../wpgform-logging.php:238
|
250 |
+
msgid "Delete"
|
251 |
+
msgstr "Borrar"
|
252 |
+
|
253 |
+
#: ../wpgform-logging.php:298
|
254 |
+
msgid "No log entries selected"
|
255 |
+
msgstr "No se han seleccionado entradas del log"
|
256 |
+
|
257 |
+
#: ../wpgform-options.php:94
|
258 |
+
#, php-format
|
259 |
+
msgid "Please consider making a <a href=\"%s\" target=\"_blank\">PayPal donation</a> if you find this plugin useful."
|
260 |
+
msgstr "Por favor considera hacer una <a href=\"%s\" target=\"_blank\">donación por PayPal</a> si te ha servido este plugin."
|
261 |
+
|
262 |
+
#: ../wpgform-options.php:235
|
263 |
+
#, php-format
|
264 |
+
msgid "Custom %s CSS"
|
265 |
+
msgstr "CSS personalizado %s"
|
266 |
+
|
267 |
+
#: ../wpgform-options.php:458
|
268 |
+
#, php-format
|
269 |
+
msgid "Enabling debug will collect data during the form rendering and processing process.<p>The data is added to the page footer but hidden with a link appearing above the form which can toggle the display of the debug data. This data is useful when trying to understand why the plugin isn't operating as expected.</p><p>When debugging is enabled, specific transports employed by the <a href=\"%s\">WordPress HTTP API</a> can optionally be disabled. While rarely required, disabling transports can be useful when the plugin is not communcating correctly with the Google Docs API. <i>Extra care should be taken when disabling transports as other aspects of WordPress may not work correctly.</i> The <a href=\"%s\">WordPress Core Control</a> plugin is recommended for advanced debugging of <a href=\"%s\">WordPress HTTP API issues.</a></p>"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: ../wpgform-post-type.php:88
|
273 |
+
msgid "Form URL"
|
274 |
+
msgstr "URL del formulario"
|
275 |
+
|
276 |
+
#: ../wpgform-post-type.php:89
|
277 |
+
msgid "The full URL to the published Google Form"
|
278 |
+
msgstr "La URL completa al Formulario Google publicado"
|
279 |
+
|
280 |
+
#: ../wpgform-post-type.php:96
|
281 |
+
msgid "Confirm URL"
|
282 |
+
msgstr "URL de confirmación"
|
283 |
+
|
284 |
+
#: ../wpgform-post-type.php:97
|
285 |
+
msgid "The full URL to the optional Confirmation Page"
|
286 |
+
msgstr "El URL completo a la página de confirmación (opcional)"
|
287 |
+
|
288 |
+
#: ../wpgform-post-type.php:104
|
289 |
+
msgid "Style"
|
290 |
+
msgstr "Estilo"
|
291 |
+
|
292 |
+
#: ../wpgform-post-type.php:105
|
293 |
+
msgid "Custom Confirmation Page Style"
|
294 |
+
msgstr "Estilo personalizado para la página de confirmación"
|
295 |
+
|
296 |
+
#: ../wpgform-post-type.php:113
|
297 |
+
msgid "Alert"
|
298 |
+
msgstr "Aviso"
|
299 |
+
|
300 |
+
#: ../wpgform-post-type.php:114
|
301 |
+
msgid "Javascript Alert Box message displayed upon submission"
|
302 |
+
msgstr "Mensaje en la ventana de aviso JavaScript a mostrar con el envío de información"
|
303 |
+
|
304 |
+
#: ../wpgform-post-type.php:121
|
305 |
+
msgid "Class"
|
306 |
+
msgstr "Clase"
|
307 |
+
|
308 |
+
#: ../wpgform-post-type.php:122
|
309 |
+
msgid "CSS class(es) to add to the form's containing DIV"
|
310 |
+
msgstr "Clase(s) CSS a agregar al DIV que contiene el formulario"
|
311 |
+
|
312 |
+
#: ../wpgform-post-type.php:129
|
313 |
+
msgid "Email"
|
314 |
+
msgstr "Correo"
|
315 |
+
|
316 |
+
#: ../wpgform-post-type.php:130
|
317 |
+
msgid "Send email upon form submission"
|
318 |
+
msgstr "Enviar email al registrar respuestas del formulario"
|
319 |
+
|
320 |
+
#: ../wpgform-post-type.php:138
|
321 |
+
msgid "Send To"
|
322 |
+
msgstr "Enviar a"
|
323 |
+
|
324 |
+
#: ../wpgform-post-type.php:139
|
325 |
+
msgid "Email address send submission email to"
|
326 |
+
msgstr "Dirección a la cual enviar los correos "
|
327 |
+
|
328 |
+
#: ../wpgform-post-type.php:146
|
329 |
+
msgid "Form CSS"
|
330 |
+
msgstr "CSS del formulario"
|
331 |
+
|
332 |
+
#: ../wpgform-post-type.php:147
|
333 |
+
msgid "Form specific CSS rules"
|
334 |
+
msgstr "Reglas CSS específicas para el formulario"
|
335 |
+
|
336 |
+
#: ../wpgform-post-type.php:174
|
337 |
+
#: ../wpgform-post-type.php:175
|
338 |
+
msgid "CAPTCHA"
|
339 |
+
msgstr "CAPTCHA"
|
340 |
+
|
341 |
+
#: ../wpgform-post-type.php:183
|
342 |
+
msgid "Columns"
|
343 |
+
msgstr "Columnas"
|
344 |
+
|
345 |
+
#: ../wpgform-post-type.php:184
|
346 |
+
msgid "Split form into columns"
|
347 |
+
msgstr "Dividir el formulario en columnas"
|
348 |
+
|
349 |
+
#: ../wpgform-post-type.php:192
|
350 |
+
msgid "Email End User"
|
351 |
+
msgstr "Correo para el usuario"
|
352 |
+
|
353 |
+
#: ../wpgform-post-type.php:193
|
354 |
+
msgid "Send email to end user upon form submission"
|
355 |
+
msgstr "Enviar correo al usuario final al registrar respuesta del formulario"
|
356 |
+
|
357 |
+
#: ../wpgform-post-type.php:201
|
358 |
+
msgid "Legal"
|
359 |
+
msgstr "Texto legal"
|
360 |
+
|
361 |
+
#: ../wpgform-post-type.php:202
|
362 |
+
msgid "Google Legal Disclaimer"
|
363 |
+
msgstr "Mostrar renuncia legal de Google"
|
364 |
+
|
365 |
+
#: ../wpgform-post-type.php:210
|
366 |
+
msgid "Read Only"
|
367 |
+
msgstr "Sólo lectura"
|
368 |
+
|
369 |
+
#: ../wpgform-post-type.php:211
|
370 |
+
msgid "Set the form Read Only"
|
371 |
+
msgstr "Dejar el formulario como de sólo lectura"
|
372 |
+
|
373 |
+
#: ../wpgform-post-type.php:219
|
374 |
+
msgid "BR"
|
375 |
+
msgstr "BR"
|
376 |
+
|
377 |
+
#: ../wpgform-post-type.php:220
|
378 |
+
msgid "Insert <BR> tags between labels and input box"
|
379 |
+
msgstr "Agregar etiquetas <BR> entre las etiquetas y los campos de datos"
|
380 |
+
|
381 |
+
#: ../wpgform-post-type.php:228
|
382 |
+
msgid "CSS Prefix"
|
383 |
+
msgstr "Prefijo CSS"
|
384 |
+
|
385 |
+
#: ../wpgform-post-type.php:229
|
386 |
+
msgid "Prefix to add to all Google CSS classes"
|
387 |
+
msgstr "Prefijo a agregar a todas las clases CSS de Google"
|
388 |
+
|
389 |
+
#: ../wpgform-post-type.php:236
|
390 |
+
msgid "CSS Suffix"
|
391 |
+
msgstr "Sufijo CSS"
|
392 |
+
|
393 |
+
#: ../wpgform-post-type.php:237
|
394 |
+
msgid "Suffix to add to all Google CSS classes"
|
395 |
+
msgstr "Sufijo a agregar a todas las clases CSS de Google"
|
396 |
+
|
397 |
+
#: ../wpgform-post-type.php:244
|
398 |
+
msgid "Title"
|
399 |
+
msgstr "Nombre"
|
400 |
+
|
401 |
+
#: ../wpgform-post-type.php:245
|
402 |
+
msgid "Show or Hide the Google Form's title"
|
403 |
+
msgstr "Mostrar u ocultar el nombre del Formulario"
|
404 |
+
|
405 |
+
#: ../wpgform-post-type.php:253
|
406 |
+
msgid "Map H1 to H2"
|
407 |
+
msgstr "Mapear H1 a H2"
|
408 |
+
|
409 |
+
#: ../wpgform-post-type.php:254
|
410 |
+
msgid "Map H1 elements to H2 elements"
|
411 |
+
msgstr "Cambiar tipo de etiqueta de elementos H1 a H2"
|
412 |
+
|
413 |
+
#: ../wpgform-post-type.php:262
|
414 |
+
#: ../wpgform-post-type.php:263
|
415 |
+
msgid "Unite Theme Hack"
|
416 |
+
msgstr "Hack para tema Unite"
|
417 |
+
|
418 |
+
#: ../wpgform-post-type.php:291
|
419 |
+
msgid "Validation"
|
420 |
+
msgstr "Validación"
|
421 |
+
|
422 |
+
#: ../wpgform-post-type.php:292
|
423 |
+
msgid "Enable default jQuery Validation on all required fields"
|
424 |
+
msgstr "Habiliar validación jQuery por defecto en todos los campos obligatorios"
|
425 |
+
|
426 |
+
#: ../wpgform-post-type.php:300
|
427 |
+
msgid "Form Fields"
|
428 |
+
msgstr "Campos del formulario"
|
429 |
+
|
430 |
+
#: ../wpgform-post-type.php:301
|
431 |
+
msgid "Name of the field on the Google Form (e.g. entry.1.single, entry.12345678, etc.) - <a href=\"http://jqueryvalidation.org/rules\">Additional details on jQuery Rules</a>"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: ../wpgform-post-type.php:329
|
435 |
+
msgid "Type"
|
436 |
+
msgstr "Tipo"
|
437 |
+
|
438 |
+
#: ../wpgform-post-type.php:330
|
439 |
+
msgid "Type of validation"
|
440 |
+
msgstr "Tipo de validación"
|
441 |
+
|
442 |
+
#: ../wpgform-post-type.php:337
|
443 |
+
#: ../wpgform-post-type.php:484
|
444 |
+
#: ../wpgform-post-type.php:501
|
445 |
+
msgid "Value"
|
446 |
+
msgstr "Valor"
|
447 |
+
|
448 |
+
#: ../wpgform-post-type.php:338
|
449 |
+
msgid "Value to validate against"
|
450 |
+
msgstr "Valor contra el cual validar"
|
451 |
+
|
452 |
+
#: ../wpgform-post-type.php:474
|
453 |
+
msgid "Name"
|
454 |
+
msgstr "Nombre"
|
455 |
+
|
456 |
+
#: ../wpgform-post-type.php:477
|
457 |
+
#: ../wpgform-post-type.php:494
|
458 |
+
msgid "Check"
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
+
#: ../wpgform-post-type.php:492
|
462 |
+
msgid "Field"
|
463 |
+
msgstr "Campo"
|
464 |
+
|
465 |
+
#: ../wpgform-post-type.php:652
|
466 |
+
msgid "Form Name"
|
467 |
+
msgstr "Nombre"
|
468 |
+
|
469 |
+
#: ../wpgform-post-type.php:657
|
470 |
+
msgid "Short Code"
|
471 |
+
msgstr "Shortcode"
|
472 |
+
|
473 |
+
#: ../wpgform-post-type.php:658
|
474 |
+
msgid "Form Description"
|
475 |
+
msgstr "Descripción"
|
476 |
+
|
477 |
+
#: ../wpgform-post-type.php:748
|
478 |
+
msgid "Enter WordPress Google Form Title"
|
479 |
+
msgstr "Ingresa el nombre para el formulario en Wordpress"
|
480 |
+
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mpwalsh8
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DK4MS3AA983CC
|
4 |
Tags: Google Forms, Google Docs, Google, Spreadsheet, shortcode, forms
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 0.
|
8 |
|
9 |
Embeds a published, public Google Form in a WordPress post, page, or widget.
|
10 |
|
@@ -316,6 +316,15 @@ No known upgrade issues.
|
|
316 |
|
317 |
== Changelog ==
|
318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
= Version 0.55 =
|
320 |
Incporated a patch version of jQuery Columnizer to fix problem which appears in WordPress 3.6 which includes jQuery 1.10.
|
321 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DK4MS3AA983CC
|
4 |
Tags: Google Forms, Google Docs, Google, Spreadsheet, shortcode, forms
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 3.6
|
7 |
+
Stable tag: 0.56
|
8 |
|
9 |
Embeds a published, public Google Form in a WordPress post, page, or widget.
|
10 |
|
316 |
|
317 |
== Changelog ==
|
318 |
|
319 |
+
= Version 0.56 =
|
320 |
+
* Incorporated es_ES language support from TBD.
|
321 |
+
* Incpororated Transient support patch from TBD.
|
322 |
+
* Added support for UTF-8 characters in Google Forms.
|
323 |
+
* Resolved bug with embedded tabs in form response values.
|
324 |
+
* Improved handling of default settings for new form creation.
|
325 |
+
* Added multi-site support for Transients.
|
326 |
+
* Added support for the placeholder attribute on input tags.
|
327 |
+
|
328 |
= Version 0.55 =
|
329 |
Incporated a patch version of jQuery Columnizer to fix problem which appears in WordPress 3.6 which includes jQuery 1.10.
|
330 |
|
wpgform-core.php
CHANGED
@@ -26,6 +26,8 @@ define('WPGFORM_CONFIRM_LIGHTBOX', 'lightbox') ;
|
|
26 |
define('WPGFORM_CONFIRM_REDIRECT', 'redirect') ;
|
27 |
define('WPGFORM_CONFIRM_NONE', 'none') ;
|
28 |
define('WPGFORM_LOG_ENTRY_META_KEY', '_wpgform_log_entry') ;
|
|
|
|
|
29 |
|
30 |
// i18n plugin domain
|
31 |
define( 'WPGFORM_I18N_DOMAIN', 'wpgform' );
|
@@ -386,6 +388,8 @@ class wpGForm
|
|
386 |
'validation' => 'off', // Use jQuery validation for required fields
|
387 |
'unitethemehack' => 'off', // Send an email confirmation to blog admin on submission
|
388 |
'style' => null, // How to present the custom confirmation after submit
|
|
|
|
|
389 |
) ;
|
390 |
|
391 |
/**
|
@@ -505,8 +509,12 @@ class wpGForm
|
|
505 |
|
506 |
// get current form meta data fields
|
507 |
|
508 |
-
$fields = array_merge(
|
509 |
-
|
|
|
|
|
|
|
|
|
510 |
|
511 |
foreach ($fields as $field)
|
512 |
{
|
@@ -681,7 +689,6 @@ class wpGForm
|
|
681 |
if (!empty($wpgform_options['captcha_description']))
|
682 |
{
|
683 |
$captcha_html .= sprintf('<div class="wpgform-captcha-description">%s</div>', $wpgform_options['captcha_description']) ;
|
684 |
-
error_log(sprintf('%s::%s', basename(__FILE__), __LINE__)) ;
|
685 |
}
|
686 |
|
687 |
$captcha_html .= '</div>' ;
|
@@ -726,6 +733,10 @@ class wpGForm
|
|
726 |
// Show the custom confirmation via AJAX instead of redirect?
|
727 |
$style = $o['style'] === 'none' ? null : $o['style'] ;
|
728 |
|
|
|
|
|
|
|
|
|
729 |
// WordPress converts all of the ampersand characters to their
|
730 |
// appropriate HTML entity or some variety of it. Need to undo
|
731 |
// that so the URL can be actually be used.
|
@@ -740,9 +751,28 @@ class wpGForm
|
|
740 |
|
741 |
if (!self::$posted)
|
742 |
{
|
743 |
-
|
744 |
-
|
745 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
}
|
747 |
|
748 |
// Retrieve the HTML from the URL
|
@@ -761,6 +791,13 @@ class wpGForm
|
|
761 |
wpgform_preprint_r(self::$response) ;
|
762 |
}
|
763 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
764 |
return sprintf('<div class="wpgform-google-error gform-google-error">%s</div>',
|
765 |
__('Unable to retrieve Google Form. Please try reloading this page.', WPGFORM_I18N_DOMAIN)) ;
|
766 |
|
@@ -904,6 +941,31 @@ class wpGForm
|
|
904 |
$wgformid = self::$wpgform_form_id++ ;
|
905 |
}
|
906 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
// The Unite theme from Paralleus mucks with the submit buttons
|
908 |
// which breaks the ability to submit the form to Google correctly.
|
909 |
// This hack will "unbreak" the submit buttons.
|
@@ -931,12 +993,11 @@ class wpGForm
|
|
931 |
if (($wpgform_options['custom_css'] == 1) && !empty($o['form_css']))
|
932 |
$css .= '<style>' . $o['form_css'] . '</style>' ;
|
933 |
|
934 |
-
// Tidy up
|
935 |
$patterns = array('/[\r\n]+/', '/ +/') ;
|
936 |
$replacements = array('', ' ') ;
|
937 |
$css = preg_replace($patterns, $replacements, $css) . PHP_EOL ;
|
938 |
|
939 |
-
|
940 |
// Output Javscript for form validation, make sure any class prefix is included
|
941 |
// Need to fix the name arguments for checkboxes so PHP will pass them as an array correctly.
|
942 |
// This jQuery script reformats the checkboxes so that Googles Python script will read them.
|
@@ -1280,6 +1341,8 @@ jQuery(document).ready(function($) {
|
|
1280 |
*/
|
1281 |
function ProcessGoogleForm()
|
1282 |
{
|
|
|
|
|
1283 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1284 |
if (WPGFORM_DEBUG) wpgform_preprint_r($_POST) ;
|
1285 |
if (!empty($_POST) && array_key_exists('wpgform-action', $_POST))
|
@@ -1344,7 +1407,9 @@ jQuery(document).ready(function($) {
|
|
1344 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1345 |
$pa = &$_POST[$key] ;
|
1346 |
foreach ($pa as $pv)
|
|
|
1347 |
$body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($pv) . '&' ;
|
|
|
1348 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1349 |
}
|
1350 |
else if ($key === 'draftResponse')
|
@@ -1352,7 +1417,13 @@ jQuery(document).ready(function($) {
|
|
1352 |
// draftResponse is a special parameter for multi-page forms and needs
|
1353 |
// some special processing. We need to remove the escapes on double quotes.
|
1354 |
|
1355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1356 |
|
1357 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1358 |
$body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($value) . '&' ;
|
@@ -1372,7 +1443,9 @@ jQuery(document).ready(function($) {
|
|
1372 |
// appropriate HTML entity or some variety of it. Need to undo
|
1373 |
// that so the URL can be actually be used.
|
1374 |
|
1375 |
-
|
|
|
|
|
1376 |
$action = str_replace(array('&','&','&'), '&', $action) ;
|
1377 |
|
1378 |
if (WPGFORM_DEBUG)
|
26 |
define('WPGFORM_CONFIRM_REDIRECT', 'redirect') ;
|
27 |
define('WPGFORM_CONFIRM_NONE', 'none') ;
|
28 |
define('WPGFORM_LOG_ENTRY_META_KEY', '_wpgform_log_entry') ;
|
29 |
+
define('WPGFORM_FORM_TRANSIENT', 'wpgform_form_response') ;
|
30 |
+
define('WPGFORM_FORM_TRANSIENT_EXPIRE', 5) ;
|
31 |
|
32 |
// i18n plugin domain
|
33 |
define( 'WPGFORM_I18N_DOMAIN', 'wpgform' );
|
388 |
'validation' => 'off', // Use jQuery validation for required fields
|
389 |
'unitethemehack' => 'off', // Send an email confirmation to blog admin on submission
|
390 |
'style' => null, // How to present the custom confirmation after submit
|
391 |
+
'use_transient' => false, // Toogles the use of WP Transient API for form caching
|
392 |
+
'transient_time' => WPGFORM_FORM_TRANSIENT_EXPIRE, // Sets how long (in minutes) the forms will be cached using WP Transient
|
393 |
) ;
|
394 |
|
395 |
/**
|
509 |
|
510 |
// get current form meta data fields
|
511 |
|
512 |
+
$fields = array_merge(
|
513 |
+
wpgform_primary_meta_box_content(true),
|
514 |
+
wpgform_secondary_meta_box_content(true),
|
515 |
+
wpgform_validation_meta_box_content(true),
|
516 |
+
wpgform_placeholder_meta_box_content(true)
|
517 |
+
) ;
|
518 |
|
519 |
foreach ($fields as $field)
|
520 |
{
|
689 |
if (!empty($wpgform_options['captcha_description']))
|
690 |
{
|
691 |
$captcha_html .= sprintf('<div class="wpgform-captcha-description">%s</div>', $wpgform_options['captcha_description']) ;
|
|
|
692 |
}
|
693 |
|
694 |
$captcha_html .= '</div>' ;
|
733 |
// Show the custom confirmation via AJAX instead of redirect?
|
734 |
$style = $o['style'] === 'none' ? null : $o['style'] ;
|
735 |
|
736 |
+
// Use WP Transient API Cache?
|
737 |
+
$use_transient = $o['use_transient'] === 'on';
|
738 |
+
$transient_time = $o['transient_time'];
|
739 |
+
|
740 |
// WordPress converts all of the ampersand characters to their
|
741 |
// appropriate HTML entity or some variety of it. Need to undo
|
742 |
// that so the URL can be actually be used.
|
751 |
|
752 |
if (!self::$posted)
|
753 |
{
|
754 |
+
if ($use_transient && is_multisite())
|
755 |
+
{
|
756 |
+
if (false === ( self::$response = get_site_transient( WPGFORM_FORM_TRANSIENT.$o['id'] ) ) )
|
757 |
+
{
|
758 |
+
// There was no transient, so let's regenerate the data and save it
|
759 |
+
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12)) ;
|
760 |
+
set_site_transient( WPGFORM_FORM_TRANSIENT.$o['id'], self::$response, $transient_time*MINUTE_IN_SECONDS );
|
761 |
+
}
|
762 |
+
}
|
763 |
+
elseif ($use_transient && !is_multisite())
|
764 |
+
{
|
765 |
+
if (false === ( self::$response = get_transient( WPGFORM_FORM_TRANSIENT.$o['id'] ) ) )
|
766 |
+
{
|
767 |
+
// There was no transient, so let's regenerate the data and save it
|
768 |
+
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12)) ;
|
769 |
+
set_transient( WPGFORM_FORM_TRANSIENT.$o['id'], self::$response, $transient_time*MINUTE_IN_SECONDS );
|
770 |
+
}
|
771 |
+
}
|
772 |
+
else
|
773 |
+
{
|
774 |
+
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12)) ;
|
775 |
+
}
|
776 |
}
|
777 |
|
778 |
// Retrieve the HTML from the URL
|
791 |
wpgform_preprint_r(self::$response) ;
|
792 |
}
|
793 |
|
794 |
+
// Clean up the transient if an error is encountered
|
795 |
+
|
796 |
+
if ($use_transient && is_multisite())
|
797 |
+
delete_site_transient(WPGFORM_FORM_TRANSIENT . $o['id']);
|
798 |
+
elseif ($use_transient)
|
799 |
+
delete_transient(WPGFORM_FORM_TRANSIENT . $o['id']);
|
800 |
+
|
801 |
return sprintf('<div class="wpgform-google-error gform-google-error">%s</div>',
|
802 |
__('Unable to retrieve Google Form. Please try reloading this page.', WPGFORM_I18N_DOMAIN)) ;
|
803 |
|
941 |
$wgformid = self::$wpgform_form_id++ ;
|
942 |
}
|
943 |
|
944 |
+
// Handle and "placeholders"
|
945 |
+
|
946 |
+
$fields = wpgform_placeholder_meta_box_content(true) ;
|
947 |
+
|
948 |
+
foreach ($fields as $field)
|
949 |
+
{
|
950 |
+
if ('placeholder' == $field['type'])
|
951 |
+
{
|
952 |
+
$meta_field = get_post_meta($o['id'], $field['id'], true);
|
953 |
+
$meta_type = get_post_meta($o['id'], $field['type_id'], true);
|
954 |
+
$meta_value = get_post_meta($o['id'], $field['value_id'], true);
|
955 |
+
|
956 |
+
if (!empty($meta_field)) {
|
957 |
+
foreach ($meta_field as $key => $value)
|
958 |
+
{
|
959 |
+
$pattern = sprintf('/name="%s"/', $meta_field[$key]) ;
|
960 |
+
$replacement = sprintf('name="%s" placeholder="%s"',
|
961 |
+
$meta_field[$key], $meta_value[$key]) ;
|
962 |
+
$html = preg_replace($pattern, $replacement, $html) ;
|
963 |
+
}
|
964 |
+
}
|
965 |
+
}
|
966 |
+
}
|
967 |
+
|
968 |
+
|
969 |
// The Unite theme from Paralleus mucks with the submit buttons
|
970 |
// which breaks the ability to submit the form to Google correctly.
|
971 |
// This hack will "unbreak" the submit buttons.
|
993 |
if (($wpgform_options['custom_css'] == 1) && !empty($o['form_css']))
|
994 |
$css .= '<style>' . $o['form_css'] . '</style>' ;
|
995 |
|
996 |
+
// Tidy up CSS to ensure it isn't affected by 'the_content' filters
|
997 |
$patterns = array('/[\r\n]+/', '/ +/') ;
|
998 |
$replacements = array('', ' ') ;
|
999 |
$css = preg_replace($patterns, $replacements, $css) . PHP_EOL ;
|
1000 |
|
|
|
1001 |
// Output Javscript for form validation, make sure any class prefix is included
|
1002 |
// Need to fix the name arguments for checkboxes so PHP will pass them as an array correctly.
|
1003 |
// This jQuery script reformats the checkboxes so that Googles Python script will read them.
|
1341 |
*/
|
1342 |
function ProcessGoogleForm()
|
1343 |
{
|
1344 |
+
$tabFound = false ;
|
1345 |
+
|
1346 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1347 |
if (WPGFORM_DEBUG) wpgform_preprint_r($_POST) ;
|
1348 |
if (!empty($_POST) && array_key_exists('wpgform-action', $_POST))
|
1407 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1408 |
$pa = &$_POST[$key] ;
|
1409 |
foreach ($pa as $pv)
|
1410 |
+
{
|
1411 |
$body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($pv) . '&' ;
|
1412 |
+
}
|
1413 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1414 |
}
|
1415 |
else if ($key === 'draftResponse')
|
1417 |
// draftResponse is a special parameter for multi-page forms and needs
|
1418 |
// some special processing. We need to remove the escapes on double quotes.
|
1419 |
|
1420 |
+
$patterns = array('/\\\"/', '/\\\t/') ;
|
1421 |
+
$replacements = array('"', 't') ;
|
1422 |
+
|
1423 |
+
//$value = preg_replace('/\\\"/', '"', $value) ;
|
1424 |
+
//$value = preg_replace('/\\\t/', 't', $value) ;
|
1425 |
+
|
1426 |
+
$value = preg_replace($patterns, $replacements, $value) ;
|
1427 |
|
1428 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1429 |
$body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($value) . '&' ;
|
1443 |
// appropriate HTML entity or some variety of it. Need to undo
|
1444 |
// that so the URL can be actually be used.
|
1445 |
|
1446 |
+
|
1447 |
+
//$body = stripslashes_deep(urldecode($body)) ;
|
1448 |
+
$body = stripslashes_deep($body) ;
|
1449 |
$action = str_replace(array('&','&','&'), '&', $action) ;
|
1450 |
|
1451 |
if (WPGFORM_DEBUG)
|
wpgform-post-type.php
CHANGED
@@ -130,7 +130,8 @@ function wpgform_primary_meta_box_content($fieldsonly = false)
|
|
130 |
'desc' => __('Send email upon form submission', WPGFORM_I18N_DOMAIN),
|
131 |
'id' => WPGFORM_PREFIX . 'email',
|
132 |
'type' => 'radio',
|
133 |
-
'options' => array('On', 'Off'),
|
|
|
134 |
'required' => false,
|
135 |
'br' => false
|
136 |
),
|
@@ -150,6 +151,34 @@ function wpgform_primary_meta_box_content($fieldsonly = false)
|
|
150 |
'std' => '',
|
151 |
'required' => false
|
152 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
)
|
154 |
) ;
|
155 |
|
@@ -175,7 +204,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
175 |
'desc' => __('CAPTCHA', WPGFORM_I18N_DOMAIN),
|
176 |
'id' => WPGFORM_PREFIX . 'captcha',
|
177 |
'type' => 'radio',
|
178 |
-
'options' => array('On', 'Off'),
|
|
|
179 |
'required' => false,
|
180 |
'br' => false
|
181 |
),
|
@@ -193,7 +223,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
193 |
'desc' => __('Send email to end user upon form submission', WPGFORM_I18N_DOMAIN),
|
194 |
'id' => WPGFORM_PREFIX . 'user_email',
|
195 |
'type' => 'radio',
|
196 |
-
'options' => array('On', 'Off'),
|
|
|
197 |
'required' => false,
|
198 |
'br' => false
|
199 |
),
|
@@ -202,7 +233,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
202 |
'desc' => __('Google Legal Disclaimer', WPGFORM_I18N_DOMAIN),
|
203 |
'id' => WPGFORM_PREFIX . 'legal',
|
204 |
'type' => 'radio',
|
205 |
-
'options' => array('On', 'Off'),
|
|
|
206 |
'required' => false,
|
207 |
'br' => false
|
208 |
),
|
@@ -211,7 +243,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
211 |
'desc' => __('Set the form Read Only', WPGFORM_I18N_DOMAIN),
|
212 |
'id' => WPGFORM_PREFIX . 'readonly',
|
213 |
'type' => 'radio',
|
214 |
-
'options' => array('On', 'Off'),
|
|
|
215 |
'required' => false,
|
216 |
'br' => false
|
217 |
),
|
@@ -220,7 +253,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
220 |
'desc' => __('Insert <BR> tags between labels and input box', WPGFORM_I18N_DOMAIN),
|
221 |
'id' => WPGFORM_PREFIX . 'br',
|
222 |
'type' => 'radio',
|
223 |
-
'options' => array('On', 'Off'),
|
|
|
224 |
'required' => false,
|
225 |
'br' => false
|
226 |
),
|
@@ -245,7 +279,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
245 |
'desc' => __('Show or Hide the Google Form\'s title', WPGFORM_I18N_DOMAIN),
|
246 |
'id' => WPGFORM_PREFIX . 'title',
|
247 |
'type' => 'radio',
|
248 |
-
'options' => array('On', 'Off'),
|
|
|
249 |
'required' => false,
|
250 |
'br' => false
|
251 |
),
|
@@ -254,7 +289,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
254 |
'desc' => __('Map H1 elements to H2 elements', WPGFORM_I18N_DOMAIN),
|
255 |
'id' => WPGFORM_PREFIX . 'maph1h2',
|
256 |
'type' => 'radio',
|
257 |
-
'options' => array('On', 'Off'),
|
|
|
258 |
'required' => false,
|
259 |
'br' => false
|
260 |
),
|
@@ -263,7 +299,8 @@ function wpgform_secondary_meta_box_content($fieldsonly = false)
|
|
263 |
'desc' => __('Unite Theme Hack', WPGFORM_I18N_DOMAIN),
|
264 |
'id' => WPGFORM_PREFIX . 'unitethemehack',
|
265 |
'type' => 'radio',
|
266 |
-
'options' => array('On', 'Off'),
|
|
|
267 |
'required' => false,
|
268 |
'br' => false
|
269 |
),
|
@@ -292,7 +329,8 @@ function wpgform_validation_meta_box_content($fieldsonly = false)
|
|
292 |
'desc' => __('Enable default jQuery Validation on all required fields', WPGFORM_I18N_DOMAIN),
|
293 |
'id' => WPGFORM_PREFIX . 'validation',
|
294 |
'type' => 'radio',
|
295 |
-
'options' => array('On', 'Off'),
|
|
|
296 |
'required' => false,
|
297 |
'br' => false
|
298 |
),
|
@@ -347,6 +385,45 @@ function wpgform_validation_meta_box_content($fieldsonly = false)
|
|
347 |
return $fieldsonly ? $content['fields'] : $content ;
|
348 |
}
|
349 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
add_action('admin_menu', 'wpgform_add_primary_meta_box') ;
|
351 |
//add_action('admin_menu', 'wpgform_add_player_profile_meta_box') ;
|
352 |
|
@@ -367,6 +444,11 @@ function wpgform_add_primary_meta_box()
|
|
367 |
|
368 |
add_meta_box($mb['id'], $mb['title'],
|
369 |
'wpgform_show_validation_meta_box', $mb['page'], $mb['context'], $mb['priority']);
|
|
|
|
|
|
|
|
|
|
|
370 |
}
|
371 |
|
372 |
// Callback function to show fields in meta box
|
@@ -390,6 +472,13 @@ function wpgform_show_validation_meta_box()
|
|
390 |
wpgform_build_meta_box($mb) ;
|
391 |
}
|
392 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
/**
|
394 |
* Build meta box form
|
395 |
*
|
@@ -448,16 +537,17 @@ function wpgform_build_meta_box($mb)
|
|
448 |
|
449 |
case 'radio':
|
450 |
foreach ($field['options'] as $option => $value) {
|
451 |
-
echo '<input type="radio" name="', $field['id'], '" value="', strtolower($value), '"', $meta == strtolower($value) ? ' checked="checked"' : '', ' /> ', $value, $field['br'] === true ? '<br />' : ' ';
|
452 |
}
|
453 |
echo '<br />', '<small>', $field['desc'], '</small>';
|
454 |
break;
|
455 |
|
456 |
case 'checkbox':
|
457 |
-
echo '<input type="checkbox" name="', $field['id'], '" id="', $field['id'], '"', $meta ? ' checked="checked"' : '', ' />';
|
458 |
break;
|
459 |
|
460 |
case 'validation':
|
|
|
461 |
$meta_field = get_post_meta($post->ID, $field['id'], true);
|
462 |
$meta_type = get_post_meta($post->ID, $field['type_id'], true);
|
463 |
$meta_value = get_post_meta($post->ID, $field['value_id'], true);
|
@@ -474,14 +564,19 @@ function wpgform_build_meta_box($mb)
|
|
474 |
printf('<label for="%s">%s: </label>', $field['id'].'['.$i.']', __('Name', WPGFORM_I18N_DOMAIN)) ;
|
475 |
echo '<input type="text" name="'.$field['id'].'['.$i.']" id="'.$field['id'].'" value="'.$meta_field[$key].'" size="30" />' ;
|
476 |
|
|
|
477 |
printf('<label for="%s"> %s: </label>', $field['type_id'].'['.$i.']', __('Check', WPGFORM_I18N_DOMAIN)) ;
|
478 |
echo '<select name="', $field['type_id'].'['.$i.']', '" id="', $field['type_id'], '">';
|
479 |
foreach ($field['options'] as $option) {
|
480 |
echo '<option ', $meta_type[$key] == $option ? 'selected="selected" ' : '', 'value="', $option, '">', $option . ' ', '</option>';
|
481 |
}
|
482 |
echo '</select>';
|
|
|
483 |
|
484 |
-
|
|
|
|
|
|
|
485 |
echo '<input type="text" name="'.$field['value_id'].'['.$i.']" id="'.$field['value_id'].'" value="'.$meta_value[$key].'" size="15" />' ;
|
486 |
echo '<a class="repeatable-remove button" href="#">-</a></li>';
|
487 |
|
@@ -491,14 +586,19 @@ function wpgform_build_meta_box($mb)
|
|
491 |
echo '<li>' ;
|
492 |
printf('<label for="%s">%s: </label>', $field['id'].'['.$i.']', __('Field', WPGFORM_I18N_DOMAIN)) ;
|
493 |
echo '<input type="text" name="'.$field['id'].'['.$i.']" id="'.$field['id'].'" value="" size="30" />' ;
|
|
|
494 |
printf('<label for="%s"> %s: </label>', $field['type_id'].'['.$i.']', __('Check', WPGFORM_I18N_DOMAIN)) ;
|
495 |
echo '<select name="', $field['type_id'].'['.$i.']', '" id="', $field['type_id'], '">';
|
496 |
foreach ($field['options'] as $option) {
|
497 |
echo '<option value="', $option, '">', $option . ' ', '</option>';
|
498 |
}
|
499 |
echo '</select>';
|
|
|
500 |
|
501 |
-
|
|
|
|
|
|
|
502 |
echo '<input type="text" name="'.$field['value_id'].'['.$i.']" id="'.$field['value_id'].'" value="" size="15" />' ;
|
503 |
echo '<a class="repeatable-remove button" href="#">-</a></li>';
|
504 |
}
|
@@ -518,7 +618,6 @@ function wpgform_build_meta_box($mb)
|
|
518 |
}
|
519 |
|
520 |
add_action( 'quick_edit_custom_box', 'wpgform_add_quick_edit_nonce', 10, 2 );
|
521 |
-
//add_action( 'quick_edit_custom_box', function() { error_log(__LINE__) ; }, 10, 2 );
|
522 |
/**
|
523 |
* Action to add a nonce to the quick edit form for the custom post types
|
524 |
*
|
@@ -581,8 +680,12 @@ function wpgform_save_meta_box_data($post_id)
|
|
581 |
// return if the post isn't a CPT which shouldn't happen
|
582 |
|
583 |
if (get_post_type($post_id) == WPGFORM_CPT_FORM)
|
584 |
-
$fields = array_merge(
|
585 |
-
|
|
|
|
|
|
|
|
|
586 |
else
|
587 |
return $post_id ;
|
588 |
|
@@ -591,7 +694,6 @@ function wpgform_save_meta_box_data($post_id)
|
|
591 |
// updated and CPT fields are ignored in Quick Edit except for
|
592 |
// the Short URL field.
|
593 |
|
594 |
-
//wpgform_preprint_r($_POST) ;
|
595 |
foreach ($fields as $field)
|
596 |
{
|
597 |
// Only update other Post Meta fields when on the edit screen - ignore in quick edit mode
|
@@ -606,16 +708,24 @@ function wpgform_save_meta_box_data($post_id)
|
|
606 |
|
607 |
if ($new && $new != $old)
|
608 |
{
|
609 |
-
//wpgform_whereami(__FILE__, __LINE__);
|
610 |
update_post_meta($post_id, $field['id'], $new) ;
|
611 |
}
|
612 |
elseif ('' == $new && $old)
|
613 |
{
|
614 |
-
//wpgform_whereami(__FILE__, __LINE__);
|
615 |
delete_post_meta($post_id, $field['id'], $old) ;
|
616 |
}
|
617 |
else
|
618 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
//wpgform_whereami(__FILE__, __LINE__);
|
620 |
}
|
621 |
}
|
130 |
'desc' => __('Send email upon form submission', WPGFORM_I18N_DOMAIN),
|
131 |
'id' => WPGFORM_PREFIX . 'email',
|
132 |
'type' => 'radio',
|
133 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
134 |
+
'std' => 'off',
|
135 |
'required' => false,
|
136 |
'br' => false
|
137 |
),
|
151 |
'std' => '',
|
152 |
'required' => false
|
153 |
),
|
154 |
+
array(
|
155 |
+
'name' => __('Form Caching', WPGFORM_I18N_DOMAIN),
|
156 |
+
'desc' => __('Enable Form Caching using Wordpress Transient API', WPGFORM_I18N_DOMAIN),
|
157 |
+
'id' => WPGFORM_PREFIX . 'use_transient',
|
158 |
+
'type' => 'radio',
|
159 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
160 |
+
'std' => 'off',
|
161 |
+
'required' => false,
|
162 |
+
'br' => false
|
163 |
+
),
|
164 |
+
array(
|
165 |
+
'name' => __('Form Caching Timeout', WPGFORM_I18N_DOMAIN),
|
166 |
+
'desc' => __('How often will the forms reloaded (in minutes)', WPGFORM_I18N_DOMAIN),
|
167 |
+
'id' => WPGFORM_PREFIX . 'transient_time',
|
168 |
+
'type' => 'smtext',
|
169 |
+
'std' => WPGFORM_FORM_TRANSIENT_EXPIRE,
|
170 |
+
'required' => false,
|
171 |
+
'br' => false
|
172 |
+
),
|
173 |
+
array(
|
174 |
+
'name' => __('Reset Form Cache?', WPGFORM_I18N_DOMAIN),
|
175 |
+
'desc' => __('This will force reloading the form from Google Drive', WPGFORM_I18N_DOMAIN),
|
176 |
+
'id' => WPGFORM_PREFIX . 'transient_reset',
|
177 |
+
'type' => 'checkbox',
|
178 |
+
'label' => 'Flush the Transient to force reload of the form from Google Drive',
|
179 |
+
'required' => false,
|
180 |
+
'br' => false
|
181 |
+
),
|
182 |
)
|
183 |
) ;
|
184 |
|
204 |
'desc' => __('CAPTCHA', WPGFORM_I18N_DOMAIN),
|
205 |
'id' => WPGFORM_PREFIX . 'captcha',
|
206 |
'type' => 'radio',
|
207 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
208 |
+
'std' => 'off',
|
209 |
'required' => false,
|
210 |
'br' => false
|
211 |
),
|
223 |
'desc' => __('Send email to end user upon form submission', WPGFORM_I18N_DOMAIN),
|
224 |
'id' => WPGFORM_PREFIX . 'user_email',
|
225 |
'type' => 'radio',
|
226 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
227 |
+
'std' => 'off',
|
228 |
'required' => false,
|
229 |
'br' => false
|
230 |
),
|
233 |
'desc' => __('Google Legal Disclaimer', WPGFORM_I18N_DOMAIN),
|
234 |
'id' => WPGFORM_PREFIX . 'legal',
|
235 |
'type' => 'radio',
|
236 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
237 |
+
'std' => 'off',
|
238 |
'required' => false,
|
239 |
'br' => false
|
240 |
),
|
243 |
'desc' => __('Set the form Read Only', WPGFORM_I18N_DOMAIN),
|
244 |
'id' => WPGFORM_PREFIX . 'readonly',
|
245 |
'type' => 'radio',
|
246 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
247 |
+
'std' => 'off',
|
248 |
'required' => false,
|
249 |
'br' => false
|
250 |
),
|
253 |
'desc' => __('Insert <BR> tags between labels and input box', WPGFORM_I18N_DOMAIN),
|
254 |
'id' => WPGFORM_PREFIX . 'br',
|
255 |
'type' => 'radio',
|
256 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
257 |
+
'std' => 'off',
|
258 |
'required' => false,
|
259 |
'br' => false
|
260 |
),
|
279 |
'desc' => __('Show or Hide the Google Form\'s title', WPGFORM_I18N_DOMAIN),
|
280 |
'id' => WPGFORM_PREFIX . 'title',
|
281 |
'type' => 'radio',
|
282 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
283 |
+
'std' => 'off',
|
284 |
'required' => false,
|
285 |
'br' => false
|
286 |
),
|
289 |
'desc' => __('Map H1 elements to H2 elements', WPGFORM_I18N_DOMAIN),
|
290 |
'id' => WPGFORM_PREFIX . 'maph1h2',
|
291 |
'type' => 'radio',
|
292 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
293 |
+
'std' => 'off',
|
294 |
'required' => false,
|
295 |
'br' => false
|
296 |
),
|
299 |
'desc' => __('Unite Theme Hack', WPGFORM_I18N_DOMAIN),
|
300 |
'id' => WPGFORM_PREFIX . 'unitethemehack',
|
301 |
'type' => 'radio',
|
302 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
303 |
+
'std' => 'off',
|
304 |
'required' => false,
|
305 |
'br' => false
|
306 |
),
|
329 |
'desc' => __('Enable default jQuery Validation on all required fields', WPGFORM_I18N_DOMAIN),
|
330 |
'id' => WPGFORM_PREFIX . 'validation',
|
331 |
'type' => 'radio',
|
332 |
+
'options' => array('on' => __('On', WPGFORM_I18N_DOMAIN), 'off' => __('Off', WPGFORM_I18N_DOMAIN)),
|
333 |
+
'std' => 'off',
|
334 |
'required' => false,
|
335 |
'br' => false
|
336 |
),
|
385 |
return $fieldsonly ? $content['fields'] : $content ;
|
386 |
}
|
387 |
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Define the WordPress Google Form Preset Meta Box fields so they
|
391 |
+
* can be used to construct the form as well as validate and save it.
|
392 |
+
*
|
393 |
+
*/
|
394 |
+
function wpgform_placeholder_meta_box_content($fieldsonly = false)
|
395 |
+
{
|
396 |
+
$content = array(
|
397 |
+
'id' => 'wpgform-placeholder-meta-box',
|
398 |
+
'title' => 'Google Form Field Placeholder',
|
399 |
+
'page' => WPGFORM_CPT_FORM,
|
400 |
+
'context' => 'normal',
|
401 |
+
'priority' => 'high',
|
402 |
+
'fields' => array(
|
403 |
+
array(
|
404 |
+
'name' => __('Form Fields', WPGFORM_I18N_DOMAIN),
|
405 |
+
'desc' => __('Name of the field on the Google Form (e.g. entry.1.single, entry.12345678, etc.) - <a href="http://www.w3schools.com/tags/att_input_placeholder.asp">Additional details on Placeholders</a>', WPGFORM_I18N_DOMAIN),
|
406 |
+
'id' => WPGFORM_PREFIX . 'placeholder_field_name',
|
407 |
+
'type' => 'placeholder',
|
408 |
+
'std' => '',
|
409 |
+
'required' => true,
|
410 |
+
'type_id' => WPGFORM_PREFIX . 'placeholder_field_type',
|
411 |
+
'value_id' => WPGFORM_PREFIX . 'placeholder_field_value',
|
412 |
+
),
|
413 |
+
array(
|
414 |
+
'name' => __('Value', WPGFORM_I18N_DOMAIN),
|
415 |
+
'desc' => __('Value to validate against', WPGFORM_I18N_DOMAIN),
|
416 |
+
'id' => WPGFORM_PREFIX . 'placeholder_field_value',
|
417 |
+
'type' => 'hidden',
|
418 |
+
'std' => '',
|
419 |
+
'required' => true
|
420 |
+
),
|
421 |
+
)
|
422 |
+
) ;
|
423 |
+
|
424 |
+
return $fieldsonly ? $content['fields'] : $content ;
|
425 |
+
}
|
426 |
+
|
427 |
add_action('admin_menu', 'wpgform_add_primary_meta_box') ;
|
428 |
//add_action('admin_menu', 'wpgform_add_player_profile_meta_box') ;
|
429 |
|
444 |
|
445 |
add_meta_box($mb['id'], $mb['title'],
|
446 |
'wpgform_show_validation_meta_box', $mb['page'], $mb['context'], $mb['priority']);
|
447 |
+
|
448 |
+
$mb = wpgform_placeholder_meta_box_content() ;
|
449 |
+
|
450 |
+
add_meta_box($mb['id'], $mb['title'],
|
451 |
+
'wpgform_show_placeholder_meta_box', $mb['page'], $mb['context'], $mb['priority']);
|
452 |
}
|
453 |
|
454 |
// Callback function to show fields in meta box
|
472 |
wpgform_build_meta_box($mb) ;
|
473 |
}
|
474 |
|
475 |
+
|
476 |
+
// Callback function to show placeholder in meta box
|
477 |
+
function wpgform_show_placeholder_meta_box()
|
478 |
+
{
|
479 |
+
$mb = wpgform_placeholder_meta_box_content() ;
|
480 |
+
wpgform_build_meta_box($mb) ;
|
481 |
+
}
|
482 |
/**
|
483 |
* Build meta box form
|
484 |
*
|
537 |
|
538 |
case 'radio':
|
539 |
foreach ($field['options'] as $option => $value) {
|
540 |
+
echo '<input type="radio" name="', $field['id'], '" value="', strtolower($value), '"', $meta == strtolower($value) ? ' checked="checked"' : empty($meta) && $field['std'] === $option ? ' checked="checked"' : '', ' /> ', $value, $field['br'] === true ? '<br />' : ' ';
|
541 |
}
|
542 |
echo '<br />', '<small>', $field['desc'], '</small>';
|
543 |
break;
|
544 |
|
545 |
case 'checkbox':
|
546 |
+
echo '<span><input type="checkbox" name="', $field['id'], '" id="', $field['id'], '"', $meta ? ' checked="checked"' : '', ' />', ' ', $field['label'], '</span>';
|
547 |
break;
|
548 |
|
549 |
case 'validation':
|
550 |
+
case 'placeholder':
|
551 |
$meta_field = get_post_meta($post->ID, $field['id'], true);
|
552 |
$meta_type = get_post_meta($post->ID, $field['type_id'], true);
|
553 |
$meta_value = get_post_meta($post->ID, $field['value_id'], true);
|
564 |
printf('<label for="%s">%s: </label>', $field['id'].'['.$i.']', __('Name', WPGFORM_I18N_DOMAIN)) ;
|
565 |
echo '<input type="text" name="'.$field['id'].'['.$i.']" id="'.$field['id'].'" value="'.$meta_field[$key].'" size="30" />' ;
|
566 |
|
567 |
+
if ('validation' === $field['type']) {
|
568 |
printf('<label for="%s"> %s: </label>', $field['type_id'].'['.$i.']', __('Check', WPGFORM_I18N_DOMAIN)) ;
|
569 |
echo '<select name="', $field['type_id'].'['.$i.']', '" id="', $field['type_id'], '">';
|
570 |
foreach ($field['options'] as $option) {
|
571 |
echo '<option ', $meta_type[$key] == $option ? 'selected="selected" ' : '', 'value="', $option, '">', $option . ' ', '</option>';
|
572 |
}
|
573 |
echo '</select>';
|
574 |
+
}
|
575 |
|
576 |
+
if ('validation' === $field['type'])
|
577 |
+
printf('<i><label for="%s"> %s: </label></i>', $field['value_id'].'['.$i.']', __('Value', WPGFORM_I18N_DOMAIN)) ;
|
578 |
+
else
|
579 |
+
printf('<label for="%s"> %s: </label>', $field['value_id'].'['.$i.']', __('Value', WPGFORM_I18N_DOMAIN)) ;
|
580 |
echo '<input type="text" name="'.$field['value_id'].'['.$i.']" id="'.$field['value_id'].'" value="'.$meta_value[$key].'" size="15" />' ;
|
581 |
echo '<a class="repeatable-remove button" href="#">-</a></li>';
|
582 |
|
586 |
echo '<li>' ;
|
587 |
printf('<label for="%s">%s: </label>', $field['id'].'['.$i.']', __('Field', WPGFORM_I18N_DOMAIN)) ;
|
588 |
echo '<input type="text" name="'.$field['id'].'['.$i.']" id="'.$field['id'].'" value="" size="30" />' ;
|
589 |
+
if ('validation' === $field['type']) {
|
590 |
printf('<label for="%s"> %s: </label>', $field['type_id'].'['.$i.']', __('Check', WPGFORM_I18N_DOMAIN)) ;
|
591 |
echo '<select name="', $field['type_id'].'['.$i.']', '" id="', $field['type_id'], '">';
|
592 |
foreach ($field['options'] as $option) {
|
593 |
echo '<option value="', $option, '">', $option . ' ', '</option>';
|
594 |
}
|
595 |
echo '</select>';
|
596 |
+
}
|
597 |
|
598 |
+
if ('validation' === $field['type'])
|
599 |
+
printf('<i><label for="%s"> %s: </label></i>', $field['value_id'].'['.$i.']', __('Value', WPGFORM_I18N_DOMAIN)) ;
|
600 |
+
else
|
601 |
+
printf('<label for="%s"> %s: </label>', $field['value_id'].'['.$i.']', __('Value', WPGFORM_I18N_DOMAIN)) ;
|
602 |
echo '<input type="text" name="'.$field['value_id'].'['.$i.']" id="'.$field['value_id'].'" value="" size="15" />' ;
|
603 |
echo '<a class="repeatable-remove button" href="#">-</a></li>';
|
604 |
}
|
618 |
}
|
619 |
|
620 |
add_action( 'quick_edit_custom_box', 'wpgform_add_quick_edit_nonce', 10, 2 );
|
|
|
621 |
/**
|
622 |
* Action to add a nonce to the quick edit form for the custom post types
|
623 |
*
|
680 |
// return if the post isn't a CPT which shouldn't happen
|
681 |
|
682 |
if (get_post_type($post_id) == WPGFORM_CPT_FORM)
|
683 |
+
$fields = array_merge(
|
684 |
+
wpgform_primary_meta_box_content(true),
|
685 |
+
wpgform_secondary_meta_box_content(true),
|
686 |
+
wpgform_validation_meta_box_content(true),
|
687 |
+
wpgform_placeholder_meta_box_content(true)
|
688 |
+
) ;
|
689 |
else
|
690 |
return $post_id ;
|
691 |
|
694 |
// updated and CPT fields are ignored in Quick Edit except for
|
695 |
// the Short URL field.
|
696 |
|
|
|
697 |
foreach ($fields as $field)
|
698 |
{
|
699 |
// Only update other Post Meta fields when on the edit screen - ignore in quick edit mode
|
708 |
|
709 |
if ($new && $new != $old)
|
710 |
{
|
|
|
711 |
update_post_meta($post_id, $field['id'], $new) ;
|
712 |
}
|
713 |
elseif ('' == $new && $old)
|
714 |
{
|
|
|
715 |
delete_post_meta($post_id, $field['id'], $old) ;
|
716 |
}
|
717 |
else
|
718 |
{
|
719 |
+
if( ($field['id'] == WPGFORM_PREFIX.'form') || ($field['id'] == WPGFORM_PREFIX . 'transient_reset') )
|
720 |
+
{
|
721 |
+
// If form cache reset was selected, or the URL was updated
|
722 |
+
// let's delete the transient and uncheck the "reset" option
|
723 |
+
delete_transient(WPGFORM_FORM_TRANSIENT.$post_id);
|
724 |
+
if( ($field['id'] == WPGFORM_PREFIX . 'transient_reset') && ($new == 'on') )
|
725 |
+
{
|
726 |
+
$new = '';
|
727 |
+
}
|
728 |
+
}
|
729 |
//wpgform_whereami(__FILE__, __LINE__);
|
730 |
}
|
731 |
}
|