Version Description
No known upgrade issues.
Download this release
Release Info
Developer | mpwalsh8 |
Plugin | Google Forms |
Version | 0.79 |
Comparing to | |
See all releases |
Code changes from version 0.78 to 0.79
- index.php +3 -3
- readme.txt +5 -1
- wpgform-core.php +10 -10
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.
|
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: 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 |
*
|
26 |
*/
|
27 |
|
28 |
+
define('WPGFORM_VERSION', '0.79') ;
|
29 |
|
30 |
require_once('wpgform-core.php') ;
|
31 |
require_once('wpgform-post-type.php') ;
|
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.7.1
|
6 |
Tested up to: 4.1.2
|
7 |
-
Stable tag: 0.
|
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.78 =
|
385 |
* Bug fix for required validation field with spaces in the optional message.
|
386 |
|
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 |
|
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).
|
387 |
+
|
388 |
= Version 0.78 =
|
389 |
* Bug fix for required validation field with spaces in the optional message.
|
390 |
|
wpgform-core.php
CHANGED
@@ -892,7 +892,7 @@ class wpGForm
|
|
892 |
if (false === ( self::$response = get_site_transient( WPGFORM_FORM_TRANSIENT.$o['id'] ) ) )
|
893 |
{
|
894 |
// There was no transient, so let's regenerate the data and save it
|
895 |
-
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12)) ;
|
896 |
set_site_transient( WPGFORM_FORM_TRANSIENT.$o['id'], self::$response, $transient_time*MINUTE_IN_SECONDS );
|
897 |
}
|
898 |
}
|
@@ -901,16 +901,18 @@ class wpGForm
|
|
901 |
if (false === ( self::$response = get_transient( WPGFORM_FORM_TRANSIENT.$o['id'] ) ) )
|
902 |
{
|
903 |
// There was no transient, so let's regenerate the data and save it
|
904 |
-
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12)) ;
|
905 |
set_transient( WPGFORM_FORM_TRANSIENT.$o['id'], self::$response, $transient_time*MINUTE_IN_SECONDS );
|
906 |
}
|
907 |
}
|
908 |
else
|
909 |
{
|
910 |
-
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12)) ;
|
911 |
}
|
912 |
}
|
913 |
|
|
|
|
|
914 |
// Retrieve the HTML from the URL
|
915 |
|
916 |
if (is_wp_error(self::$response))
|
@@ -1293,13 +1295,11 @@ jQuery(document).ready(function($) {
|
|
1293 |
$extras[$value][] = sprintf('%s: "%s"',
|
1294 |
$meta_type[$key], empty($meta_value[$key]) ? 'true' : $meta_value[$key]) ;
|
1295 |
}
|
1296 |
-
elseif ($meta_type[$key] == 'required')
|
1297 |
{
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
if (!empty($meta_value[$key]))
|
1302 |
-
$vMsgs_js[] = sprintf(' "%s": "%s"', $value, $meta_value[$key]) ;
|
1303 |
}
|
1304 |
else
|
1305 |
{
|
@@ -1830,7 +1830,7 @@ jQuery(document).ready(function($) {
|
|
1830 |
|
1831 |
self::$response = wp_remote_post($action,
|
1832 |
//array('sslverify' => false, 'body' => $body, 'timeout' => $timeout)) ;
|
1833 |
-
array('sslverify' => false, 'body' => $q, 'timeout' => $timeout)) ;
|
1834 |
|
1835 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1836 |
|
892 |
if (false === ( self::$response = get_site_transient( WPGFORM_FORM_TRANSIENT.$o['id'] ) ) )
|
893 |
{
|
894 |
// There was no transient, so let's regenerate the data and save it
|
895 |
+
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12, 'user-agent' => $_SERVER['HTTP_USER_AGENT'])) ;
|
896 |
set_site_transient( WPGFORM_FORM_TRANSIENT.$o['id'], self::$response, $transient_time*MINUTE_IN_SECONDS );
|
897 |
}
|
898 |
}
|
901 |
if (false === ( self::$response = get_transient( WPGFORM_FORM_TRANSIENT.$o['id'] ) ) )
|
902 |
{
|
903 |
// There was no transient, so let's regenerate the data and save it
|
904 |
+
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12, 'user-agent' => $_SERVER['HTTP_USER_AGENT'])) ;
|
905 |
set_transient( WPGFORM_FORM_TRANSIENT.$o['id'], self::$response, $transient_time*MINUTE_IN_SECONDS );
|
906 |
}
|
907 |
}
|
908 |
else
|
909 |
{
|
910 |
+
self::$response = wp_remote_get($form, array('sslverify' => false, 'timeout' => $timeout, 'redirection' => 12, 'user-agent' => $_SERVER['HTTP_USER_AGENT'])) ;
|
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))
|
1295 |
$extras[$value][] = sprintf('%s: "%s"',
|
1296 |
$meta_type[$key], empty($meta_value[$key]) ? 'true' : $meta_value[$key]) ;
|
1297 |
}
|
1298 |
+
elseif (($meta_type[$key] == 'required') || ($meta_type[$key] == 'email'))
|
1299 |
{
|
1300 |
+
$vRules_js[] = sprintf(' "%s": { %s: true }', $value, $meta_type[$key]) ;
|
1301 |
+
if (!empty($meta_value[$key]))
|
1302 |
+
$vMsgs_js[] = sprintf(' "%s": "%s"', $value, $meta_value[$key]) ;
|
|
|
|
|
1303 |
}
|
1304 |
else
|
1305 |
{
|
1830 |
|
1831 |
self::$response = wp_remote_post($action,
|
1832 |
//array('sslverify' => false, 'body' => $body, 'timeout' => $timeout)) ;
|
1833 |
+
array('sslverify' => false, 'body' => $q, 'timeout' => $timeout, 'user-agent' => $_SERVER['HTTP_USER_AGENT'])) ;
|
1834 |
|
1835 |
if (WPGFORM_DEBUG) wpgform_whereami(__FILE__, __LINE__, 'ProcessGoogleForm') ;
|
1836 |
|