Version Description
No known upgrade issues.
Download this release
Release Info
Developer | mpwalsh8 |
Plugin | Google Forms |
Version | 0.58 |
Comparing to | |
See all releases |
Code changes from version 0.57 to 0.58
- index.php +3 -3
- languages/wpgform.mo +0 -0
- languages/wpgform.po +53 -49
- readme.txt +8 -1
- wpgform-core.php +46 -8
- wpgform-options.php +3 -2
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.58
|
8 |
+
* Build: 0.58.$WCREV$
|
9 |
* Last Modified: $WCDATE$
|
10 |
* Author: Mike Walsh
|
11 |
* Author URI: http://www.michaelwalsh.org
|
25 |
*
|
26 |
*/
|
27 |
|
28 |
+
define('WPGFORM_VERSION', '0.58') ;
|
29 |
|
30 |
require_once('wpgform-core.php') ;
|
31 |
require_once('wpgform-post-type.php') ;
|
languages/wpgform.mo
CHANGED
Binary file
|
languages/wpgform.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WordPress Google Form\n"
|
4 |
-
"POT-Creation-Date: 2013-
|
5 |
-
"PO-Revision-Date: 2013-
|
6 |
"Last-Translator: Mike Walsh <mpwalsh8@gmail.com>\n"
|
7 |
"Language-Team: Mike Walsh (@mpwalsh8) <mpwalsh8@gmail.com>\n"
|
8 |
"MIME-Version: 1.0\n"
|
@@ -41,184 +41,188 @@ msgstr ""
|
|
41 |
msgid "Check all that apply."
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: ../wpgform-core.php:
|
|
|
|
|
|
|
|
|
45 |
msgid "Google Forms"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: ../wpgform-core.php:
|
49 |
msgid "Unable to process Google Form short code."
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: ../wpgform-core.php:
|
53 |
msgid "Unable to process Google Form."
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: ../wpgform-core.php:
|
57 |
msgid "Server is responding with"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: ../wpgform-core.php:
|
61 |
msgid "403 Permission Denied"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: ../wpgform-core.php:
|
65 |
msgid "error"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: ../wpgform-core.php:
|
69 |
msgid "Email Address"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: ../wpgform-core.php:
|
73 |
msgid "What is"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: ../wpgform-core.php:
|
77 |
msgid "Unable to retrieve Google Form. Please try reloading this page."
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: ../wpgform-core.php:
|
81 |
msgid "Unexpected content encountered, unable to retrieve Google Form."
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: ../wpgform-core.php:
|
85 |
msgid "A valid email address is required."
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: ../wpgform-core.php:
|
89 |
msgid "Incorrect answer."
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: ../wpgform-core.php:
|
93 |
msgid "Warning: You are using an insecure browser!"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: ../wpgform-core.php:
|
97 |
msgid "Warning: Your browser is out of date! Please update now."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: ../wpgform-core.php:
|
101 |
msgid "Form Id:"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: ../wpgform-core.php:
|
105 |
msgid "Submitted Form Id"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: ../wpgform-core.php:
|
109 |
msgid "No Submitted Form Id"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: ../wpgform-core.php:
|
113 |
msgid "Unknown"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: ../wpgform-core.php:
|
117 |
msgid "Unable to submit Google Form. Please try reloading this page."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: ../wpgform-core.php:
|
121 |
msgid "View Form Results"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: ../wpgform-core.php:
|
125 |
msgid "A form was submitted on your web site."
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: ../wpgform-core.php:
|
129 |
msgid "Form"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: ../wpgform-core.php:
|
133 |
#: ../wpgform-logging.php:182
|
134 |
msgid "URL"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: ../wpgform-core.php:
|
138 |
msgid "Responses"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: ../wpgform-core.php:
|
142 |
msgid "Date"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: ../wpgform-core.php:
|
146 |
msgid "Time"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: ../wpgform-core.php:
|
150 |
msgid "Thank you"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: ../wpgform-core.php:
|
154 |
msgid "A form was submitted on your web site"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: ../wpgform-core.php:
|
158 |
msgid "This field is required."
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: ../wpgform-core.php:
|
162 |
msgid "Please fix this field."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: ../wpgform-core.php:
|
166 |
msgid "Please enter a valid email address."
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: ../wpgform-core.php:
|
170 |
msgid "Please enter a valid URL."
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: ../wpgform-core.php:
|
174 |
msgid "Please enter a valid date."
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: ../wpgform-core.php:
|
178 |
msgid "Please enter a valid date (ISO)."
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: ../wpgform-core.php:
|
182 |
msgid "Please enter a valid number."
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: ../wpgform-core.php:
|
186 |
msgid "Please enter only digits."
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: ../wpgform-core.php:
|
190 |
msgid "Please enter a valid credit card number."
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: ../wpgform-core.php:
|
194 |
msgid "Please enter the same value again.,"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: ../wpgform-core.php:
|
198 |
msgid "Please enter a value with a valid extension."
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: ../wpgform-core.php:
|
202 |
msgid "Please enter no more than {0} characters."
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: ../wpgform-core.php:
|
206 |
msgid "Please enter at least {0} characters."
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: ../wpgform-core.php:
|
210 |
msgid "Please enter a value between {0} and {1} characters long."
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: ../wpgform-core.php:
|
214 |
msgid "Please enter a value between {0} and {1}."
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: ../wpgform-core.php:
|
218 |
msgid "Please enter a value less than or equal to {0}."
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: ../wpgform-core.php:
|
222 |
msgid "Please enter a value greater than or equal to {0}."
|
223 |
msgstr ""
|
224 |
|
@@ -261,12 +265,12 @@ msgid ""
|
|
261 |
"a> if you find this plugin useful."
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: ../wpgform-options.php:
|
265 |
#, php-format
|
266 |
msgid "Custom %s CSS"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: ../wpgform-options.php:
|
270 |
#, php-format
|
271 |
msgid ""
|
272 |
"Enabling debug will collect data during the form rendering and processing "
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WordPress Google Form\n"
|
4 |
+
"POT-Creation-Date: 2013-10-08 17:46-0000\n"
|
5 |
+
"PO-Revision-Date: 2013-10-08 17:46-0000\n"
|
6 |
"Last-Translator: Mike Walsh <mpwalsh8@gmail.com>\n"
|
7 |
"Language-Team: Mike Walsh (@mpwalsh8) <mpwalsh8@gmail.com>\n"
|
8 |
"MIME-Version: 1.0\n"
|
41 |
msgid "Check all that apply."
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: ../wpgform-core.php:250
|
45 |
+
msgid "Reset"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../wpgform-core.php:269 ../wpgform-core.php:270
|
49 |
msgid "Google Forms"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: ../wpgform-core.php:450 ../wpgform-core.php:464
|
53 |
msgid "Unable to process Google Form short code."
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: ../wpgform-core.php:618
|
57 |
msgid "Unable to process Google Form."
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: ../wpgform-core.php:619
|
61 |
msgid "Server is responding with"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: ../wpgform-core.php:620
|
65 |
msgid "403 Permission Denied"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: ../wpgform-core.php:620
|
69 |
msgid "error"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: ../wpgform-core.php:664
|
73 |
msgid "Email Address"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: ../wpgform-core.php:714 ../wpgform-core.php:716
|
77 |
msgid "What is"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: ../wpgform-core.php:837
|
81 |
msgid "Unable to retrieve Google Form. Please try reloading this page."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: ../wpgform-core.php:917
|
85 |
msgid "Unexpected content encountered, unable to retrieve Google Form."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: ../wpgform-core.php:1092
|
89 |
msgid "A valid email address is required."
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: ../wpgform-core.php:1116
|
93 |
msgid "Incorrect answer."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: ../wpgform-core.php:1290
|
97 |
msgid "Warning: You are using an insecure browser!"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: ../wpgform-core.php:1293
|
101 |
msgid "Warning: Your browser is out of date! Please update now."
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: ../wpgform-core.php:1309
|
105 |
msgid "Form Id:"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: ../wpgform-core.php:1311
|
109 |
msgid "Submitted Form Id"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: ../wpgform-core.php:1314
|
113 |
msgid "No Submitted Form Id"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: ../wpgform-core.php:1344
|
117 |
msgid "Unknown"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: ../wpgform-core.php:1520
|
121 |
msgid "Unable to submit Google Form. Please try reloading this page."
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: ../wpgform-core.php:1602
|
125 |
msgid "View Form Results"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: ../wpgform-core.php:1656
|
129 |
msgid "A form was submitted on your web site."
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: ../wpgform-core.php:1657 ../wpgform-core.php:1669
|
133 |
msgid "Form"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: ../wpgform-core.php:1658 ../wpgform-core.php:1670
|
137 |
#: ../wpgform-logging.php:182
|
138 |
msgid "URL"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: ../wpgform-core.php:1659 ../wpgform-core.php:1671
|
142 |
msgid "Responses"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: ../wpgform-core.php:1660 ../wpgform-core.php:1672
|
146 |
msgid "Date"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: ../wpgform-core.php:1661 ../wpgform-core.php:1673
|
150 |
msgid "Time"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: ../wpgform-core.php:1662 ../wpgform-core.php:1675
|
154 |
msgid "Thank you"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: ../wpgform-core.php:1668
|
158 |
msgid "A form was submitted on your web site"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: ../wpgform-core.php:1739
|
162 |
msgid "This field is required."
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: ../wpgform-core.php:1740
|
166 |
msgid "Please fix this field."
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: ../wpgform-core.php:1741
|
170 |
msgid "Please enter a valid email address."
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: ../wpgform-core.php:1742
|
174 |
msgid "Please enter a valid URL."
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: ../wpgform-core.php:1743
|
178 |
msgid "Please enter a valid date."
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: ../wpgform-core.php:1744
|
182 |
msgid "Please enter a valid date (ISO)."
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: ../wpgform-core.php:1745
|
186 |
msgid "Please enter a valid number."
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: ../wpgform-core.php:1746
|
190 |
msgid "Please enter only digits."
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: ../wpgform-core.php:1747
|
194 |
msgid "Please enter a valid credit card number."
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: ../wpgform-core.php:1748
|
198 |
msgid "Please enter the same value again.,"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: ../wpgform-core.php:1749
|
202 |
msgid "Please enter a value with a valid extension."
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: ../wpgform-core.php:1750
|
206 |
msgid "Please enter no more than {0} characters."
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: ../wpgform-core.php:1751
|
210 |
msgid "Please enter at least {0} characters."
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: ../wpgform-core.php:1752
|
214 |
msgid "Please enter a value between {0} and {1} characters long."
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: ../wpgform-core.php:1753
|
218 |
msgid "Please enter a value between {0} and {1}."
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: ../wpgform-core.php:1754
|
222 |
msgid "Please enter a value less than or equal to {0}."
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: ../wpgform-core.php:1755
|
226 |
msgid "Please enter a value greater than or equal to {0}."
|
227 |
msgstr ""
|
228 |
|
265 |
"a> if you find this plugin useful."
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: ../wpgform-options.php:237
|
269 |
#, php-format
|
270 |
msgid "Custom %s CSS"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: ../wpgform-options.php:468
|
274 |
#, php-format
|
275 |
msgid ""
|
276 |
"Enabling debug will collect data during the form rendering and processing "
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
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.
|
8 |
|
9 |
Embeds a published, public Google Form in a WordPress post, page, or widget.
|
10 |
|
@@ -316,6 +316,13 @@ No known upgrade issues.
|
|
316 |
|
317 |
== Changelog ==
|
318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
= Version 0.57 =
|
320 |
* Added ability to translate "What is" Captcha phrase.
|
321 |
* Updated language translation files.
|
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.58
|
8 |
|
9 |
Embeds a published, public Google Form in a WordPress post, page, or widget.
|
10 |
|
316 |
|
317 |
== Changelog ==
|
318 |
|
319 |
+
= Version 0.58 =
|
320 |
+
* Fixed bug when radio button and checkbox responses contained apostrophe characters.
|
321 |
+
* Fixed bug when text entry box content contained an ampersand which ended up encoded in the Google sheet.
|
322 |
+
* Fixed bug(s) with plugin settings which are controlled with checkboxes not being able to be unchecked.
|
323 |
+
* Added Reset button to return plugin settings to their default state.
|
324 |
+
* Fixed problem handling newlines (carriage returns) in textarea entries.
|
325 |
+
|
326 |
= Version 0.57 =
|
327 |
* Added ability to translate "What is" Captcha phrase.
|
328 |
* Updated language translation files.
|
wpgform-core.php
CHANGED
@@ -219,6 +219,40 @@ function wpgform_get_plugin_options()
|
|
219 |
return $plugin_options ;
|
220 |
}
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
/**
|
223 |
* wpgform_admin_menu()
|
224 |
*
|
@@ -265,7 +299,7 @@ function wpgform_entry_log_page()
|
|
265 |
*/
|
266 |
function wpgform_admin_init()
|
267 |
{
|
268 |
-
register_setting('wpgform_options', 'wpgform_options') ;
|
269 |
}
|
270 |
|
271 |
/**
|
@@ -1415,13 +1449,11 @@ jQuery(document).ready(function($) {
|
|
1415 |
else if ($key === 'draftResponse')
|
1416 |
{
|
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 |
-
|
1424 |
-
|
1425 |
|
1426 |
$value = preg_replace($patterns, $replacements, $value) ;
|
1427 |
|
@@ -1435,7 +1467,6 @@ jQuery(document).ready(function($) {
|
|
1435 |
}
|
1436 |
}
|
1437 |
|
1438 |
-
//$form = str_replace($action, 'action="' . get_permalink(get_the_ID()) . '"', $form) ;
|
1439 |
$form = str_replace($action, 'action=""', $form) ;
|
1440 |
|
1441 |
|
@@ -1446,6 +1477,12 @@ jQuery(document).ready(function($) {
|
|
1446 |
|
1447 |
//$body = stripslashes_deep(urldecode($body)) ;
|
1448 |
$body = stripslashes_deep($body) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
1449 |
$action = str_replace(array('&','&','&'), '&', $action) ;
|
1450 |
|
1451 |
if (WPGFORM_DEBUG)
|
@@ -1453,6 +1490,7 @@ jQuery(document).ready(function($) {
|
|
1453 |
wpgform_preprint_r($action) ;
|
1454 |
wpgform_preprint_r($body) ;
|
1455 |
}
|
|
|
1456 |
|
1457 |
self::$response = wp_remote_post($action,
|
1458 |
array('sslverify' => false, 'body' => $body, 'timeout' => $timeout)) ;
|
219 |
return $plugin_options ;
|
220 |
}
|
221 |
|
222 |
+
/**
|
223 |
+
* Returns the options array for the wpGForm plugin.
|
224 |
+
*
|
225 |
+
* @param input mixed input to validate
|
226 |
+
* @return input mixed validated input
|
227 |
+
* @since wpGForm 0.58-beta-4
|
228 |
+
*
|
229 |
+
*/
|
230 |
+
function wpgform_options_validate($input)
|
231 |
+
{
|
232 |
+
if ('update' === $_POST['action'])
|
233 |
+
{
|
234 |
+
// Get the options array defined for the form
|
235 |
+
$options = wpgform_get_default_plugin_options();
|
236 |
+
|
237 |
+
// Loop through all of the default options
|
238 |
+
foreach ($options as $key => $value)
|
239 |
+
{
|
240 |
+
// If the default option doesn't exist, which it
|
241 |
+
// won't if it is a checkbox, default the value to 0
|
242 |
+
// which means the checkbox is turned off.
|
243 |
+
|
244 |
+
if (!array_key_exists($key, $input))
|
245 |
+
$input[$key] = 0 ;
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
// Was the Reset button pushed?
|
250 |
+
if (__('Reset', WPGFORM_I18_DOMAIN) === $_POST['Submit'])
|
251 |
+
$input = wpgform_get_default_plugin_options();
|
252 |
+
|
253 |
+
return $input ;
|
254 |
+
}
|
255 |
+
|
256 |
/**
|
257 |
* wpgform_admin_menu()
|
258 |
*
|
299 |
*/
|
300 |
function wpgform_admin_init()
|
301 |
{
|
302 |
+
register_setting('wpgform_options', 'wpgform_options', 'wpgform_options_validate') ;
|
303 |
}
|
304 |
|
305 |
/**
|
1449 |
else if ($key === 'draftResponse')
|
1450 |
{
|
1451 |
// draftResponse is a special parameter for multi-page forms and needs
|
1452 |
+
// some special processing. We need to remove the escapes on double quotes,
|
1453 |
+
// handled embedded tabs, and encoded ampersands.
|
|
|
|
|
1454 |
|
1455 |
+
$patterns = array('/\\\"/', '/\\\t/', '/\\\u0026/', '/\\\n/') ;
|
1456 |
+
$replacements = array('"', 't', '&', '\n') ;
|
1457 |
|
1458 |
$value = preg_replace($patterns, $replacements, $value) ;
|
1459 |
|
1467 |
}
|
1468 |
}
|
1469 |
|
|
|
1470 |
$form = str_replace($action, 'action=""', $form) ;
|
1471 |
|
1472 |
|
1477 |
|
1478 |
//$body = stripslashes_deep(urldecode($body)) ;
|
1479 |
$body = stripslashes_deep($body) ;
|
1480 |
+
|
1481 |
+
// Clean up any single quotes and newlines which are escpaed
|
1482 |
+
$patterns = array('/%5C%27/', '/%5Cn/') ;
|
1483 |
+
$replacements = array('%27', 'n') ;
|
1484 |
+
$body = preg_replace($patterns, $replacements, $body) ;
|
1485 |
+
|
1486 |
$action = str_replace(array('&','&','&'), '&', $action) ;
|
1487 |
|
1488 |
if (WPGFORM_DEBUG)
|
1490 |
wpgform_preprint_r($action) ;
|
1491 |
wpgform_preprint_r($body) ;
|
1492 |
}
|
1493 |
+
error_log($body) ;
|
1494 |
|
1495 |
self::$response = wp_remote_post($action,
|
1496 |
array('sslverify' => false, 'body' => $body, 'timeout' => $timeout)) ;
|
wpgform-options.php
CHANGED
@@ -117,6 +117,7 @@ function wpgform_options_page()
|
|
117 |
<?php settings_fields('wpgform_options') ; ?>
|
118 |
<?php wpgform_settings_advanced_options() ; ?>
|
119 |
<input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
|
|
120 |
</form>
|
121 |
</div>
|
122 |
<div id="wpgform-tabs-3">
|
@@ -167,12 +168,12 @@ function wpgform_options_page()
|
|
167 |
<div id="wpgform-tabs-5">
|
168 |
<h4><?php _e('About WordPress Google Form', WPGFORM_I18N_DOMAIN);?></h4>
|
169 |
<div style="margin-left: 25px; text-align: center; float: right;" class="postbox">
|
170 |
-
<h3 class="hndle"><span><?php _e('Make a Donation',
|
171 |
<div class="inside">
|
172 |
<div style="text-align: center; font-size: 0.75em;padding:0px 5px;margin:0px auto;"><!-- PayPal box wrapper -->
|
173 |
<div><!-- PayPal box-->
|
174 |
<p style="margin: 0.25em 0"><b>WordPress Google Form v<?php echo WPGFORM_VERSION; ?></b></p>
|
175 |
-
<p style="margin: 0.25em 0"><a href="http://wordpress.org/extend/plugins/wpgform/" target="_blank"><?php _e('Plugin\'s Home Page',
|
176 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
177 |
<input type="hidden" name="cmd" value="_s-xclick">
|
178 |
<input type="hidden" name="hosted_button_id" value="DK4MS3AA983CC">
|
117 |
<?php settings_fields('wpgform_options') ; ?>
|
118 |
<?php wpgform_settings_advanced_options() ; ?>
|
119 |
<input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
120 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php _e('Reset') ?>" />
|
121 |
</form>
|
122 |
</div>
|
123 |
<div id="wpgform-tabs-3">
|
168 |
<div id="wpgform-tabs-5">
|
169 |
<h4><?php _e('About WordPress Google Form', WPGFORM_I18N_DOMAIN);?></h4>
|
170 |
<div style="margin-left: 25px; text-align: center; float: right;" class="postbox">
|
171 |
+
<h3 class="hndle"><span><?php _e('Make a Donation', WPGFORM_I18N_DOMAIN);?></span></h3>
|
172 |
<div class="inside">
|
173 |
<div style="text-align: center; font-size: 0.75em;padding:0px 5px;margin:0px auto;"><!-- PayPal box wrapper -->
|
174 |
<div><!-- PayPal box-->
|
175 |
<p style="margin: 0.25em 0"><b>WordPress Google Form v<?php echo WPGFORM_VERSION; ?></b></p>
|
176 |
+
<p style="margin: 0.25em 0"><a href="http://wordpress.org/extend/plugins/wpgform/" target="_blank"><?php _e('Plugin\'s Home Page', WPGFORM_I18N_DOMAIN); ?></a></p>
|
177 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
178 |
<input type="hidden" name="cmd" value="_s-xclick">
|
179 |
<input type="hidden" name="hosted_button_id" value="DK4MS3AA983CC">
|