Anti-spam - Version 2.6

Version Description

  • 2014-11-30 =
  • reverting to ver.2.2 state (enqueue script using 'init' hook and into the header) because users start receiving spam messages
Download this release

Release Info

Developer webvitaly
Plugin Icon 128x128 Anti-spam
Version 2.6
Comparing to
See all releases

Code changes from version 2.5 to 2.6

Files changed (2) hide show
  1. anti-spam.php +8 -8
  2. readme.txt +4 -1
anti-spam.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Anti-spam
4
  Plugin URI: http://wordpress.org/plugins/anti-spam/
5
  Description: No spam in comments. No captcha.
6
- Version: 2.5
7
  Author: webvitaly
8
  Author URI: http://web-profile.com.ua/wordpress/plugins/
9
  License: GPLv3
@@ -15,17 +15,17 @@ $antispam_allow_trackbacks = false; // if true, than trackbacks will be allowed
15
  // trackbacks almost not used by users, but mostly used by spammers; pingbacks are always enabled
16
  // more about the difference between trackback and pingback - http://web-profile.com.ua/web/trackback-vs-pingback/
17
 
18
- $antispam_version = '2.5';
19
 
20
 
21
  if ( ! function_exists('antispam_enqueue_script') ) :
22
  function antispam_enqueue_script() {
23
  global $antispam_version;
24
- if (is_singular() && comments_open() && get_option('thread_comments')) { // load script only for pages with comments form
25
- wp_enqueue_script('anti-spam-script', plugins_url('/js/anti-spam.js', __FILE__), array('jquery'), $antispam_version, true);
26
  }
27
  }
28
- add_action('wp_enqueue_scripts', 'antispam_enqueue_script');
29
  endif; // end of antispam_enqueue_script()
30
 
31
 
@@ -64,9 +64,9 @@ if ( ! function_exists('antispam_check_comment') ) :
64
  $antispam_message_spam_info = 'Spam for post: "'.$post->post_title.'"' . "\r\n";
65
  $antispam_message_spam_info .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
66
 
67
- $antispam_message_spam_info .= 'IP : ' . $_SERVER['REMOTE_ADDR'] . "\r\n";
68
- $antispam_message_spam_info .= 'User agent : ' . $_SERVER['HTTP_USER_AGENT'] . "\r\n";
69
- $antispam_message_spam_info .= 'Referer : ' . $_SERVER['HTTP_REFERER'] . "\r\n\r\n";
70
 
71
  $antispam_message_spam_info .= 'Comment data:'."\r\n"; // lets see what comment data spammers try to submit
72
  foreach ($commentdata as $key => $value) {
3
  Plugin Name: Anti-spam
4
  Plugin URI: http://wordpress.org/plugins/anti-spam/
5
  Description: No spam in comments. No captcha.
6
+ Version: 2.6
7
  Author: webvitaly
8
  Author URI: http://web-profile.com.ua/wordpress/plugins/
9
  License: GPLv3
15
  // trackbacks almost not used by users, but mostly used by spammers; pingbacks are always enabled
16
  // more about the difference between trackback and pingback - http://web-profile.com.ua/web/trackback-vs-pingback/
17
 
18
+ $antispam_version = '2.6';
19
 
20
 
21
  if ( ! function_exists('antispam_enqueue_script') ) :
22
  function antispam_enqueue_script() {
23
  global $antispam_version;
24
+ if (!is_admin()) {
25
+ wp_enqueue_script('anti-spam-script', plugins_url('/js/anti-spam.js', __FILE__), array('jquery'), $antispam_version);
26
  }
27
  }
28
+ add_action('init', 'antispam_enqueue_script');
29
  endif; // end of antispam_enqueue_script()
30
 
31
 
64
  $antispam_message_spam_info = 'Spam for post: "'.$post->post_title.'"' . "\r\n";
65
  $antispam_message_spam_info .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
66
 
67
+ $antispam_message_spam_info .= 'IP: ' . $_SERVER['REMOTE_ADDR'] . "\r\n";
68
+ $antispam_message_spam_info .= 'User agent: ' . $_SERVER['HTTP_USER_AGENT'] . "\r\n";
69
+ $antispam_message_spam_info .= 'Referer: ' . $_SERVER['HTTP_REFERER'] . "\r\n\r\n";
70
 
71
  $antispam_message_spam_info .= 'Comment data:'."\r\n"; // lets see what comment data spammers try to submit
72
  foreach ($commentdata as $key => $value) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-profile.com.ua/donate/
4
  Tags: spam, spammer, spammers, comment, comments, antispam, anti-spam, block-spam, spamfree, spam-free, spambot, spam-bot, bot
5
  Requires at least: 3.0
6
  Tested up to: 4.0
7
- Stable tag: 2.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
@@ -112,6 +112,9 @@ Do not order products from spam. If spam will be less effective than spammers wi
112
 
113
  == Changelog ==
114
 
 
 
 
115
  = 2.5 - 2014-11-26 =
116
  * update input names
117
 
4
  Tags: spam, spammer, spammers, comment, comments, antispam, anti-spam, block-spam, spamfree, spam-free, spambot, spam-bot, bot
5
  Requires at least: 3.0
6
  Tested up to: 4.0
7
+ Stable tag: 2.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
112
 
113
  == Changelog ==
114
 
115
+ = 2.6 - 2014-11-30 =
116
+ * reverting to ver.2.2 state (enqueue script using 'init' hook and into the header) because users start receiving spam messages
117
+
118
  = 2.5 - 2014-11-26 =
119
  * update input names
120