Google Forms - Version 0.82

Version Description

No known upgrade issues.

Download this release

Release Info

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

Code changes from version 0.81 to 0.82

Files changed (3) hide show
  1. index.php +3 -3
  2. readme.txt +6 -2
  3. wpgform-core.php +12 -3
index.php CHANGED
@@ -4,8 +4,8 @@
4
  * Plugin Name: Google Forms
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.81
8
- * Build: 0.81.$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.81') ;
29
 
30
  require_once('wpgform-core.php') ;
31
  require_once('wpgform-post-type.php') ;
4
  * Plugin Name: Google Forms
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.82
8
+ * Build: 0.82.$WCREV$
9
  * Last Modified: $WCDATE$
10
  * Author: Mike Walsh
11
  * Author URI: http://www.michaelwalsh.org
25
  *
26
  */
27
 
28
+ define('WPGFORM_VERSION', '0.82') ;
29
 
30
  require_once('wpgform-core.php') ;
31
  require_once('wpgform-post-type.php') ;
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.7.1
6
- Tested up to: 4.2.2
7
- Stable tag: 0.81
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -381,6 +381,10 @@ No known upgrade issues.
381
 
382
  == Change log ==
383
 
 
 
 
 
384
  = Version 0.81 =
385
  * Removed leftover debug code which generated output into the error log.
386
 
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.7.1
6
+ Tested up to: 4.3
7
+ Stable tag: 0.82
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
381
 
382
  == Change log ==
383
 
384
+ = Version 0.82 =
385
+ * Fixed bug with Google default text always being displayed regardless of global or form specific setting. This caused some buttons to always appear in English.
386
+ * Added additional debug information to examine wp_remote_post() parameters.
387
+
388
  = Version 0.81 =
389
  * Removed leftover debug code which generated output into the error log.
390
 
wpgform-core.php CHANGED
@@ -704,6 +704,10 @@ class wpGForm
704
  // compatibility.
705
 
706
  $results = ($o['spreadsheet'] === false) ? $o['results'] : $o['spreadsheet'] ;
 
 
 
 
707
  }
708
 
709
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ConstructGoogleForm') ;
@@ -1465,7 +1469,7 @@ jQuery(document).ready(function($) {
1465
  // })[0].nodeValue = "%s";
1466
  // }
1467
  // Replace Google supplied text? Form specific or global?
1468
- if ($o['override_google_default_text']) $js .= sprintf('
1469
  // Replace Google supplied text with "form specific override" values
1470
  $("div.%sss-required-asterisk").text("* %s");
1471
  $("div.%sss-radio div.%sss-printable-hint").text("%s");
@@ -1840,7 +1844,12 @@ jQuery(document).ready(function($) {
1840
  //array('sslverify' => false, 'body' => $body, 'timeout' => $timeout)) ;
1841
  array('sslverify' => false, 'body' => $q, 'timeout' => $timeout, 'user-agent' => $_SERVER['HTTP_USER_AGENT'])) ;
1842
 
1843
- if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
 
 
 
 
 
1844
 
1845
  // Double check response from wp_remote_post()
1846
 
@@ -1933,7 +1942,7 @@ jQuery(document).ready(function($) {
1933
  * @param string $sendto - email address to send content to
1934
  * @param string $results - URL of the spreadsheet which holds submitted data
1935
  */
1936
- function SendConfirmationEmail($format = WPGFORM_EMAIL_FORMAT_HTML, $sendto = false, $results = null)
1937
  {
1938
  $headers = array() ;
1939
  $wpgform_options = wpgform_get_plugin_options() ;
704
  // compatibility.
705
 
706
  $results = ($o['spreadsheet'] === false) ? $o['results'] : $o['spreadsheet'] ;
707
+
708
+ // Check to see if form has a Google Form default text overrides - older forms won't
709
+ if (array_key_exists('override_google_default_text', $o))
710
+ $override_google_default_text |= $o['override_google_default_text'] === 'on' ;
711
  }
712
 
713
  if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ConstructGoogleForm') ;
1469
  // })[0].nodeValue = "%s";
1470
  // }
1471
  // Replace Google supplied text? Form specific or global?
1472
+ if ($override_google_default_text) $js .= sprintf('
1473
  // Replace Google supplied text with "form specific override" values
1474
  $("div.%sss-required-asterisk").text("* %s");
1475
  $("div.%sss-radio div.%sss-printable-hint").text("%s");
1844
  //array('sslverify' => false, 'body' => $body, 'timeout' => $timeout)) ;
1845
  array('sslverify' => false, 'body' => $q, 'timeout' => $timeout, 'user-agent' => $_SERVER['HTTP_USER_AGENT'])) ;
1846
 
1847
+ if (WPGFORM_DEBUG)
1848
+ {
1849
+ wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
1850
+ wpgform_preprint_r(array('action' => $action, 'sslverify' => false,
1851
+ 'body' => $q, 'timeout' => $timeout, 'user-agent' => $_SERVER['HTTP_USER_AGENT'])) ;
1852
+ }
1853
 
1854
  // Double check response from wp_remote_post()
1855
 
1942
  * @param string $sendto - email address to send content to
1943
  * @param string $results - URL of the spreadsheet which holds submitted data
1944
  */
1945
+ static function SendConfirmationEmail($format = WPGFORM_EMAIL_FORMAT_HTML, $sendto = false, $results = null)
1946
  {
1947
  $headers = array() ;
1948
  $wpgform_options = wpgform_get_plugin_options() ;