WordPress Zero Spam - Version 1.4.0

Version Description

  • Added zero_spam_found_spam_comment and zero_spam_found_spam_registration action hooks (thanks @tangrufus)
  • Minor updates to the readme file
Download this release

Release Info

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

Code changes from version 1.3.3 to 1.4.0

Files changed (2) hide show
  1. readme.txt +23 -6
  2. zero-spam.php +3 -1
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WordPress Zero Spam ===
2
- Contributors: bmarshall511, afragen
3
  Donate link: https://www.gittip.com/bmarshall511/
4
  Tags: comments, spam, antispam, anti-spam, comment spam, spambot, spammer, spam free, spam blocker, registration spam
5
  Requires at least: 3.0.0
6
- Tested up to: 3.9.2
7
- Stable tag: 1.3.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -22,12 +22,12 @@ Major features in WordPress Zero Spam include:
22
 
23
  * **No captcha**, because spam is not users' problem
24
  * **No moderation queues**, because spam is not administrators' problem
25
- * **Blocks spam comments** with the use of JavaScript
26
- * **Blocks spam registrations** with the use of JavaScript
27
 
28
  **Languages:** English
29
 
30
- If you have suggestions for a new add-on, feel free to email me at me@benmarshall.me. Want regular updates? Follow me on Twitter <a href="http://www.benmarshall.me" target="_blank">Ben Marshall</a>.
31
 
32
  == Installation ==
33
 
@@ -36,14 +36,29 @@ If you have suggestions for a new add-on, feel free to email me at me@benmarshal
36
 
37
  == Frequently Asked Questions ==
38
 
 
 
 
 
39
  = I keep getting 'There was a problem processing your comment.' =
40
 
41
  Be sure JavaScript is enabled and there are no JS errors.
42
 
 
 
 
 
 
 
 
43
  == Screenshots ==
44
 
45
  == Changelog ==
46
 
 
 
 
 
47
  = 1.3.1 - 1.3.3 =
48
  * Minor fixes to WP SVN repo
49
 
@@ -70,4 +85,6 @@ Be sure JavaScript is enabled and there are no JS errors.
70
  * Thanks to [David Walsh](http://davidwalsh.name) [@davidwalshblog](https://twitter.com/davidwalshblog) for the inspiration behind this plugin.
71
 
72
  == Contributors ==
 
73
  * [Andy Fragen](https://github.com/afragen)
 
1
  === WordPress Zero Spam ===
2
+ Contributors: bmarshall511, afragen, tangrufus
3
  Donate link: https://www.gittip.com/bmarshall511/
4
  Tags: comments, spam, antispam, anti-spam, comment spam, spambot, spammer, spam free, spam blocker, registration spam
5
  Requires at least: 3.0.0
6
+ Tested up to: 4.0.0
7
+ Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
22
 
23
  * **No captcha**, because spam is not users' problem
24
  * **No moderation queues**, because spam is not administrators' problem
25
+ * **Blocks spam registrations & comments** with the use of JavaScript
26
+ * **Extend the plugin** with action hooks
27
 
28
  **Languages:** English
29
 
30
+ If you have suggestions for a new add-on, feel free to email me at me@benmarshall.me. Want regular updates? <a href="https://twitter.com/bmarshall0511">Follow me on Twitter</a> or <a href="http://www.benmarshall.me" target="_blank">visit my blog</a>.
31
 
32
  == Installation ==
33
 
36
 
37
  == Frequently Asked Questions ==
38
 
39
+ = Is JavaScript required for this plugin to work? =
40
+
41
+ Yes, that's what does the magic and keeps spam bots out.
42
+
43
  = I keep getting 'There was a problem processing your comment.' =
44
 
45
  Be sure JavaScript is enabled and there are no JS errors.
46
 
47
+ = Can I extend the plugin with action hooks? =
48
+
49
+ Yes, currently there's two hooks available:
50
+
51
+ * `zero_spam_found_spam_registration` - Runs after a spam registration is detected
52
+ * `zero_spam_found_spam_comment` - Runs after a spam comment is detected
53
+
54
  == Screenshots ==
55
 
56
  == Changelog ==
57
 
58
+ = 1.4.0 =
59
+ * Added `zero_spam_found_spam_comment` and `zero_spam_found_spam_registration` action hooks (thanks @tangrufus)
60
+ * Minor updates to the readme file
61
+
62
  = 1.3.1 - 1.3.3 =
63
  * Minor fixes to WP SVN repo
64
 
85
  * Thanks to [David Walsh](http://davidwalsh.name) [@davidwalshblog](https://twitter.com/davidwalshblog) for the inspiration behind this plugin.
86
 
87
  == Contributors ==
88
+ * [Ben Marshall](https://github.com/bmarshall511)
89
  * [Andy Fragen](https://github.com/afragen)
90
+ * [Tang Rufus](https://github.com/TangRufus)
zero-spam.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WordPress Zero Spam
4
  * Plugin URI: http://www.benmarshall.me/wordpress-zero-spam-plugin
5
  * 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>.
6
- * Version: 1.3.3
7
  * Author: Ben Marshall
8
  * Author URI: http://www.benmarshall.me
9
  * License: GPL2
@@ -105,6 +105,7 @@ class Zero_Spam {
105
  */
106
  public function preprocess_comment( $commentdata ) {
107
  if ( ! isset ( $_POST['zero-spam'] ) && ! current_user_can( 'moderate_comments' ) ) {
 
108
  die( __( 'There was a problem processing your comment.', 'zerospam' ) );
109
  }
110
  return $commentdata;
@@ -123,6 +124,7 @@ class Zero_Spam {
123
  */
124
  public function preprocess_registration( $errors, $sanitized_user_login, $user_email ) {
125
  if ( ! isset ( $_POST['zero-spam'] ) ) {
 
126
  $errors->add( 'spam_error', __( '<strong>ERROR</strong>: There was a problem processing your registration.', 'zerospam' ) );
127
  }
128
  return $errors;
3
  * Plugin Name: WordPress Zero Spam
4
  * Plugin URI: http://www.benmarshall.me/wordpress-zero-spam-plugin
5
  * 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>.
6
+ * Version: 1.4.0
7
  * Author: Ben Marshall
8
  * Author URI: http://www.benmarshall.me
9
  * License: GPL2
105
  */
106
  public function preprocess_comment( $commentdata ) {
107
  if ( ! isset ( $_POST['zero-spam'] ) && ! current_user_can( 'moderate_comments' ) ) {
108
+ do_action( 'zero_spam_found_spam_comment', $commentdata );
109
  die( __( 'There was a problem processing your comment.', 'zerospam' ) );
110
  }
111
  return $commentdata;
124
  */
125
  public function preprocess_registration( $errors, $sanitized_user_login, $user_email ) {
126
  if ( ! isset ( $_POST['zero-spam'] ) ) {
127
+ do_action( 'zero_spam_found_spam_registration', $errors, $sanitized_user_login, $user_email );
128
  $errors->add( 'spam_error', __( '<strong>ERROR</strong>: There was a problem processing your registration.', 'zerospam' ) );
129
  }
130
  return $errors;