WordPress Zero Spam - Version 4.9.1

Version Description

  • Fix for PHP notice on the modals for spam detections
Download this release

Release Info

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

Code changes from version 4.9.0 to 4.9.1

classes/class-wpzerospam-log-table.php CHANGED
@@ -187,7 +187,9 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
187
  }
188
 
189
  if ( ! empty( $item->submission_data ) ) {
190
- foreach( $item->submission_data as $key => $value ):
 
 
191
  if ( ! $value ) { continue; }
192
  switch( $key ):
193
  case 'comment_post_ID':
@@ -354,6 +356,14 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
354
  echo '</div>';
355
  break;
356
 
 
 
 
 
 
 
 
 
357
  // Formidable fields
358
  case 'frm_action':
359
  echo '<div class="wpzerospam-details-item">';
187
  }
188
 
189
  if ( ! empty( $item->submission_data ) ) {
190
+ $submission_data = json_decode( $item->submission_data, true );
191
+
192
+ foreach( $submission_data as $key => $value ):
193
  if ( ! $value ) { continue; }
194
  switch( $key ):
195
  case 'comment_post_ID':
356
  echo '</div>';
357
  break;
358
 
359
+ // Ninja Forms fields
360
+ case 'id':
361
+ echo '<div class="wpzerospam-details-item">';
362
+ echo '<div class="wpzerospam-details-label">' . __( 'ID', 'wpzerospam' ) . '</div>';
363
+ echo '<div class="wpzerospam-details-data">' . $value . '</div>';
364
+ echo '</div>';
365
+ break;
366
+
367
  // Formidable fields
368
  case 'frm_action':
369
  echo '<div class="wpzerospam-details-item">';
inc/helpers.php CHANGED
@@ -642,7 +642,7 @@ if ( ! function_exists( 'wpzerospam_ip' ) ) {
642
  $ip = explode( ',', $ip );
643
  $ip = trim( $ip[0] );
644
 
645
- if ( false === WP_Http::is_ip_address( $ip ) ) { return false; }
646
 
647
  return $ip;
648
  }
642
  $ip = explode( ',', $ip );
643
  $ip = trim( $ip[0] );
644
 
645
+ if ( ! rest_is_ip_address( $ip ) ) { return false; }
646
 
647
  return $ip;
648
  }
integrations/gravity-forms/gravity-forms.php CHANGED
@@ -7,7 +7,7 @@
7
  */
8
 
9
  /**
10
- * Add the 'fluentform' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
  $types = array_merge( $types, [ 'gform' => 'Gravity Forms' ] );
@@ -15,7 +15,7 @@ add_filter( 'wpzerospam_types', function( $types ) {
15
  });
16
 
17
  /**
18
- * Validation for CF7 submissions
19
  */
20
  if ( ! function_exists( 'wpzerospam_gform_validate' ) ) {
21
  function wpzerospam_gform_validate( $form ) {
@@ -34,7 +34,7 @@ add_action( 'gform_pre_submission', 'wpzerospam_gform_validate' );
34
  * Enqueue the Gravity Forms JS
35
  */
36
  if ( ! function_exists( 'wpzerospam_gravity_forms' ) ) {
37
- function wpzerospam_gravity_forms( $form ) {
38
  wp_enqueue_script(
39
  'wpzerospam-integration-gravity-forms',
40
  plugin_dir_url( WORDPRESS_ZERO_SPAM ) .
@@ -45,4 +45,4 @@ if ( ! function_exists( 'wpzerospam_gravity_forms' ) ) {
45
  );
46
  }
47
  }
48
- add_action( 'gform_enqueue_scripts', 'wpzerospam_gravity_forms' );
7
  */
8
 
9
  /**
10
+ * Add the 'gform' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
  $types = array_merge( $types, [ 'gform' => 'Gravity Forms' ] );
15
  });
16
 
17
  /**
18
+ * Validation for Gravity Form submissions
19
  */
20
  if ( ! function_exists( 'wpzerospam_gform_validate' ) ) {
21
  function wpzerospam_gform_validate( $form ) {
34
  * Enqueue the Gravity Forms JS
35
  */
36
  if ( ! function_exists( 'wpzerospam_gravity_forms' ) ) {
37
+ function wpzerospam_gravity_forms( $form, $is_ajax ) {
38
  wp_enqueue_script(
39
  'wpzerospam-integration-gravity-forms',
40
  plugin_dir_url( WORDPRESS_ZERO_SPAM ) .
45
  );
46
  }
47
  }
48
+ add_action( 'gform_enqueue_scripts', 'wpzerospam_gravity_forms', 10, 2 );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://benmarshall.me/donate/?utm_source=wordpress_zero_spam&utm_m
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
- Stable tag: 4.9.0
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
@@ -39,7 +39,7 @@ WordPress Zero Spam blocks spam submissions including comments, registrations an
39
  * WordPress user registrations
40
  * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) submissions
41
  * [Gravity Forms](https://www.gravityforms.com/) submissions
42
- * [Ninja Forms](https://wordpress.org/plugins/ninja-forms/) submissions
43
  * [BuddyPress](https://wordpress.org/plugins/buddypress/) registrations
44
  * [Contact Form by WPForms](https://wordpress.org/plugins/wpforms-lite/) submissions
45
  * [WP Fluent Forms](https://wordpress.org/plugins/fluentform/) submissions
@@ -123,6 +123,10 @@ Yes, that's what does the magic and keeps spam bots out.
123
 
124
  == Changelog ==
125
 
 
 
 
 
126
  = 4.9.0 =
127
 
128
  * Added support for [Formidable Forms](https://wordpress.org/plugins/formidable/). See [#112](https://github.com/bmarshall511/wordpress-zero-spam/issues/112).
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
+ Stable tag: 4.9.1
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
39
  * WordPress user registrations
40
  * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) submissions
41
  * [Gravity Forms](https://www.gravityforms.com/) submissions
42
+ * [Ninja Forms](https://wordpress.org/plugins/ninja-forms/) submissions*
43
  * [BuddyPress](https://wordpress.org/plugins/buddypress/) registrations
44
  * [Contact Form by WPForms](https://wordpress.org/plugins/wpforms-lite/) submissions
45
  * [WP Fluent Forms](https://wordpress.org/plugins/fluentform/) submissions
123
 
124
  == Changelog ==
125
 
126
+ = 4.9.1 =
127
+
128
+ * Fix for PHP notice on the modals for spam detections
129
+
130
  = 4.9.0 =
131
 
132
  * Added support for [Formidable Forms](https://wordpress.org/plugins/formidable/). See [#112](https://github.com/bmarshall511/wordpress-zero-spam/issues/112).
wordpress-zero-spam.php CHANGED
@@ -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.9.0
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall
@@ -31,7 +31,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
31
  // Define plugin constants
32
  define( 'WORDPRESS_ZERO_SPAM', __FILE__ );
33
  define( 'WORDPRESS_ZERO_SPAM_DB_VERSION', '0.2' );
34
- define( 'WORDPRESS_ZERO_SPAM_VERSION', '4.9.0' );
35
 
36
  /**
37
  * Helpers
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.9.1
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall
31
  // Define plugin constants
32
  define( 'WORDPRESS_ZERO_SPAM', __FILE__ );
33
  define( 'WORDPRESS_ZERO_SPAM_DB_VERSION', '0.2' );
34
+ define( 'WORDPRESS_ZERO_SPAM_VERSION', '4.9.1' );
35
 
36
  /**
37
  * Helpers