Google Forms - Version 0.80

Version Description

No known upgrade issues.

Download this release

Release Info

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

Code changes from version 0.79 to 0.80

Files changed (3) hide show
  1. index.php +3 -3
  2. readme.txt +5 -2
  3. wpgform-core.php +17 -7
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.79
8
- * Build: 0.79.$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.79') ;
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.80
8
+ * Build: 0.80.$WCREV$
9
  * Last Modified: $WCDATE$
10
  * Author: Mike Walsh
11
  * Author URI: http://www.michaelwalsh.org
25
  *
26
  */
27
 
28
+ define('WPGFORM_VERSION', '0.80') ;
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.1.2
7
- Stable tag: 0.79
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -381,6 +381,9 @@ No known upgrade issues.
381
 
382
  == Change log ==
383
 
 
 
 
384
  = Version 0.79 =
385
  * Bug fix for required email validation field with optional message.
386
  * Added user-agent argument to HTTP API remote get and post requests, allows Google to return HTML5 inputs for browsers which support it (with some limitations).
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.80
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.80 =
385
+ * Resolved a number of PHP Strict Standard notices resulting from calling non-static functions statically.
386
+
387
  = Version 0.79 =
388
  * Bug fix for required email validation field with optional message.
389
  * Added user-agent argument to HTTP API remote get and post requests, allows Google to return HTML5 inputs for browsers which support it (with some limitations).
wpgform-core.php CHANGED
@@ -911,8 +911,6 @@ class wpGForm
911
  }
912
  }
913
 
914
- error_log($_SERVER['HTTP_USER_AGENT']) ;
915
-
916
  // Retrieve the HTML from the URL
917
 
918
  if (is_wp_error(self::$response))
@@ -1353,11 +1351,17 @@ jQuery(document).ready(function($) {
1353
  {
1354
  $js .= sprintf(' "%s%s": {', $uid, $key) ;
1355
  foreach ($value as $vk => $extra)
1356
- $js .= sprintf('%s%s', $extra, end(array_keys($value)) === $vk ? '}' : ', ') ;
1357
- $js .= sprintf('%s%s%s', end(array_keys($extras)) === $key ? '' : ',', PHP_EOL, end(array_keys($extras)) === $key ? ' ' : '') ;
 
 
 
 
1358
  }
1359
  }
1360
 
 
 
1361
  if (!empty($vRules_js))
1362
  {
1363
  // Clean up JS if extras were already output
@@ -1365,7 +1369,10 @@ jQuery(document).ready(function($) {
1365
  $js = sprintf('%s,%s', substr($js, 0, strrpos($js, '}') + 1), PHP_EOL) ;
1366
 
1367
  foreach ($vRules_js as $rk => $r)
1368
- $js .= sprintf(' %s%s', $r, end(array_keys($vRules_js)) === $rk ? sprintf('%s },', PHP_EOL) : sprintf(',%s', PHP_EOL)) ;
 
 
 
1369
  }
1370
  else
1371
  $js .= '},' ;
@@ -1375,14 +1382,17 @@ jQuery(document).ready(function($) {
1375
  if (!empty($vMsgs_js))
1376
  {
1377
  foreach ($vMsgs_js as $mk => $m)
1378
- //$js .= sprintf(' %s%s', $m, end(array_keys($vMsgs_js)) === $mk ? sprintf('%s },', PHP_EOL) : ', ') ;
1379
- $js .= sprintf(' %s%s', $m, end(array_keys($vMsgs_js)) === $mk ? sprintf('%s },', PHP_EOL) : sprintf(',%s', PHP_EOL)) ;
 
 
1380
  }
1381
  else
1382
  $js .= ' }' ;
1383
  $js .= '
1384
  }) ;' . PHP_EOL ;
1385
  }
 
1386
 
1387
  // Handle hidden fields
1388
 
911
  }
912
  }
913
 
 
 
914
  // Retrieve the HTML from the URL
915
 
916
  if (is_wp_error(self::$response))
1351
  {
1352
  $js .= sprintf(' "%s%s": {', $uid, $key) ;
1353
  foreach ($value as $vk => $extra)
1354
+ {
1355
+ $k = array_keys($value) ;
1356
+ $js .= sprintf('%s%s', $extra, end($k) === $vk ? '}' : ', ') ;
1357
+ }
1358
+ $k = array_keys($extras) ;
1359
+ $js .= sprintf('%s%s%s', end($k) === $key ? '' : ',', PHP_EOL, end($k) === $key ? ' ' : '') ;
1360
  }
1361
  }
1362
 
1363
+
1364
+ error_log(sprintf('%s::%s', basename(__FILE__), __LINE__)) ;
1365
  if (!empty($vRules_js))
1366
  {
1367
  // Clean up JS if extras were already output
1369
  $js = sprintf('%s,%s', substr($js, 0, strrpos($js, '}') + 1), PHP_EOL) ;
1370
 
1371
  foreach ($vRules_js as $rk => $r)
1372
+ {
1373
+ $k = array_keys($vRules_js) ;
1374
+ $js .= sprintf(' %s%s', $r, end($k) === $rk ? sprintf('%s },', PHP_EOL) : sprintf(',%s', PHP_EOL)) ;
1375
+ }
1376
  }
1377
  else
1378
  $js .= '},' ;
1382
  if (!empty($vMsgs_js))
1383
  {
1384
  foreach ($vMsgs_js as $mk => $m)
1385
+ {
1386
+ $k = array_keys($vMsgs_js) ;
1387
+ $js .= sprintf(' %s%s', $m, end($k) === $mk ? sprintf('%s },', PHP_EOL) : sprintf(',%s', PHP_EOL)) ;
1388
+ }
1389
  }
1390
  else
1391
  $js .= ' }' ;
1392
  $js .= '
1393
  }) ;' . PHP_EOL ;
1394
  }
1395
+ error_log(sprintf('%s::%s', basename(__FILE__), __LINE__)) ;
1396
 
1397
  // Handle hidden fields
1398