Gravity Forms Zero Spam - Version 1.0.3

Version Description

  • Added support for multi-page forms (thanks, @supporthero)
Download this release

Release Info

Developer karpstrucking
Plugin Icon 128x128 Gravity Forms Zero Spam
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

Files changed (2) hide show
  1. gravityforms-zero-spam.php +9 -9
  2. readme.txt +6 -3
gravityforms-zero-spam.php CHANGED
@@ -4,9 +4,9 @@
4
  * Plugin Name: Gravity Forms Zero Spam
5
  * Plugin URI: http://www.gowp.com/plugins/gravityforms-zero-spam
6
  * Description: Enhance your Gravity Forms to include anti-spam measures originally based on the work of David Walsh's <a href="http://davidwalsh.name/wordpress-comment-spam">"Zero Spam"</a> technique.
7
- * Version: 1.0.2
8
  * Author: GoWP
9
- * Author URI: http://www.gowp.com
10
  * License: GPL-2.0+
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12
  */
@@ -33,20 +33,20 @@
33
  }
34
  public function get_key() { // retrieve they key, generating if needed
35
  if ( ! $key = get_option( 'gf_zero_spam_key' ) ) {
36
- $key = wp_generate_password( 64 );
37
- update_option( 'gf_zero_spam_key', $key );
38
  }
39
  return $key;
40
  }
41
  public function add_key_field( $form ) { // inject the hidden field and key into the form at submission
42
  ?>
43
- <script type="text/javascript">
44
  jQuery(document).ready(function($){
45
  var gforms = '.gform_wrapper form';
46
- $( gforms ).submit(function() {
47
- $('<input>').attr( "type", "hidden" )
48
- .attr( "name", "gf_zero_spam_key" )
49
- .attr( "value", "<?php echo $this->get_key(); ?>" )
50
  .appendTo( gforms );
51
  return true;
52
  });
4
  * Plugin Name: Gravity Forms Zero Spam
5
  * Plugin URI: http://www.gowp.com/plugins/gravityforms-zero-spam
6
  * Description: Enhance your Gravity Forms to include anti-spam measures originally based on the work of David Walsh's <a href="http://davidwalsh.name/wordpress-comment-spam">"Zero Spam"</a> technique.
7
+ * Version: 1.0.3
8
  * Author: GoWP
9
+ * Author URI: https://www.gowp.com
10
  * License: GPL-2.0+
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12
  */
33
  }
34
  public function get_key() { // retrieve they key, generating if needed
35
  if ( ! $key = get_option( 'gf_zero_spam_key' ) ) {
36
+ $key = wp_generate_password( 64, false, false );
37
+ update_option( 'gf_zero_spam_key', $key, FALSE );
38
  }
39
  return $key;
40
  }
41
  public function add_key_field( $form ) { // inject the hidden field and key into the form at submission
42
  ?>
43
+ <script type='text/javascript'>
44
  jQuery(document).ready(function($){
45
  var gforms = '.gform_wrapper form';
46
+ $( document ).on( 'submit', gforms ,function() {
47
+ $('<input>').attr( 'type', 'hidden' )
48
+ .attr( 'name', 'gf_zero_spam_key' )
49
+ .attr( 'value', '<?php echo $this->get_key(); ?>' )
50
  .appendTo( gforms );
51
  return true;
52
  });
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Gravity Forms Zero Spam ===
2
- Contributors: karpstrucking
3
  Tags: gravityforms, gravity forms, anti-spam, antispam, spam, spam-blocker, spambot, spammer, addons, add-ons
4
  Requires at least: 3.0.1
5
- Tested up to: 4.8
6
- Stable tag: 1.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -24,6 +24,9 @@ Yes.
24
  No. For that, we recommend Ben Marshall‘s [WordPress Zero Spam plugin](https://wordpress.org/plugins/zero-spam/). Note: As of version 1.5, Ben’s plugin includes support for Gravity Forms; if you install his plugin, you should remove ours.
25
 
26
  == Changelog ==
 
 
 
27
  = 1.0.2 =
28
  * Update FAQ and compatibility notes in readme.txt
29
 
1
  === Gravity Forms Zero Spam ===
2
+ Contributors: karpstrucking, supporthero
3
  Tags: gravityforms, gravity forms, anti-spam, antispam, spam, spam-blocker, spambot, spammer, addons, add-ons
4
  Requires at least: 3.0.1
5
+ Tested up to: 5.4.2
6
+ Stable tag: 1.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
24
  No. For that, we recommend Ben Marshall‘s [WordPress Zero Spam plugin](https://wordpress.org/plugins/zero-spam/). Note: As of version 1.5, Ben’s plugin includes support for Gravity Forms; if you install his plugin, you should remove ours.
25
 
26
  == Changelog ==
27
+ = 1.0.3 =
28
+ * Added support for multi-page forms (thanks, @supporthero)
29
+
30
  = 1.0.2 =
31
  * Update FAQ and compatibility notes in readme.txt
32