Anti-spam - Version 5.2

Version Description

  • Disable trackbacks
Download this release

Release Info

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

Code changes from version 5.1 to 5.2

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: 5.1
7
  Author: webvitaly
8
  Text Domain: anti-spam
9
  Author URI: http://web-profile.net/wordpress/plugins/
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { // prevent full path disclosure
14
  exit;
15
  }
16
 
17
- define('ANTISPAM_PLUGIN_VERSION', '5.1');
18
 
19
  include('anti-spam-functions.php');
20
  include('anti-spam-settings.php');
@@ -24,7 +24,7 @@ include('anti-spam-info.php');
24
  function antispam_enqueue_script() {
25
  global $withcomments; // WP flag to show comments on all pages
26
  if ((is_singular() || $withcomments) && comments_open()) { // load script only for pages with comments form
27
- wp_enqueue_script('anti-spam-script', plugins_url('/js/anti-spam-5.1.js', __FILE__), null, null, true);
28
  }
29
  }
30
  add_action('wp_enqueue_scripts', 'antispam_enqueue_script');
@@ -34,6 +34,7 @@ function antispam_form_part() {
34
  $rn = "\r\n"; // .chr(13).chr(10)
35
 
36
  if ( ! is_user_logged_in()) { // add anti-spam fields only for not logged in users
 
37
  echo ' <p class="antispam-group antispam-group-q" style="clear: both;">
38
  <label>Current ye@r <span class="required">*</span></label>
39
  <input type="hidden" name="antspm-a" class="antispam-control antispam-control-a" value="'.date('Y').'" />
@@ -59,10 +60,17 @@ function antispam_check_comment($commentdata) {
59
  antispam_store_comment($commentdata);
60
  }
61
  antispam_counter_stats();
62
- wp_die('Comment is a spam.'); // die - do not send comment and show errors
63
- //return false;
64
  }
65
  }
 
 
 
 
 
 
 
 
66
 
67
  return $commentdata; // if comment does not looks like spam
68
  }
3
  Plugin Name: Anti-spam
4
  Plugin URI: http://wordpress.org/plugins/anti-spam/
5
  Description: No spam in comments. No captcha.
6
+ Version: 5.2
7
  Author: webvitaly
8
  Text Domain: anti-spam
9
  Author URI: http://web-profile.net/wordpress/plugins/
14
  exit;
15
  }
16
 
17
+ define('ANTISPAM_PLUGIN_VERSION', '5.2');
18
 
19
  include('anti-spam-functions.php');
20
  include('anti-spam-settings.php');
24
  function antispam_enqueue_script() {
25
  global $withcomments; // WP flag to show comments on all pages
26
  if ((is_singular() || $withcomments) && comments_open()) { // load script only for pages with comments form
27
+ wp_enqueue_script('anti-spam-script', plugins_url('/js/anti-spam-5.2.js', __FILE__), null, null, true);
28
  }
29
  }
30
  add_action('wp_enqueue_scripts', 'antispam_enqueue_script');
34
  $rn = "\r\n"; // .chr(13).chr(10)
35
 
36
  if ( ! is_user_logged_in()) { // add anti-spam fields only for not logged in users
37
+ echo $rn.'<!-- Anti-spam plugin v.'.ANTISPAM_PLUGIN_VERSION.' wordpress.org/plugins/anti-spam/ -->'.$rn;
38
  echo ' <p class="antispam-group antispam-group-q" style="clear: both;">
39
  <label>Current ye@r <span class="required">*</span></label>
40
  <input type="hidden" name="antspm-a" class="antispam-control antispam-control-a" value="'.date('Y').'" />
60
  antispam_store_comment($commentdata);
61
  }
62
  antispam_counter_stats();
63
+ wp_die('Comment is a spam.'); // die - do not send comment and show error message
 
64
  }
65
  }
66
+
67
+ if ($comment_type == 'trackback') {
68
+ if( $antispam_settings['save_spam_comments'] ) {
69
+ antispam_store_comment($commentdata);
70
+ }
71
+ antispam_counter_stats();
72
+ wp_die('Trackbacks are disabled.'); // die - do not send trackback and show error message
73
+ }
74
 
75
  return $commentdata; // if comment does not looks like spam
76
  }
js/{anti-spam-5.1.js → anti-spam-5.2.js} RENAMED
File without changes
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-profile.net/donate/
4
  Tags: spam, spammer, comment, comments, comment-spam, antispam, anti-spam, block-spam, spam-free, spambot, spam-bot, bot
5
  Requires at least: 3.3
6
  Tested up to: 5.0
7
- Stable tag: 5.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
@@ -126,6 +126,9 @@ The plugin is pretty small and easy to read.
126
 
127
  == Changelog ==
128
 
 
 
 
129
  = 5.1 =
130
  * Disable check for comments from logged in users
131
 
4
  Tags: spam, spammer, comment, comments, comment-spam, antispam, anti-spam, block-spam, spam-free, spambot, spam-bot, bot
5
  Requires at least: 3.3
6
  Tested up to: 5.0
7
+ Stable tag: 5.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
126
 
127
  == Changelog ==
128
 
129
+ = 5.2 =
130
+ * Disable trackbacks
131
+
132
  = 5.1 =
133
  * Disable check for comments from logged in users
134