Google Forms - Version 0.36

Version Description

No known upgrade issues.

Download this release

Release Info

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

Code changes from version 0.35 to 0.36

Files changed (3) hide show
  1. index.php +2 -2
  2. readme.txt +4 -0
  3. wpgform-core.php +14 -4
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.35
8
- * Build: 0.35.$WCREV$
9
  * Last Modified: $WCDATE$
10
  * Author: Mike Walsh
11
  * Author URI: http://www.michaelwalsh.org
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.36
8
+ * Build: 0.36.$WCREV$
9
  * Last Modified: $WCDATE$
10
  * Author: Mike Walsh
11
  * Author URI: http://www.michaelwalsh.org
readme.txt CHANGED
@@ -192,6 +192,10 @@ tr.ss-gridrow {}
192
  No known upgrade issues.
193
 
194
  == Changelog ==
 
 
 
 
195
 
196
  = Version 0.35 =
197
  * Changed format of email to use the title of the page/post instead of the permalink to the form.
192
  No known upgrade issues.
193
 
194
  == Changelog ==
195
+
196
+ = Version 0.36 =
197
+ * Fixed a bug which appears when the Browser Check option is enabled. There was a conflict in the server response from Google and the server response from WordPress due to overwriting a variable.
198
+ * Fixed format of plain text email response when email is enabled for form submission. The information in the email was being inserted into the template incorrectly.
199
 
200
  = Version 0.35 =
201
  * Changed format of email to use the title of the page/post instead of the permalink to the form.
wpgform-core.php CHANGED
@@ -173,6 +173,11 @@ function wpgform_register_activation_hook()
173
  */
174
  class wpGForm
175
  {
 
 
 
 
 
176
  /**
177
  * Property to hold Google Form Response
178
  */
@@ -335,7 +340,12 @@ class wpGForm
335
  if (is_wp_error(self::$response))
336
  return '<div class="gform-google-error">Unable to retrieve Google Form. Please try reloading this page.</div>' ;
337
  else
 
 
 
 
338
  $html = self::$response['body'] ;
 
339
 
340
  // Need to filter the HTML retrieved from the form and strip off the stuff
341
  // we don't want. This gets rid of the HTML wrapper from the Google page.
@@ -573,11 +583,11 @@ jQuery(document).ready(function($) {
573
 
574
  // Let's check the browser version just in case ...
575
 
576
- self::$response = wp_check_browser_version();
577
 
578
- if (self::$response && self::$response['upgrade'])
579
  {
580
- if (self::$response['insecure'])
581
  $css .= '<div class="gform-browser-warning"><h4>' .
582
  __('Warning: You are using an insecure browser!') . '</h4></div>' ;
583
  else
@@ -824,7 +834,7 @@ jQuery(document).ready(function($) {
824
  $plain .= 'Time: %s' . PHP_EOL . PHP_EOL . 'Thank you,' . PHP_EOL . PHP_EOL . '%s' . PHP_EOL ;
825
 
826
  $message = sprintf($plain, get_the_title(),
827
- date('Y-m-d'), date('H:i'), $spreadsheet, get_option('blogname')) ;
828
  }
829
 
830
  $to = sprintf('%s wpGForm Contact <%s>', get_option('blogname'), $sendto) ;
173
  */
174
  class wpGForm
175
  {
176
+ /**
177
+ * Property to hold Browser Check response
178
+ */
179
+ static $browser_check ;
180
+
181
  /**
182
  * Property to hold Google Form Response
183
  */
340
  if (is_wp_error(self::$response))
341
  return '<div class="gform-google-error">Unable to retrieve Google Form. Please try reloading this page.</div>' ;
342
  else
343
+ {
344
+ print '<pre>' ;
345
+ print_r(self::$response) ;
346
+ print '</pre>' ;
347
  $html = self::$response['body'] ;
348
+ }
349
 
350
  // Need to filter the HTML retrieved from the form and strip off the stuff
351
  // we don't want. This gets rid of the HTML wrapper from the Google page.
583
 
584
  // Let's check the browser version just in case ...
585
 
586
+ self::$browser_check = wp_check_browser_version();
587
 
588
+ if (self::$browser_check && self::$browser_check['upgrade'])
589
  {
590
+ if (self::$browser_check['insecure'])
591
  $css .= '<div class="gform-browser-warning"><h4>' .
592
  __('Warning: You are using an insecure browser!') . '</h4></div>' ;
593
  else
834
  $plain .= 'Time: %s' . PHP_EOL . PHP_EOL . 'Thank you,' . PHP_EOL . PHP_EOL . '%s' . PHP_EOL ;
835
 
836
  $message = sprintf($plain, get_the_title(),
837
+ $spreadsheet, date('Y-m-d'), date('H:i'), get_option('blogname')) ;
838
  }
839
 
840
  $to = sprintf('%s wpGForm Contact <%s>', get_option('blogname'), $sendto) ;