WordPress Zero Spam - Version 1.1.0

Version Description

  • Updated theme documentation.
  • WordPress generator meta tag removed to help hide WordPress sites from spambots.
Download this release

Release Info

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

Code changes from version 1.0.0 to 1.1.0

Files changed (3) hide show
  1. readme.txt +24 -5
  2. zero-spam.js +0 -27
  3. zero-spam.php +40 -2
readme.txt CHANGED
@@ -1,18 +1,30 @@
1
- === Plugin Name ===
2
  Contributors: bmarshall511
3
  Donate link: https://www.gittip.com/bmarshall511/
4
- Tags: comments, spam
5
  Requires at least: 3.0.0
6
  Tested up to: 3.9.1
7
- Stable tag: 1.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Zero Spam makes blocking spam a cinch without all the bloated options. Just install, activate and say goodbye to spam. Based on work by David Walsh.
12
 
13
  == Description ==
14
 
15
- Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch without all the bloated options. <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
 
17
  == Installation ==
18
 
@@ -29,5 +41,12 @@ Be sure JavaScript is enabled and there are no JS errors.
29
 
30
  == Changelog ==
31
 
 
 
 
 
32
  = 1.0.0 =
33
  * Initial release.
 
 
 
1
+ === WordPress Zero Spam ===
2
  Contributors: bmarshall511
3
  Donate link: https://www.gittip.com/bmarshall511/
4
+ Tags: comments, spam, antispam, anti-spam, comment spam, spambot, spammer, spam free, spam blocker
5
  Requires at least: 3.0.0
6
  Tested up to: 3.9.1
7
+ Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Zero Spam makes blocking spam comments a cinch. Install, activate and enjoy a spam-free site.
12
 
13
  == Description ==
14
 
15
+ **Why should your users prove that they are humans by filling captchas? Lets bots prove their are not bots the <a href="http://www.benmarshall.me/wordpress-zero-spam-plugin/" target="_blank">WordPress Zero Spam plugin</a>.**
16
+
17
+ WordPress Zero Spam blocks spam in comments automatically without any additional config or setup. Just install, actiavte and enjoy a spam-free site. Initially built based on the work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
18
+
19
+ Major features in WordPress Zero Spam include:
20
+
21
+ * **No captcha**, because spam is not users' problem
22
+ * **No moderation queues**, because spam is not administrators' problem
23
+ * Blocks spam comments with this use of JavaScript
24
+
25
+ **Languages:** English
26
+
27
+ <a href="http://www.benmarshall.me" target="_blank">Follow me on Twitter</a> to keep up with the latest updates.
28
 
29
  == Installation ==
30
 
41
 
42
  == Changelog ==
43
 
44
+ = 1.1.0 =
45
+ * Updated theme documentation.
46
+ * WordPress generator meta tag removed to help hide WordPress sites from spambots.
47
+
48
  = 1.0.0 =
49
  * Initial release.
50
+
51
+ == Credits ==
52
+ * Thanks to [David Walsh](http://davidwalsh.name) [@davidwalshblog](https://twitter.com/davidwalshblog) for the inspiration behind this plugin.
zero-spam.js DELETED
@@ -1,27 +0,0 @@
1
- /**
2
- * WordPress Zero Spam JS
3
- *
4
- * Required JS for the WordPress Zero Spam plugin to work properly.
5
- *
6
- * @link http://www.benmarshall.me/wordpress-zero-spam-plugin
7
- * @since 1.0.0
8
- *
9
- * @package WordPress
10
- * @subpackage Zero Spam
11
- */
12
-
13
- ( function( $ ) {
14
- 'use strict';
15
-
16
- var form = $( "#commentform" );
17
-
18
- $( form ).submit( function() {
19
- $( "<input>" ).attr( "type", "hidden" )
20
- .attr( "name", "zero-spam" )
21
- .attr( "value", "1" )
22
- .appendTo( form );
23
-
24
- return true;
25
- });
26
-
27
- })( jQuery );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
zero-spam.php CHANGED
@@ -2,8 +2,8 @@
2
  /**
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 without all the bloated options. <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.0.0
7
  * Author: Ben Marshall
8
  * Author URI: http://www.benmarshall.me
9
  * License: GPL2
@@ -40,6 +40,7 @@ class Zero_Spam {
40
  */
41
  public function __construct() {
42
  $this->_actions();
 
43
  }
44
 
45
  /**
@@ -57,6 +58,43 @@ class Zero_Spam {
57
  add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
58
  add_action( 'preprocess_comment', array( $this, 'preprocess_comment' ) );
59
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  }
61
 
62
  /**
2
  /**
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.1.0
7
  * Author: Ben Marshall
8
  * Author URI: http://www.benmarshall.me
9
  * License: GPL2
40
  */
41
  public function __construct() {
42
  $this->_actions();
43
+ $this->_filters();
44
  }
45
 
46
  /**
58
  add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
59
  add_action( 'preprocess_comment', array( $this, 'preprocess_comment' ) );
60
  }
61
+
62
+ if ( function_exists( 'remove_action' ) ) {
63
+ remove_action( 'wp_head', 'wp_generator' );
64
+ }
65
+ }
66
+
67
+ /**
68
+ * WordPress filters.
69
+ *
70
+ * Adds WordPress filters.
71
+ *
72
+ * @since 1.1.0
73
+ * @access private
74
+ *
75
+ * @link http://codex.wordpress.org/Function_Reference/add_filter
76
+ */
77
+ private function _filters() {
78
+ if ( function_exists( 'add_filter' ) ) {
79
+ add_filter( 'plugin_row_meta', array( &$this, 'plugin_row_meta' ), 10, 2 );
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Plugin meta links.
85
+ *
86
+ * Adds links to the plugins meta.
87
+ *
88
+ * @since 1.1.0
89
+ *
90
+ * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/preprocess_comment
91
+ */
92
+ public function plugin_row_meta( $links, $file ) {
93
+ if ( strpos( $file, 'zero-spam.php' ) !== false ) {
94
+ $links = array_merge( $links, array( '<a href="http://www.benmarshall.me/wordpress-zero-spam-plugin/">WordPress Zero Spam</a>' ) );
95
+ $links = array_merge( $links, array( '<a href="https://www.gittip.com/bmarshall511/">Donate</a>' ) );
96
+ }
97
+ return $links;
98
  }
99
 
100
  /**