Version Description
No known upgrade issues.
Download this release
Release Info
Developer | mpwalsh8 |
Plugin | Google Forms |
Version | 0.69 |
Comparing to | |
See all releases |
Code changes from version 0.68 to 0.69
- index.php +3 -3
- readme.txt +6 -2
- wpgform-core.php +13 -14
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.69
|
8 |
+
* Build: 0.69.$WCREV$
|
9 |
* Last Modified: $WCDATE$
|
10 |
* Author: Mike Walsh
|
11 |
* Author URI: http://www.michaelwalsh.org
|
25 |
*
|
26 |
*/
|
27 |
|
28 |
+
define('WPGFORM_VERSION', '0.69') ;
|
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: 3.
|
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.68 =
|
385 |
* Fixed a bug due to missing named parameter passed to wp_update_post() which manifested itself in a call to array_map() as part of core WordPress function.
|
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: 3.9
|
7 |
+
Stable tag: 0.69
|
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.69 =
|
385 |
+
* Fixed bug in generated jQuery for Validation which caused syntax errors which could then interfere with redirect.
|
386 |
+
* Added support for embedded images in Google Forms.
|
387 |
+
|
388 |
= Version 0.68 =
|
389 |
* Fixed a bug due to missing named parameter passed to wp_update_post() which manifested itself in a call to array_map() as part of core WordPress function.
|
390 |
|
wpgform-core.php
CHANGED
@@ -956,6 +956,7 @@ class wpGForm
|
|
956 |
,'h5' => array('class' => array())
|
957 |
,'h6' => array('class' => array())
|
958 |
,'i' => array()
|
|
|
959 |
,'label' => array('class' => array(), 'for' => array())
|
960 |
,'input' => array('id' => array(), 'name' => array(), 'class' => array(), 'type' => array(), 'value' => array(), 'checked' => array())
|
961 |
,'select' => array('name' => array(), 'for' => array(), 'checked' => array())
|
@@ -1213,12 +1214,8 @@ jQuery(document).ready(function($) {
|
|
1213 |
});
|
1214 |
}
|
1215 |
', $uid, $uid, $user_email_html) ;
|
1216 |
-
$vRules_js[] = '
|
1217 |
-
|
1218 |
-
email: true
|
1219 |
-
}' ;
|
1220 |
-
$vMsgs_js[] = sprintf('
|
1221 |
-
"wpgform-user-email": "%s"', __('A valid email address is required.', WPGFORM_I18N_DOMAIN)) ;
|
1222 |
}
|
1223 |
|
1224 |
// Is CAPTCHA enabled?
|
@@ -1288,19 +1285,20 @@ jQuery(document).ready(function($) {
|
|
1288 |
foreach ($extras as $key => $value)
|
1289 |
{
|
1290 |
$js .= sprintf(' "%s%s": {', $uid, $key) ;
|
1291 |
-
foreach ($value as $extra)
|
1292 |
-
$js .= sprintf('%s%s', $extra,
|
1293 |
-
$js .= sprintf('%s%s%s',
|
1294 |
}
|
1295 |
}
|
|
|
1296 |
if (!empty($vRules_js))
|
1297 |
{
|
1298 |
// Clean up JS if extras were already output
|
1299 |
if (!empty($extras))
|
1300 |
$js = sprintf('%s,%s', substr($js, 0, strrpos($js, '}') + 1), PHP_EOL) ;
|
1301 |
|
1302 |
-
foreach ($vRules_js as $r)
|
1303 |
-
$js .= sprintf(' %s%s', $r,
|
1304 |
}
|
1305 |
else
|
1306 |
$js .= '},' ;
|
@@ -1309,11 +1307,12 @@ jQuery(document).ready(function($) {
|
|
1309 |
|
1310 |
if (!empty($vMsgs_js))
|
1311 |
{
|
1312 |
-
foreach ($vMsgs_js as $m)
|
1313 |
-
|
|
|
1314 |
}
|
1315 |
else
|
1316 |
-
$js .= '}' ;
|
1317 |
$js .= '
|
1318 |
}) ;' . PHP_EOL ;
|
1319 |
}
|
956 |
,'h5' => array('class' => array())
|
957 |
,'h6' => array('class' => array())
|
958 |
,'i' => array()
|
959 |
+
,'img' => array('class' => array(), 'alt' => array(), 'title' => array(), 'src' => array())
|
960 |
,'label' => array('class' => array(), 'for' => array())
|
961 |
,'input' => array('id' => array(), 'name' => array(), 'class' => array(), 'type' => array(), 'value' => array(), 'checked' => array())
|
962 |
,'select' => array('name' => array(), 'for' => array(), 'checked' => array())
|
1214 |
});
|
1215 |
}
|
1216 |
', $uid, $uid, $user_email_html) ;
|
1217 |
+
$vRules_js[] = ' "wpgform-user-email": { email: true }' ;
|
1218 |
+
$vMsgs_js[] = sprintf(' "wpgform-user-email": "%s"', __('A valid email address is required.', WPGFORM_I18N_DOMAIN)) ;
|
|
|
|
|
|
|
|
|
1219 |
}
|
1220 |
|
1221 |
// Is CAPTCHA enabled?
|
1285 |
foreach ($extras as $key => $value)
|
1286 |
{
|
1287 |
$js .= sprintf(' "%s%s": {', $uid, $key) ;
|
1288 |
+
foreach ($value as $vk => $extra)
|
1289 |
+
$js .= sprintf('%s%s', $extra, end(array_keys($value)) === $vk ? '}' : ', ') ;
|
1290 |
+
$js .= sprintf('%s%s%s', end(array_keys($extras)) === $key ? '' : ',', PHP_EOL, end(array_keys($extras)) === $key ? ' ' : '') ;
|
1291 |
}
|
1292 |
}
|
1293 |
+
|
1294 |
if (!empty($vRules_js))
|
1295 |
{
|
1296 |
// Clean up JS if extras were already output
|
1297 |
if (!empty($extras))
|
1298 |
$js = sprintf('%s,%s', substr($js, 0, strrpos($js, '}') + 1), PHP_EOL) ;
|
1299 |
|
1300 |
+
foreach ($vRules_js as $rk => $r)
|
1301 |
+
$js .= sprintf(' %s%s', $r, end(array_keys($vRules_js)) === $rk ? sprintf('%s },', PHP_EOL) : sprintf(',%s', PHP_EOL)) ;
|
1302 |
}
|
1303 |
else
|
1304 |
$js .= '},' ;
|
1307 |
|
1308 |
if (!empty($vMsgs_js))
|
1309 |
{
|
1310 |
+
foreach ($vMsgs_js as $mk => $m)
|
1311 |
+
//$js .= sprintf(' %s%s', $m, end(array_keys($vMsgs_js)) === $mk ? sprintf('%s },', PHP_EOL) : ', ') ;
|
1312 |
+
$js .= sprintf(' %s%s', $m, end(array_keys($vMsgs_js)) === $mk ? sprintf('%s },', PHP_EOL) : sprintf(',%s', PHP_EOL)) ;
|
1313 |
}
|
1314 |
else
|
1315 |
+
$js .= ' }' ;
|
1316 |
$js .= '
|
1317 |
}) ;' . PHP_EOL ;
|
1318 |
}
|