WordPress Zero Spam - Version 4.1.1

Version Description

Download this release

Release Info

Developer bmarshall511
Plugin Icon 128x128 WordPress Zero Spam
Version 4.1.1
Comparing to
See all releases

Code changes from version 4.1.0 to 4.1.1

Files changed (3) hide show
  1. assets/js/wpzerospam.js +40 -0
  2. readme.txt +5 -1
  3. wordpress-zero-spam.php +2 -2
assets/js/wpzerospam.js CHANGED
@@ -2,8 +2,48 @@ var WordPressZeroSpam = {
2
  init: function() {
3
  var forms = "#commentform";
4
  forms += ", #registerform";
 
 
 
 
 
 
 
 
5
 
6
  if ( typeof wpzerospam.key != "undefined" ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  jQuery( forms ).on( "submit", function() {
8
  if ( ! jQuery( '[name="wpzerospam_key"]', jQuery( this ) ).length ) {
9
  jQuery( "<input>" )
2
  init: function() {
3
  var forms = "#commentform";
4
  forms += ", #registerform";
5
+ forms += ", #buddypress #signup_form";
6
+ forms += ", .wpzerospam";
7
+ forms += ", .ninja-forms-form";
8
+ forms += ", .wpforms-form";
9
+ forms += ", .gform_wrapper form";
10
+
11
+ // Astra theme - changes the comment if to #ast-commentform
12
+ forms += ", #ast-commentform";
13
 
14
  if ( typeof wpzerospam.key != "undefined" ) {
15
+ // Gravity forms
16
+ jQuery( document ).on( "gform_post_render", function() {
17
+ jQuery( "<input>" )
18
+ .attr( "type", "hidden" )
19
+ .attr( "name", "wpzerospam_key" )
20
+ .attr( "value", wpzerospam.key )
21
+ .appendTo( ".gform_wrapper form " );
22
+ });
23
+
24
+ // WPForms
25
+ jQuery( ".wpcf7-submit" ).click( function() {
26
+ jQuery( "<input>" )
27
+ .attr( "type", "hidden" )
28
+ .attr( "name", "wpzerospam_key" )
29
+ .attr( "value", zerospam.key )
30
+ .appendTo( ".wpcf7-form" );
31
+ });
32
+
33
+ // NinjaForms
34
+ jQuery( document ).on( "nfFormReady", function( e, layoutView ) {
35
+ var form = layoutView['$el'].find( 'form' );
36
+
37
+ jQuery( "<input>" )
38
+ .attr( "type", "hidden" )
39
+ .attr( "name", "wpzerospam_key" )
40
+ .attr( "value", zerospam.key )
41
+ .appendTo( form );
42
+
43
+ return true;
44
+ });
45
+
46
+ // All other forms
47
  jQuery( forms ).on( "submit", function() {
48
  if ( ! jQuery( '[name="wpzerospam_key"]', jQuery( this ) ).length ) {
49
  jQuery( "<input>" )
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://benmarshall.me
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
- Stable tag: 4.1.0
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
@@ -80,3 +80,7 @@ Yes, that's what does the magic and keeps spam bots out.
80
  * Added support for [Ninja Forms](https://wordpress.org/plugins/ninja-forms/)
81
  * Added support for [BuddyPress](https://wordpress.org/plugins/buddypress/)
82
  * Added support for [Contact Form by WPForms](https://wordpress.org/plugins/wpforms-lite/)
 
 
 
 
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
+ Stable tag: 4.1.1
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
80
  * Added support for [Ninja Forms](https://wordpress.org/plugins/ninja-forms/)
81
  * Added support for [BuddyPress](https://wordpress.org/plugins/buddypress/)
82
  * Added support for [Contact Form by WPForms](https://wordpress.org/plugins/wpforms-lite/)
83
+
84
+ = v4.1.1 =
85
+
86
+ * Fixed missing JS for new 3rd-party plugin support
wordpress-zero-spam.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @package WordPressZeroSpam
6
  * @subpackage WordPress
7
- * @since 4.1.0
8
  * @author Ben Marshall
9
  * @copyright 2020 Ben Marshall
10
  * @license GPL-2.0-or-later
@@ -13,7 +13,7 @@
13
  * Plugin Name: WordPress Zero Spam
14
  * Plugin URI: https://benmarshall.me/wordpress-zero-spam
15
  * Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
16
- * Version: 4.1.0
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall
4
  *
5
  * @package WordPressZeroSpam
6
  * @subpackage WordPress
7
+ * @since 4.1.1
8
  * @author Ben Marshall
9
  * @copyright 2020 Ben Marshall
10
  * @license GPL-2.0-or-later
13
  * Plugin Name: WordPress Zero Spam
14
  * Plugin URI: https://benmarshall.me/wordpress-zero-spam
15
  * Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
16
+ * Version: 4.1.1
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall