Google Forms - Version 0.63

Version Description

No known upgrade issues.

Download this release

Release Info

Developer mpwalsh8
Plugin Icon wp plugin Google Forms
Version 0.63
Comparing to
See all releases

Code changes from version 0.62 to 0.63

Files changed (5) hide show
  1. index.php +3 -3
  2. languages/wpgform.mo +0 -0
  3. languages/wpgform.po +49 -47
  4. readme.txt +4 -1
  5. wpgform-core.php +16 -9
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.62
8
- * Build: 0.62.$WCREV$
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.62') ;
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.63
8
+ * Build: 0.63.$WCREV$
9
  * Last Modified: $WCDATE$
10
  * Author: Mike Walsh
11
  * Author URI: http://www.michaelwalsh.org
25
  *
26
  */
27
 
28
+ define('WPGFORM_VERSION', '0.63') ;
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,16 +1,18 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WordPress Google Form\n"
4
- "POT-Creation-Date: 2013-11-09 11:01-0000\n"
5
- "PO-Revision-Date: 2013-11-09 11:01-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"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 1.5.7\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:177
@@ -49,180 +51,180 @@ msgstr ""
49
  msgid "Google Forms"
50
  msgstr ""
51
 
52
- #: ../wpgform-core.php:449 ../wpgform-core.php:463
53
  msgid "Unable to process Google Form short code."
54
  msgstr ""
55
 
56
- #: ../wpgform-core.php:625
57
  msgid "Unable to process Google Form."
58
  msgstr ""
59
 
60
- #: ../wpgform-core.php:626
61
  msgid "Server is responding with"
62
  msgstr ""
63
 
64
- #: ../wpgform-core.php:627
65
  msgid "403 Permission Denied"
66
  msgstr ""
67
 
68
- #: ../wpgform-core.php:627
69
  msgid "error"
70
  msgstr ""
71
 
72
- #: ../wpgform-core.php:671
73
  msgid "Email Address"
74
  msgstr ""
75
 
76
- #: ../wpgform-core.php:721 ../wpgform-core.php:723
77
  msgid "What is"
78
  msgstr ""
79
 
80
- #: ../wpgform-core.php:865
81
  msgid "Unable to retrieve Google Form. Please try reloading this page."
82
  msgstr ""
83
 
84
- #: ../wpgform-core.php:945
85
  msgid "Unexpected content encountered, unable to retrieve Google Form."
86
  msgstr ""
87
 
88
- #: ../wpgform-core.php:1119
89
  msgid "A valid email address is required."
90
  msgstr ""
91
 
92
- #: ../wpgform-core.php:1143
93
  msgid "Incorrect answer."
94
  msgstr ""
95
 
96
- #: ../wpgform-core.php:1212 ../wpgform-core.php:1425
97
  msgid "Unknown"
98
  msgstr ""
99
 
100
- #: ../wpgform-core.php:1371
101
  msgid "Warning: You are using an insecure browser!"
102
  msgstr ""
103
 
104
- #: ../wpgform-core.php:1374
105
  msgid "Warning: Your browser is out of date! Please update now."
106
  msgstr ""
107
 
108
- #: ../wpgform-core.php:1390
109
  msgid "Form Id:"
110
  msgstr ""
111
 
112
- #: ../wpgform-core.php:1392
113
  msgid "Submitted Form Id"
114
  msgstr ""
115
 
116
- #: ../wpgform-core.php:1395
117
  msgid "No Submitted Form Id"
118
  msgstr ""
119
 
120
- #: ../wpgform-core.php:1601
121
  msgid "Unable to submit Google Form. Please try reloading this page."
122
  msgstr ""
123
 
124
- #: ../wpgform-core.php:1683
125
  msgid "View Form Results"
126
  msgstr ""
127
 
128
- #: ../wpgform-core.php:1737
129
  msgid "A form was submitted on your web site."
130
  msgstr ""
131
 
132
- #: ../wpgform-core.php:1738 ../wpgform-core.php:1750
133
  msgid "Form"
134
  msgstr ""
135
 
136
- #: ../wpgform-core.php:1739 ../wpgform-core.php:1751
137
  #: ../wpgform-logging.php:182
138
  msgid "URL"
139
  msgstr ""
140
 
141
- #: ../wpgform-core.php:1740 ../wpgform-core.php:1752
142
  msgid "Responses"
143
  msgstr ""
144
 
145
- #: ../wpgform-core.php:1741 ../wpgform-core.php:1753
146
  msgid "Date"
147
  msgstr ""
148
 
149
- #: ../wpgform-core.php:1742 ../wpgform-core.php:1754
150
  msgid "Time"
151
  msgstr ""
152
 
153
- #: ../wpgform-core.php:1743 ../wpgform-core.php:1756
154
  msgid "Thank you"
155
  msgstr ""
156
 
157
- #: ../wpgform-core.php:1749
158
  msgid "A form was submitted on your web site"
159
  msgstr ""
160
 
161
- #: ../wpgform-core.php:1820
162
  msgid "This field is required."
163
  msgstr ""
164
 
165
- #: ../wpgform-core.php:1821
166
  msgid "Please fix this field."
167
  msgstr ""
168
 
169
- #: ../wpgform-core.php:1822
170
  msgid "Please enter a valid email address."
171
  msgstr ""
172
 
173
- #: ../wpgform-core.php:1823
174
  msgid "Please enter a valid URL."
175
  msgstr ""
176
 
177
- #: ../wpgform-core.php:1824
178
  msgid "Please enter a valid date."
179
  msgstr ""
180
 
181
- #: ../wpgform-core.php:1825
182
  msgid "Please enter a valid date (ISO)."
183
  msgstr ""
184
 
185
- #: ../wpgform-core.php:1826
186
  msgid "Please enter a valid number."
187
  msgstr ""
188
 
189
- #: ../wpgform-core.php:1827
190
  msgid "Please enter only digits."
191
  msgstr ""
192
 
193
- #: ../wpgform-core.php:1828
194
  msgid "Please enter a valid credit card number."
195
  msgstr ""
196
 
197
- #: ../wpgform-core.php:1829
198
  msgid "Please enter the same value again.,"
199
  msgstr ""
200
 
201
- #: ../wpgform-core.php:1830
202
  msgid "Please enter a value with a valid extension."
203
  msgstr ""
204
 
205
- #: ../wpgform-core.php:1831
206
  msgid "Please enter no more than {0} characters."
207
  msgstr ""
208
 
209
- #: ../wpgform-core.php:1832
210
  msgid "Please enter at least {0} characters."
211
  msgstr ""
212
 
213
- #: ../wpgform-core.php:1833
214
  msgid "Please enter a value between {0} and {1} characters long."
215
  msgstr ""
216
 
217
- #: ../wpgform-core.php:1834
218
  msgid "Please enter a value between {0} and {1}."
219
  msgstr ""
220
 
221
- #: ../wpgform-core.php:1835
222
  msgid "Please enter a value less than or equal to {0}."
223
  msgstr ""
224
 
225
- #: ../wpgform-core.php:1836
226
  msgid "Please enter a value greater than or equal to {0}."
227
  msgstr ""
228
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WordPress Google Form\n"
4
+ "POT-Creation-Date: 2013-12-09 15:25-0000\n"
5
+ "PO-Revision-Date: 2013-12-09 15:25-0000\n"
6
  "Last-Translator: Mike Walsh <mpwalsh8@gmail.com>\n"
7
  "Language-Team: Mike Walsh (@mpwalsh8) <mpwalsh8@gmail.com>\n"
8
+ "Language: en_US\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.1\n"
13
  "X-Poedit-KeywordsList: _;gettext;gettext_noop;__\n"
14
  "X-Poedit-Basepath: .\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
  #: ../wpgform-core.php:177
51
  msgid "Google Forms"
52
  msgstr ""
53
 
54
+ #: ../wpgform-core.php:470 ../wpgform-core.php:484
55
  msgid "Unable to process Google Form short code."
56
  msgstr ""
57
 
58
+ #: ../wpgform-core.php:649
59
  msgid "Unable to process Google Form."
60
  msgstr ""
61
 
62
+ #: ../wpgform-core.php:650
63
  msgid "Server is responding with"
64
  msgstr ""
65
 
66
+ #: ../wpgform-core.php:651
67
  msgid "403 Permission Denied"
68
  msgstr ""
69
 
70
+ #: ../wpgform-core.php:651
71
  msgid "error"
72
  msgstr ""
73
 
74
+ #: ../wpgform-core.php:697
75
  msgid "Email Address"
76
  msgstr ""
77
 
78
+ #: ../wpgform-core.php:747 ../wpgform-core.php:749
79
  msgid "What is"
80
  msgstr ""
81
 
82
+ #: ../wpgform-core.php:897
83
  msgid "Unable to retrieve Google Form. Please try reloading this page."
84
  msgstr ""
85
 
86
+ #: ../wpgform-core.php:1013
87
  msgid "Unexpected content encountered, unable to retrieve Google Form."
88
  msgstr ""
89
 
90
+ #: ../wpgform-core.php:1201
91
  msgid "A valid email address is required."
92
  msgstr ""
93
 
94
+ #: ../wpgform-core.php:1220
95
  msgid "Incorrect answer."
96
  msgstr ""
97
 
98
+ #: ../wpgform-core.php:1306 ../wpgform-core.php:1529
99
  msgid "Unknown"
100
  msgstr ""
101
 
102
+ #: ../wpgform-core.php:1475
103
  msgid "Warning: You are using an insecure browser!"
104
  msgstr ""
105
 
106
+ #: ../wpgform-core.php:1478
107
  msgid "Warning: Your browser is out of date! Please update now."
108
  msgstr ""
109
 
110
+ #: ../wpgform-core.php:1494
111
  msgid "Form Id:"
112
  msgstr ""
113
 
114
+ #: ../wpgform-core.php:1496
115
  msgid "Submitted Form Id"
116
  msgstr ""
117
 
118
+ #: ../wpgform-core.php:1499
119
  msgid "No Submitted Form Id"
120
  msgstr ""
121
 
122
+ #: ../wpgform-core.php:1719
123
  msgid "Unable to submit Google Form. Please try reloading this page."
124
  msgstr ""
125
 
126
+ #: ../wpgform-core.php:1801
127
  msgid "View Form Results"
128
  msgstr ""
129
 
130
+ #: ../wpgform-core.php:1855
131
  msgid "A form was submitted on your web site."
132
  msgstr ""
133
 
134
+ #: ../wpgform-core.php:1856 ../wpgform-core.php:1868
135
  msgid "Form"
136
  msgstr ""
137
 
138
+ #: ../wpgform-core.php:1857 ../wpgform-core.php:1869
139
  #: ../wpgform-logging.php:182
140
  msgid "URL"
141
  msgstr ""
142
 
143
+ #: ../wpgform-core.php:1858 ../wpgform-core.php:1870
144
  msgid "Responses"
145
  msgstr ""
146
 
147
+ #: ../wpgform-core.php:1859 ../wpgform-core.php:1871
148
  msgid "Date"
149
  msgstr ""
150
 
151
+ #: ../wpgform-core.php:1860 ../wpgform-core.php:1872
152
  msgid "Time"
153
  msgstr ""
154
 
155
+ #: ../wpgform-core.php:1861 ../wpgform-core.php:1874
156
  msgid "Thank you"
157
  msgstr ""
158
 
159
+ #: ../wpgform-core.php:1867
160
  msgid "A form was submitted on your web site"
161
  msgstr ""
162
 
163
+ #: ../wpgform-core.php:1938
164
  msgid "This field is required."
165
  msgstr ""
166
 
167
+ #: ../wpgform-core.php:1939
168
  msgid "Please fix this field."
169
  msgstr ""
170
 
171
+ #: ../wpgform-core.php:1940
172
  msgid "Please enter a valid email address."
173
  msgstr ""
174
 
175
+ #: ../wpgform-core.php:1941
176
  msgid "Please enter a valid URL."
177
  msgstr ""
178
 
179
+ #: ../wpgform-core.php:1942
180
  msgid "Please enter a valid date."
181
  msgstr ""
182
 
183
+ #: ../wpgform-core.php:1943
184
  msgid "Please enter a valid date (ISO)."
185
  msgstr ""
186
 
187
+ #: ../wpgform-core.php:1944
188
  msgid "Please enter a valid number."
189
  msgstr ""
190
 
191
+ #: ../wpgform-core.php:1945
192
  msgid "Please enter only digits."
193
  msgstr ""
194
 
195
+ #: ../wpgform-core.php:1946
196
  msgid "Please enter a valid credit card number."
197
  msgstr ""
198
 
199
+ #: ../wpgform-core.php:1947
200
  msgid "Please enter the same value again.,"
201
  msgstr ""
202
 
203
+ #: ../wpgform-core.php:1948
204
  msgid "Please enter a value with a valid extension."
205
  msgstr ""
206
 
207
+ #: ../wpgform-core.php:1949
208
  msgid "Please enter no more than {0} characters."
209
  msgstr ""
210
 
211
+ #: ../wpgform-core.php:1950
212
  msgid "Please enter at least {0} characters."
213
  msgstr ""
214
 
215
+ #: ../wpgform-core.php:1951
216
  msgid "Please enter a value between {0} and {1} characters long."
217
  msgstr ""
218
 
219
+ #: ../wpgform-core.php:1952
220
  msgid "Please enter a value between {0} and {1}."
221
  msgstr ""
222
 
223
+ #: ../wpgform-core.php:1953
224
  msgid "Please enter a value less than or equal to {0}."
225
  msgstr ""
226
 
227
+ #: ../wpgform-core.php:1954
228
  msgid "Please enter a value greater than or equal to {0}."
229
  msgstr ""
230
 
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.7.1
7
- Stable tag: 0.62
8
  License: GPL
9
 
10
  Embeds a published, public Google Form in a WordPress post, page, or widget.
@@ -365,6 +365,9 @@ No known upgrade issues.
365
 
366
  == Changelog ==
367
 
 
 
 
368
  = Version 0.62 =
369
  * Failed to update stable release tag preventing v0.61 from rolling out.
370
 
4
  Tags: Google Forms, Google Docs, Google, Spreadsheet, shortcode, forms
5
  Requires at least: 3.3
6
  Tested up to: 3.7.1
7
+ Stable tag: 0.63
8
  License: GPL
9
 
10
  Embeds a published, public Google Form in a WordPress post, page, or widget.
365
 
366
  == Changelog ==
367
 
368
+ = Version 0.63 =
369
+ * Refactored code to which assembles arguments for wp_remote_post() to construct the body argument as an array as opposed to a URL formatted string of concatenated parameters. The long string was causing problems with newer versions of PHP. The array of arguments is much cleaner (thanks to David H�gborg for providing the basics of a patch).
370
+
371
  = Version 0.62 =
372
  * Failed to update stable release tag preventing v0.61 from rolling out.
373
 
wpgform-core.php CHANGED
@@ -1603,7 +1603,8 @@ error_log(print_r($replacements, true)) ;
1603
  $form = $options['form'] ;
1604
  $uid = $options['uid'] ;
1605
 
1606
- $body = '' ;
 
1607
 
1608
  // The name of the form fields are munged, they need
1609
  // to be restored before the parameters can be posted
@@ -1635,7 +1636,9 @@ error_log(print_r($patterns, true)) ;
1635
  $pa = &$_POST[$key] ;
1636
  foreach ($pa as $pv)
1637
  {
1638
- $body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($pv) . '&' ;
 
 
1639
  }
1640
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
1641
  }
@@ -1651,12 +1654,16 @@ error_log(print_r($patterns, true)) ;
1651
  $value = preg_replace($patterns, $replacements, $value) ;
1652
 
1653
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
1654
- $body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($value) . '&' ;
 
 
1655
  }
1656
  else
1657
  {
1658
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
1659
- $body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($value) . '&' ;
 
 
1660
  }
1661
  }
1662
 
@@ -1667,14 +1674,14 @@ error_log(print_r($patterns, true)) ;
1667
  // appropriate HTML entity or some variety of it. Need to undo
1668
  // that so the URL can be actually be used.
1669
 
1670
-
1671
  //$body = stripslashes_deep(urldecode($body)) ;
1672
- $body = stripslashes_deep($body) ;
1673
-
1674
- // Clean up any single quotes and newlines which are escpaed
1675
  $patterns = array('/%5C%27/', '/%5Cn/') ;
1676
  $replacements = array('%27', 'n') ;
1677
- $body = preg_replace($patterns, $replacements, $body) ;
 
 
1678
 
1679
  $action = str_replace(array('&#038;','&#38;','&amp;'), '&', $action) ;
1680
 
1603
  $form = $options['form'] ;
1604
  $uid = $options['uid'] ;
1605
 
1606
+ //$body = '' ;
1607
+ $body = array() ;
1608
 
1609
  // The name of the form fields are munged, they need
1610
  // to be restored before the parameters can be posted
1636
  $pa = &$_POST[$key] ;
1637
  foreach ($pa as $pv)
1638
  {
1639
+ //$body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($pv) . '&' ;
1640
+ $formkey = preg_replace($patterns, $replacements, $key);
1641
+ $body[$formkey] = $pv;
1642
  }
1643
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
1644
  }
1654
  $value = preg_replace($patterns, $replacements, $value) ;
1655
 
1656
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
1657
+ //$body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($value) . '&' ;
1658
+ $formkey = preg_replace($patterns, $replacements, $key);
1659
+ $body[$formkey] = $value;
1660
  }
1661
  else
1662
  {
1663
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
1664
+ //$body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($value) . '&' ;
1665
+ $formkey = preg_replace($patterns, $replacements, $key);
1666
+ $body[$formkey] = $value;
1667
  }
1668
  }
1669
 
1674
  // appropriate HTML entity or some variety of it. Need to undo
1675
  // that so the URL can be actually be used.
1676
 
 
1677
  //$body = stripslashes_deep(urldecode($body)) ;
1678
+ //$body = stripslashes_deep($body) ;
1679
+ // Clean up any single quotes and newlines which are escaped
 
1680
  $patterns = array('/%5C%27/', '/%5Cn/') ;
1681
  $replacements = array('%27', 'n') ;
1682
+
1683
+ foreach ($body as $key => $value)
1684
+ $body[$key] = preg_replace($patterns, $replacements, stripslashes_deep($value)) ;
1685
 
1686
  $action = str_replace(array('&#038;','&#38;','&amp;'), '&', $action) ;
1687