Version Description
- 2014-01-04 =
- bug fixing
- updating info
Download this release
Release Info
Developer | webvitaly |
Plugin | Anti-spam |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 2.0
- anti-spam.php +6 -5
- js/anti-spam.js +3 -6
- readme.txt +10 -5
anti-spam.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
Plugin Name: Anti-spam
|
4 |
Plugin URI: http://wordpress.org/plugins/anti-spam/
|
5 |
Description: No spam in comments. No captcha.
|
6 |
-
Version:
|
7 |
Author: webvitaly
|
8 |
Author URI: http://web-profile.com.ua/wordpress/plugins/
|
9 |
-
License:
|
10 |
*/
|
11 |
|
12 |
$antispam_send_spam_comment_to_admin = false; // if true, than rejected spam comments will be sent to admin email
|
@@ -15,7 +15,7 @@ $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 = '
|
19 |
|
20 |
|
21 |
if ( ! function_exists( 'antispam_scripts_styles_init' ) ) :
|
@@ -35,9 +35,9 @@ if ( ! function_exists( 'antispam_form_part' ) ) :
|
|
35 |
if ( ! is_user_logged_in() ) { // add anti-spam fields only for not logged in users
|
36 |
$antispam_form_part = '
|
37 |
<p class="comment-form-ant-spm" style="clear:both;">
|
38 |
-
<strong>Current <span style="display:none;">
|
39 |
<input type="hidden" name="ant-spm-a" id="ant-spm-a" value="'.date('Y').'" />
|
40 |
-
<input type="text" name="ant-spm-q" id="ant-spm-q" size="30" value="
|
41 |
</p>
|
42 |
'; // question (hidden with js) [aria-required="true" required="required"]
|
43 |
$antispam_form_part .= '
|
@@ -163,6 +163,7 @@ if ( ! function_exists( 'antispam_plugin_meta' ) ) :
|
|
163 |
if ( strpos( $file, 'anti-spam.php' ) !== false ) {
|
164 |
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/wordpress/plugins/anti-spam/" title="Plugin page">' . __('Anti-spam') . '</a>' ) );
|
165 |
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/donate/" title="Support the development">' . __('Donate') . '</a>' ) );
|
|
|
166 |
}
|
167 |
return $links;
|
168 |
}
|
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.0
|
7 |
Author: webvitaly
|
8 |
Author URI: http://web-profile.com.ua/wordpress/plugins/
|
9 |
+
License: GPLv3 or later
|
10 |
*/
|
11 |
|
12 |
$antispam_send_spam_comment_to_admin = false; // if true, than rejected spam comments will be sent to admin email
|
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.0';
|
19 |
|
20 |
|
21 |
if ( ! function_exists( 'antispam_scripts_styles_init' ) ) :
|
35 |
if ( ! is_user_logged_in() ) { // add anti-spam fields only for not logged in users
|
36 |
$antispam_form_part = '
|
37 |
<p class="comment-form-ant-spm" style="clear:both;">
|
38 |
+
<strong>Current <span style="display:none;">day</span> <span style="display:none;">month</span> <span style="display:inline;">ye@r</span></strong> <span class="required">*</span>
|
39 |
<input type="hidden" name="ant-spm-a" id="ant-spm-a" value="'.date('Y').'" />
|
40 |
+
<input type="text" name="ant-spm-q" id="ant-spm-q" size="30" value="20" />
|
41 |
</p>
|
42 |
'; // question (hidden with js) [aria-required="true" required="required"]
|
43 |
$antispam_form_part .= '
|
163 |
if ( strpos( $file, 'anti-spam.php' ) !== false ) {
|
164 |
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/wordpress/plugins/anti-spam/" title="Plugin page">' . __('Anti-spam') . '</a>' ) );
|
165 |
$links = array_merge( $links, array( '<a href="http://web-profile.com.ua/donate/" title="Support the development">' . __('Donate') . '</a>' ) );
|
166 |
+
$links = array_merge( $links, array( '<a href="http://codecanyon.net/item/antispam-pro/6491169" title="Go Pro">' . __('Anti-spam Pro') . '</a>' ) );
|
167 |
}
|
168 |
return $links;
|
169 |
}
|
js/anti-spam.js
CHANGED
@@ -10,21 +10,18 @@ jQuery(function($){
|
|
10 |
var answer = $('.comment-form-ant-spm input#ant-spm-a').val(); // get answer
|
11 |
$('.comment-form-ant-spm input#ant-spm-q').val( answer ); // set answer into other input
|
12 |
|
|
|
|
|
|
|
13 |
if ( $('#comments form input#ant-spm-q').length == 0 ) { // anti-spam input does not exist (could be because of cache or because theme does not use 'comment_form' action)
|
14 |
-
var current_date = new Date();
|
15 |
-
var current_year = current_date.getFullYear();
|
16 |
$('#comments form').append('<input type="hidden" name="ant-spm-q" id="ant-spm-q" value="'+current_year+'" />'); // add whole input with answer via javascript to comment form
|
17 |
}
|
18 |
|
19 |
if ( $('#respond form input#ant-spm-q').length == 0 ) { // similar, just in case (used because user could bot have #comments)
|
20 |
-
var current_date = new Date();
|
21 |
-
var current_year = current_date.getFullYear();
|
22 |
$('#respond form').append('<input type="hidden" name="ant-spm-q" id="ant-spm-q" value="'+current_year+'" />'); // add whole input with answer via javascript to comment form
|
23 |
}
|
24 |
|
25 |
if ( $('form#commentform input#ant-spm-q').length == 0 ) { // similar, just in case (used because user could bot have #respond)
|
26 |
-
var current_date = new Date();
|
27 |
-
var current_year = current_date.getFullYear();
|
28 |
$('form#commentform').append('<input type="hidden" name="ant-spm-q" id="ant-spm-q" value="'+current_year+'" />'); // add whole input with answer via javascript to comment form
|
29 |
}
|
30 |
|
10 |
var answer = $('.comment-form-ant-spm input#ant-spm-a').val(); // get answer
|
11 |
$('.comment-form-ant-spm input#ant-spm-q').val( answer ); // set answer into other input
|
12 |
|
13 |
+
var current_date = new Date();
|
14 |
+
var current_year = current_date.getFullYear();
|
15 |
+
|
16 |
if ( $('#comments form input#ant-spm-q').length == 0 ) { // anti-spam input does not exist (could be because of cache or because theme does not use 'comment_form' action)
|
|
|
|
|
17 |
$('#comments form').append('<input type="hidden" name="ant-spm-q" id="ant-spm-q" value="'+current_year+'" />'); // add whole input with answer via javascript to comment form
|
18 |
}
|
19 |
|
20 |
if ( $('#respond form input#ant-spm-q').length == 0 ) { // similar, just in case (used because user could bot have #comments)
|
|
|
|
|
21 |
$('#respond form').append('<input type="hidden" name="ant-spm-q" id="ant-spm-q" value="'+current_year+'" />'); // add whole input with answer via javascript to comment form
|
22 |
}
|
23 |
|
24 |
if ( $('form#commentform input#ant-spm-q').length == 0 ) { // similar, just in case (used because user could bot have #respond)
|
|
|
|
|
25 |
$('form#commentform').append('<input type="hidden" name="ant-spm-q" id="ant-spm-q" value="'+current_year+'" />'); // add whole input with answer via javascript to comment form
|
26 |
}
|
27 |
|
readme.txt
CHANGED
@@ -3,17 +3,18 @@ Contributors: webvitaly
|
|
3 |
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: 3.
|
7 |
-
Stable tag:
|
8 |
-
License:
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl
|
10 |
|
11 |
No spam in comments. No captcha.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
[Anti-spam](http://web-profile.com.ua/wordpress/plugins/anti-spam/ "Plugin page") |
|
16 |
-
[Donate](http://web-profile.com.ua/donate/ "Support the development")
|
|
|
17 |
|
18 |
Anti-spam plugin blocks spam in comments automatically, invisibly for users and for admins.
|
19 |
|
@@ -93,6 +94,10 @@ Do not order products from spam. If spam will be less effective than spammers wi
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
96 |
= 1.9 - 2013-10-23 =
|
97 |
* change the html structure
|
98 |
|
3 |
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: 3.8
|
7 |
+
Stable tag: 2.0
|
8 |
+
License: GPLv3 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
11 |
No spam in comments. No captcha.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
[Anti-spam](http://web-profile.com.ua/wordpress/plugins/anti-spam/ "Plugin page") |
|
16 |
+
[Donate](http://web-profile.com.ua/donate/ "Support the development") |
|
17 |
+
[Anti-spam Pro](http://codecanyon.net/item/antispam-pro/6491169 "Go Pro")
|
18 |
|
19 |
Anti-spam plugin blocks spam in comments automatically, invisibly for users and for admins.
|
20 |
|
94 |
|
95 |
== Changelog ==
|
96 |
|
97 |
+
= 2.0 - 2014-01-04 =
|
98 |
+
* bug fixing
|
99 |
+
* updating info
|
100 |
+
|
101 |
= 1.9 - 2013-10-23 =
|
102 |
* change the html structure
|
103 |
|