Version Description
June 1 2017 = * Integrations: Enfold theme, Convertplug. * Links to check for Emails/IP for spam. * Control comments and feedback about them from public post's page. * Improved connection stability with cloud service. * Spam protection improved. * Other small fixes.
Download this release
Release Info
Developer | Safronik |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.67 |
Comparing to | |
See all releases |
Code changes from version 5.65 to 5.67
- assets/css/cleantalk-admin.css +7 -1
- assets/css/cleantalk-public.css +68 -0
- assets/css/cleantalk-spam-check.css +35 -0
- {inc → assets/js}/cleantalk-comments-checkspam.js +87 -68
- assets/js/cleantalk-comments-editscreen.js +139 -0
- assets/js/cleantalk-public.js +88 -0
- {inc → assets/js}/cleantalk-users-checkspam.js +65 -56
- assets/js/cleantalk-users-editscreen.js +22 -0
- cleantalk.php +37 -33
- i18n/cleantalk-ru_RU.mo +0 -0
- i18n/cleantalk.pot +298 -232
- inc/cleantalk-admin.php +183 -115
- inc/cleantalk-ajax.php +23 -8
- inc/cleantalk-comments-editscreen.js +0 -4
- inc/cleantalk-comments.php +375 -350
- inc/cleantalk-common.php +8 -3
- inc/cleantalk-public.php +114 -17
- inc/cleantalk-rel.js +0 -11
- inc/cleantalk-sfw.class.php +12 -3
- inc/cleantalk-updater.php +9 -0
- inc/cleantalk-users-editscreen.js +0 -4
- inc/cleantalk-users.php +252 -241
- inc/cleantalk.class.php +44 -68
- inc/sfw_die_page.html +8 -0
- readme.txt +34 -2
assets/css/cleantalk-admin.css
CHANGED
@@ -9,4 +9,10 @@
|
|
9 |
.ct_translate_links:hover{color: rgba(210, 210, 20, 1) !important;}
|
10 |
.ct_support_links:hover {color: rgba(250, 20, 20, 1) !important;}
|
11 |
.ct_faq_links :hover {color: rgba(20, 250, 20, 1) !important;}
|
12 |
-
.ct_setting_links:hover {color: rgba(20, 20, 250, 1) !important;}
|
|
|
|
|
|
|
|
|
|
|
|
9 |
.ct_translate_links:hover{color: rgba(210, 210, 20, 1) !important;}
|
10 |
.ct_support_links:hover {color: rgba(250, 20, 20, 1) !important;}
|
11 |
.ct_faq_links :hover {color: rgba(20, 250, 20, 1) !important;}
|
12 |
+
.ct_setting_links:hover {color: rgba(20, 20, 250, 1) !important;}
|
13 |
+
|
14 |
+
.ct_link_new_tab img{
|
15 |
+
float: none !important;
|
16 |
+
margin: 0 2px;
|
17 |
+
border: 0;
|
18 |
+
}
|
assets/css/cleantalk-public.css
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ct_hidden{
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
|
5 |
+
.ct_comment_info{
|
6 |
+
position: relative;
|
7 |
+
top: -5px;
|
8 |
+
padding: 7px 1% 7px 1%;
|
9 |
+
margin-bottom: 20px;
|
10 |
+
min-height: 20px !important;
|
11 |
+
border: 1px solid gray !important;
|
12 |
+
border-radius: 8px;
|
13 |
+
font-size: 15px;
|
14 |
+
}
|
15 |
+
.ct_comment_info_title{
|
16 |
+
position: absolute;
|
17 |
+
top: -14px;
|
18 |
+
margin: 0; padding: 0 5px;
|
19 |
+
font-size: 15px;
|
20 |
+
background: inherit;
|
21 |
+
line-height: 16px;
|
22 |
+
}
|
23 |
+
p.ct_comment_logo_title{
|
24 |
+
position: absolute;
|
25 |
+
bottom: -15px; right: 10px;
|
26 |
+
margin: 0; padding: 0 7px;
|
27 |
+
font-size: 15px;
|
28 |
+
background: inherit;
|
29 |
+
line-height: 17px;
|
30 |
+
}
|
31 |
+
.ct_comment_logo_img{
|
32 |
+
height: 17px;
|
33 |
+
margin-right: 0px;
|
34 |
+
vertical-align: text-top;
|
35 |
+
}
|
36 |
+
|
37 |
+
.ct_this_is{
|
38 |
+
font-size: 14px;
|
39 |
+
padding: 2px 5px;
|
40 |
+
cursor: pointer;
|
41 |
+
white-space: nowrap;
|
42 |
+
color: black !important;
|
43 |
+
background: rgba(230,230,230,1);
|
44 |
+
border: 1px solid #777;
|
45 |
+
border-radius: 4px;
|
46 |
+
}
|
47 |
+
.ct_this_is_spam{
|
48 |
+
|
49 |
+
}
|
50 |
+
p.ct_feedback_wrap{
|
51 |
+
display: none;
|
52 |
+
position: absolute;
|
53 |
+
top: 4px; left: 1%;
|
54 |
+
width: 98%;
|
55 |
+
background: white;
|
56 |
+
padding: 2px 6px;
|
57 |
+
border: 1px solid gray;
|
58 |
+
border-radius: 3px;
|
59 |
+
}
|
60 |
+
.ct_feedback_result{display: none; text-decoration: underline;}
|
61 |
+
.ct_feedback_result_spam{color: red;}
|
62 |
+
.ct_feedback_result_not_spam{color: green;}
|
63 |
+
|
64 |
+
.ct_feedback_msg a{color: green !important; text-decoration: underline;}
|
65 |
+
|
66 |
+
.ct_feedback_success{color: green;}
|
67 |
+
.ct_feedback_error{color: red;}
|
68 |
+
.ct_feedback_no_hash{color: blue;}
|
assets/css/cleantalk-spam-check.css
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#ct_checking_status, #ct_cooling_notice, #ct_error_message h3, #ct_error_message h4{
|
2 |
+
text-align: center;
|
3 |
+
width:90%;
|
4 |
+
}
|
5 |
+
|
6 |
+
#ct_preloader{
|
7 |
+
display:none;
|
8 |
+
width:100%;
|
9 |
+
text-align:center;
|
10 |
+
}
|
11 |
+
#ct_working_message{
|
12 |
+
display:none;
|
13 |
+
margin:auto;
|
14 |
+
margin-top: 1em;
|
15 |
+
padding:3px;
|
16 |
+
width:70%;
|
17 |
+
border:2px dotted gray;
|
18 |
+
background:#ffff99;
|
19 |
+
}
|
20 |
+
|
21 |
+
div.pagination{
|
22 |
+
margin: 10px;
|
23 |
+
}
|
24 |
+
ul.pagination{
|
25 |
+
display: inline-block;
|
26 |
+
margin: 0;
|
27 |
+
}
|
28 |
+
li.pagination{
|
29 |
+
display: inline-block;
|
30 |
+
margin-left: 10px;
|
31 |
+
}
|
32 |
+
span.current_page{
|
33 |
+
font-size: 1.3em;
|
34 |
+
font-weight: 600;
|
35 |
+
}
|
{inc → assets/js}/cleantalk-comments-checkspam.js
RENAMED
@@ -4,43 +4,35 @@ var ct_cool_down_time = 65000,
|
|
4 |
ct_requests_counter = 0,
|
5 |
ct_max_requests = 95,
|
6 |
ct_cooling_down_flag = false;
|
|
|
7 |
|
8 |
-
String.prototype.format = String.prototype.f = function ()
|
9 |
-
{
|
10 |
var args = arguments;
|
11 |
-
return this.replace(/\{\{|\}\}|\{(\d+)\}/g, function (m, n)
|
12 |
-
{
|
13 |
if (m == "{{") { return "{"; }
|
14 |
if (m == "}}") { return "}"; }
|
15 |
return args[n];
|
16 |
});
|
17 |
};
|
|
|
18 |
var close_animate=true;
|
19 |
-
function animate_comment(to,id)
|
20 |
-
{
|
21 |
-
|
22 |
-
{
|
23 |
-
if(to==0.3)
|
24 |
-
{
|
25 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
26 |
animate_comment(1,id)
|
27 |
});
|
28 |
-
}
|
29 |
-
else
|
30 |
-
{
|
31 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
32 |
animate_comment(0.3,id)
|
33 |
});
|
34 |
}
|
35 |
-
}
|
36 |
-
else
|
37 |
-
{
|
38 |
close_animate=true;
|
39 |
}
|
40 |
}
|
41 |
|
42 |
-
function ct_clear_comments()
|
43 |
-
{
|
44 |
var data = {
|
45 |
'action': 'ajax_clear_comments',
|
46 |
'security': ajax_nonce
|
@@ -64,8 +56,7 @@ function ct_cooling_down_toggle(){
|
|
64 |
ct_show_info();
|
65 |
}
|
66 |
|
67 |
-
function ct_send_comments()
|
68 |
-
{
|
69 |
|
70 |
if(ct_cooling_down_flag == true)
|
71 |
return;
|
@@ -81,7 +72,8 @@ function ct_send_comments()
|
|
81 |
|
82 |
var data = {
|
83 |
'action': 'ajax_check_comments',
|
84 |
-
'security': ajax_nonce
|
|
|
85 |
};
|
86 |
|
87 |
jQuery.ajax({
|
@@ -89,38 +81,30 @@ function ct_send_comments()
|
|
89 |
url: ajaxurl,
|
90 |
data: data,
|
91 |
success: function(msg){
|
92 |
-
|
93 |
-
{
|
94 |
ct_send_comments();
|
95 |
-
}
|
96 |
-
else if(parseInt(msg)==0)
|
97 |
-
{
|
98 |
working=false;
|
99 |
jQuery('#ct_working_message').hide();
|
100 |
location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
|
101 |
-
}
|
102 |
-
else
|
103 |
-
{
|
104 |
working=false;
|
105 |
-
alert(
|
106 |
-
location.href='
|
107 |
}
|
108 |
},
|
109 |
error: function(jqXHR, textStatus, errorThrown) {
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
}
|
115 |
-
}
|
116 |
},
|
117 |
timeout: 15000
|
118 |
});
|
119 |
}
|
120 |
-
function ct_show_info()
|
121 |
-
{
|
122 |
-
if(working)
|
123 |
-
{
|
124 |
if(ct_cooling_down_flag == true){
|
125 |
jQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');
|
126 |
jQuery('#ct_cooling_notice').show();
|
@@ -140,12 +124,18 @@ function ct_show_info()
|
|
140 |
success: function(msg){
|
141 |
jQuery('#ct_checking_status').html(msg);
|
142 |
setTimeout(ct_show_info, 1000);
|
143 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
});
|
145 |
}
|
146 |
}
|
147 |
-
function ct_insert_comments()
|
148 |
-
{
|
149 |
var data = {
|
150 |
'action': 'ajax_insert_comments',
|
151 |
'security': ajax_nonce
|
@@ -156,15 +146,11 @@ function ct_insert_comments()
|
|
156 |
url: ajaxurl,
|
157 |
data: data,
|
158 |
success: function(msg){
|
159 |
-
|
160 |
-
{
|
161 |
-
alert(ctCommentsCheck.ct_comments_added);
|
162 |
-
}
|
163 |
}
|
164 |
});
|
165 |
}
|
166 |
-
function ct_delete_all()
|
167 |
-
{
|
168 |
var data = {
|
169 |
'action': 'ajax_delete_all',
|
170 |
'security': ajax_nonce
|
@@ -175,25 +161,26 @@ function ct_delete_all()
|
|
175 |
url: ajaxurl,
|
176 |
data: data,
|
177 |
success: function(msg){
|
178 |
-
if(msg>0)
|
179 |
-
{
|
180 |
jQuery('#cleantalk_comments_left').html(msg);
|
181 |
ct_delete_all();
|
182 |
-
}
|
183 |
-
else
|
184 |
-
{
|
185 |
location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
|
186 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
}
|
188 |
});
|
189 |
}
|
190 |
-
function ct_delete_checked()
|
191 |
-
{
|
192 |
ids=Array();
|
193 |
var cnt=0;
|
194 |
jQuery('input[id^=cb-select-][id!=cb-select-all-1]').each(function(){
|
195 |
-
if(jQuery(this).prop('checked'))
|
196 |
-
{
|
197 |
ids[cnt]=jQuery(this).attr('id').substring(10);
|
198 |
cnt++;
|
199 |
}
|
@@ -211,6 +198,12 @@ function ct_delete_checked()
|
|
211 |
success: function(msg){
|
212 |
location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
|
213 |
//alert(msg);
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
});
|
216 |
}
|
@@ -219,14 +212,14 @@ function ct_delete_checked()
|
|
219 |
jQuery(document).ready(function(){
|
220 |
|
221 |
jQuery("#ct_check_spam_button").click(function(){
|
222 |
-
jQuery('#ct_working_message').show();
|
223 |
jQuery('#ct_check_spam_button').hide();
|
224 |
jQuery('#ct_info_message').hide();
|
225 |
jQuery('#ct_check_comments_table').hide();
|
226 |
jQuery('#ct_delete_all').hide();
|
|
|
227 |
jQuery('#ct_delete_checked').hide();
|
|
|
228 |
jQuery('#ct_preloader').show();
|
229 |
-
jQuery('#ct_search_info').hide();
|
230 |
|
231 |
working=true;
|
232 |
ct_show_info();
|
@@ -243,8 +236,8 @@ jQuery(document).ready(function(){
|
|
243 |
jQuery('#ct_checking_status').hide();
|
244 |
jQuery('#ct_tools_buttons').hide();
|
245 |
jQuery('#ct_search_info').hide();
|
246 |
-
jQuery('#ct_bottom_tools').hide();
|
247 |
jQuery('#ct_check_comments_table').hide();
|
|
|
248 |
jQuery('#ct_deleting_message').show();
|
249 |
jQuery("html, body").animate({ scrollTop: 0 }, "slow");
|
250 |
ct_delete_all();
|
@@ -294,7 +287,9 @@ jQuery(document).ready(function(){
|
|
294 |
|
295 |
//Approve button
|
296 |
jQuery(".cleantalk_delete_from_list_button").click(function(){
|
297 |
-
ct_id = jQuery(this).attr("data-id");
|
|
|
|
|
298 |
var data = {
|
299 |
'action': 'ajax_ct_approve_comment',
|
300 |
'security': ajax_nonce,
|
@@ -310,14 +305,38 @@ jQuery(document).ready(function(){
|
|
310 |
});
|
311 |
},
|
312 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
});
|
314 |
|
315 |
//Default load actions
|
316 |
-
|
317 |
-
ct_show_info();
|
318 |
-
working=false;
|
319 |
-
if(location.href.match(/ct_check_spam/) && !location.href.match(/ct_worked=1/))
|
320 |
-
{
|
321 |
jQuery("#ct_check_spam_button").click();
|
322 |
}
|
323 |
});
|
4 |
ct_requests_counter = 0,
|
5 |
ct_max_requests = 95,
|
6 |
ct_cooling_down_flag = false;
|
7 |
+
var ct_new_check = true;
|
8 |
|
9 |
+
String.prototype.format = String.prototype.f = function (){
|
|
|
10 |
var args = arguments;
|
11 |
+
return this.replace(/\{\{|\}\}|\{(\d+)\}/g, function (m, n){
|
|
|
12 |
if (m == "{{") { return "{"; }
|
13 |
if (m == "}}") { return "}"; }
|
14 |
return args[n];
|
15 |
});
|
16 |
};
|
17 |
+
|
18 |
var close_animate=true;
|
19 |
+
function animate_comment(to,id){
|
20 |
+
if(close_animate){
|
21 |
+
if(to==0.3){
|
|
|
|
|
|
|
22 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
23 |
animate_comment(1,id)
|
24 |
});
|
25 |
+
}else{
|
|
|
|
|
26 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
27 |
animate_comment(0.3,id)
|
28 |
});
|
29 |
}
|
30 |
+
}else{
|
|
|
|
|
31 |
close_animate=true;
|
32 |
}
|
33 |
}
|
34 |
|
35 |
+
function ct_clear_comments(){
|
|
|
36 |
var data = {
|
37 |
'action': 'ajax_clear_comments',
|
38 |
'security': ajax_nonce
|
56 |
ct_show_info();
|
57 |
}
|
58 |
|
59 |
+
function ct_send_comments(){
|
|
|
60 |
|
61 |
if(ct_cooling_down_flag == true)
|
62 |
return;
|
72 |
|
73 |
var data = {
|
74 |
'action': 'ajax_check_comments',
|
75 |
+
'security': ajax_nonce,
|
76 |
+
'new_check': ct_new_check
|
77 |
};
|
78 |
|
79 |
jQuery.ajax({
|
81 |
url: ajaxurl,
|
82 |
data: data,
|
83 |
success: function(msg){
|
84 |
+
ct_new_check = false;
|
85 |
+
if(parseInt(msg)==1){
|
86 |
ct_send_comments();
|
87 |
+
}else if(parseInt(msg)==0){
|
|
|
|
|
88 |
working=false;
|
89 |
jQuery('#ct_working_message').hide();
|
90 |
location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
|
91 |
+
}else{
|
|
|
|
|
92 |
working=false;
|
93 |
+
alert(msg);
|
94 |
+
location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
|
95 |
}
|
96 |
},
|
97 |
error: function(jqXHR, textStatus, errorThrown) {
|
98 |
+
jQuery('#ct_error_message').show();
|
99 |
+
jQuery('#cleantalk_ajax_error').html(textStatus);
|
100 |
+
jQuery('#cleantalk_js_func').html('Check comments');
|
101 |
+
setTimeout(ct_send_users(), 3000);
|
|
|
|
|
102 |
},
|
103 |
timeout: 15000
|
104 |
});
|
105 |
}
|
106 |
+
function ct_show_info(){
|
107 |
+
if(working){
|
|
|
|
|
108 |
if(ct_cooling_down_flag == true){
|
109 |
jQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');
|
110 |
jQuery('#ct_cooling_notice').show();
|
124 |
success: function(msg){
|
125 |
jQuery('#ct_checking_status').html(msg);
|
126 |
setTimeout(ct_show_info, 1000);
|
127 |
+
},
|
128 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
129 |
+
jQuery('#ct_error_message').show();
|
130 |
+
jQuery('#cleantalk_ajax_error').html(textStatus);
|
131 |
+
jQuery('#cleantalk_js_func').html('Check comments');
|
132 |
+
setTimeout(ct_send_users(), 3000);
|
133 |
+
},
|
134 |
+
timeout: 5000
|
135 |
});
|
136 |
}
|
137 |
}
|
138 |
+
function ct_insert_comments(){
|
|
|
139 |
var data = {
|
140 |
'action': 'ajax_insert_comments',
|
141 |
'security': ajax_nonce
|
146 |
url: ajaxurl,
|
147 |
data: data,
|
148 |
success: function(msg){
|
149 |
+
alert(ctCommentsCheck.ct_comments_added + ' ' + msg + ' ' + ctCommentsCheck.ct_comments_added_after);
|
|
|
|
|
|
|
150 |
}
|
151 |
});
|
152 |
}
|
153 |
+
function ct_delete_all(){
|
|
|
154 |
var data = {
|
155 |
'action': 'ajax_delete_all',
|
156 |
'security': ajax_nonce
|
161 |
url: ajaxurl,
|
162 |
data: data,
|
163 |
success: function(msg){
|
164 |
+
if(msg>0){
|
|
|
165 |
jQuery('#cleantalk_comments_left').html(msg);
|
166 |
ct_delete_all();
|
167 |
+
}else{
|
|
|
|
|
168 |
location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
|
169 |
}
|
170 |
+
},
|
171 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
172 |
+
jQuery('#ct_error_message').show();
|
173 |
+
jQuery('#cleantalk_ajax_error').html(textStatus);
|
174 |
+
jQuery('#cleantalk_js_func').html('Check comments');
|
175 |
+
setTimeout(ct_send_users(), 3000);
|
176 |
}
|
177 |
});
|
178 |
}
|
179 |
+
function ct_delete_checked(){
|
|
|
180 |
ids=Array();
|
181 |
var cnt=0;
|
182 |
jQuery('input[id^=cb-select-][id!=cb-select-all-1]').each(function(){
|
183 |
+
if(jQuery(this).prop('checked')){
|
|
|
184 |
ids[cnt]=jQuery(this).attr('id').substring(10);
|
185 |
cnt++;
|
186 |
}
|
198 |
success: function(msg){
|
199 |
location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
|
200 |
//alert(msg);
|
201 |
+
},
|
202 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
203 |
+
jQuery('#ct_error_message').show();
|
204 |
+
jQuery('#cleantalk_ajax_error').html(textStatus);
|
205 |
+
jQuery('#cleantalk_js_func').html('Check comments');
|
206 |
+
setTimeout(ct_send_users(), 3000);
|
207 |
}
|
208 |
});
|
209 |
}
|
212 |
jQuery(document).ready(function(){
|
213 |
|
214 |
jQuery("#ct_check_spam_button").click(function(){
|
|
|
215 |
jQuery('#ct_check_spam_button').hide();
|
216 |
jQuery('#ct_info_message').hide();
|
217 |
jQuery('#ct_check_comments_table').hide();
|
218 |
jQuery('#ct_delete_all').hide();
|
219 |
+
jQuery('div.pagination').hide();
|
220 |
jQuery('#ct_delete_checked').hide();
|
221 |
+
jQuery('#ct_working_message').show();
|
222 |
jQuery('#ct_preloader').show();
|
|
|
223 |
|
224 |
working=true;
|
225 |
ct_show_info();
|
236 |
jQuery('#ct_checking_status').hide();
|
237 |
jQuery('#ct_tools_buttons').hide();
|
238 |
jQuery('#ct_search_info').hide();
|
|
|
239 |
jQuery('#ct_check_comments_table').hide();
|
240 |
+
jQuery('div.pagination').hide();
|
241 |
jQuery('#ct_deleting_message').show();
|
242 |
jQuery("html, body").animate({ scrollTop: 0 }, "slow");
|
243 |
ct_delete_all();
|
287 |
|
288 |
//Approve button
|
289 |
jQuery(".cleantalk_delete_from_list_button").click(function(){
|
290 |
+
var ct_id = jQuery(this).attr("data-id");
|
291 |
+
|
292 |
+
// Approving
|
293 |
var data = {
|
294 |
'action': 'ajax_ct_approve_comment',
|
295 |
'security': ajax_nonce,
|
305 |
});
|
306 |
},
|
307 |
});
|
308 |
+
|
309 |
+
// Positive feedback
|
310 |
+
var data = {
|
311 |
+
'action': 'ct_feedback_comment',
|
312 |
+
'security': ajax_nonce,
|
313 |
+
'comment_id': ct_id,
|
314 |
+
'comment_status': 'approve'
|
315 |
+
};
|
316 |
+
jQuery.ajax({
|
317 |
+
type: "POST",
|
318 |
+
url: ajaxurl,
|
319 |
+
data: data,
|
320 |
+
success: function(msg){
|
321 |
+
if(msg == 1){
|
322 |
+
// Success
|
323 |
+
}
|
324 |
+
if(msg == 0){
|
325 |
+
// Error occurred
|
326 |
+
}
|
327 |
+
if(msg == 'no_hash'){
|
328 |
+
// No hash
|
329 |
+
}
|
330 |
+
},
|
331 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
332 |
+
|
333 |
+
},
|
334 |
+
timeout: 5000
|
335 |
+
});
|
336 |
});
|
337 |
|
338 |
//Default load actions
|
339 |
+
if(location.href.match(/ct_check_spam/) && !location.href.match(/ct_worked=1/)){
|
|
|
|
|
|
|
|
|
340 |
jQuery("#ct_check_spam_button").click();
|
341 |
}
|
342 |
});
|
assets/js/cleantalk-comments-editscreen.js
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function ct_is_email(str){
|
2 |
+
return str.search(/.*@.*\..*/);
|
3 |
+
}
|
4 |
+
function ct_is_ip(str){
|
5 |
+
return str.search(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/);
|
6 |
+
}
|
7 |
+
|
8 |
+
jQuery(document).ready(function(){
|
9 |
+
|
10 |
+
/* Shows "Find spam users" Buttons */
|
11 |
+
jQuery('#post-query-submit').after('<a href="edit-comments.php?page=ct_check_spam" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctCommentsScreen.spambutton_text+'</a>' +
|
12 |
+
' <a href="edit-comments.php?page=ct_check_spam&ct_worked=1" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctCommentsScreen.spambutton_text_show+'</a> ');
|
13 |
+
|
14 |
+
/* Shows link to blacklists near every email and IP address */
|
15 |
+
if(parseInt(ctCommentsScreen.ct_show_check_links))
|
16 |
+
jQuery('.column-author a, .comment-author a').each(function(){
|
17 |
+
var ct_curr_str = jQuery(this).html();
|
18 |
+
if(ct_is_email(ct_curr_str) != -1 || ct_is_ip(ct_curr_str) != -1){
|
19 |
+
jQuery(this).after(' <a href="https://cleantalk.org/blacklists/'+ct_curr_str+'" target="_blank" title="https://cleantalk.org/blacklists/'+ct_curr_str+'" class="ct_link_new_tab"><img src="'+ctCommentsScreen.ct_img_src_new_tab+'"></a>');
|
20 |
+
}
|
21 |
+
});
|
22 |
+
|
23 |
+
console.log(parseInt(ctCommentsScreen.ct_show_check_links));
|
24 |
+
|
25 |
+
/* Feedback for comments */
|
26 |
+
|
27 |
+
var ct_comment_id;
|
28 |
+
|
29 |
+
// For approved
|
30 |
+
jQuery('span.approve').on('click', function(){
|
31 |
+
var result = jQuery(this).children('a').attr('href');
|
32 |
+
result = result.match(/^comment\.php\?.*c=(\d).*/);
|
33 |
+
ct_comment_id = result[1];
|
34 |
+
undo_comment_id = ct_comment_id;
|
35 |
+
ct_send_feedback_request(ct_comment_id, 'approve', 0);
|
36 |
+
});
|
37 |
+
|
38 |
+
// For unapprove
|
39 |
+
jQuery('span.unapprove').on('click', function(){
|
40 |
+
var result = jQuery(this).children('a').attr('href');
|
41 |
+
result = result.match(/^comment\.php\?.*c=(\d).*/);
|
42 |
+
ct_comment_id = result[1];
|
43 |
+
undo_comment_id = ct_comment_id;
|
44 |
+
ct_send_feedback_request(ct_comment_id, 'spam', 0);
|
45 |
+
});
|
46 |
+
|
47 |
+
// For spammed
|
48 |
+
jQuery('span.spam').on('click', function(){
|
49 |
+
var result = jQuery(this).children('a').attr('href');
|
50 |
+
result = result.match(/^comment\.php\?.*c=(\d).*/);
|
51 |
+
ct_comment_id = result[1];
|
52 |
+
undo_comment_id = ct_comment_id;
|
53 |
+
ct_send_feedback_request(ct_comment_id, 'spam', 0);
|
54 |
+
|
55 |
+
setTimeout(function(){
|
56 |
+
jQuery('tr#undo-'+ct_comment_id+' span.unspam a').click(function(){
|
57 |
+
var result = jQuery(this).attr('href');
|
58 |
+
result = result.match(/^comment\.php\?.*&c=(\d).*/);
|
59 |
+
ct_comment_id = result[1];
|
60 |
+
ct_send_feedback_request(ct_comment_id, 'approve', 1);
|
61 |
+
});
|
62 |
+
}, 202);
|
63 |
+
|
64 |
+
});
|
65 |
+
|
66 |
+
// For unspammed
|
67 |
+
jQuery('span.unspam').on('click', function(){
|
68 |
+
var result = jQuery(this).children('a').attr('href');
|
69 |
+
result = result.match(/^comment\.php\?.*c=(\d).*/);
|
70 |
+
ct_comment_id = result[1];
|
71 |
+
ct_send_feedback_request(ct_comment_id, 'approve', 0);
|
72 |
+
});
|
73 |
+
|
74 |
+
// For untrashed
|
75 |
+
jQuery('span.untrash a').on('click', function(){
|
76 |
+
var result = jQuery(this).attr('href');
|
77 |
+
result = result.match(/^comment\.php\?.*c=(\d).*/);
|
78 |
+
ct_comment_id = result[1];
|
79 |
+
feedback_result = ct_send_feedback_request(ct_comment_id, 'approve', 0);
|
80 |
+
});
|
81 |
+
});
|
82 |
+
|
83 |
+
// Send feedback to backend
|
84 |
+
function ct_send_feedback_request(ct_comment_id, ct_comment_status, ct_undo){
|
85 |
+
|
86 |
+
var data = {
|
87 |
+
'action': 'ct_feedback_comment',
|
88 |
+
'security': ctCommentsScreen.ct_ajax_nonce,
|
89 |
+
'comment_id': ct_comment_id,
|
90 |
+
'comment_status': ct_comment_status
|
91 |
+
};
|
92 |
+
|
93 |
+
jQuery.ajax({
|
94 |
+
type: "POST",
|
95 |
+
url: ajaxurl,
|
96 |
+
data: data,
|
97 |
+
success: function(msg){
|
98 |
+
ct_feedback_message_output(ct_comment_id, ct_comment_status, msg, ct_undo);
|
99 |
+
},
|
100 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
101 |
+
|
102 |
+
},
|
103 |
+
timeout: 5000
|
104 |
+
});
|
105 |
+
}
|
106 |
+
|
107 |
+
// Outputs CT message about feedback
|
108 |
+
function ct_feedback_message_output(ct_comment_id, ct_comment_status, ct_result, ct_undo){
|
109 |
+
if(ct_result == 1){
|
110 |
+
if(ct_comment_status == 'approve' && !ct_undo){
|
111 |
+
jQuery('tr#comment-'+ct_comment_id)
|
112 |
+
.html('')
|
113 |
+
.show()
|
114 |
+
.append("<td colspan='5'></td>").children('td')
|
115 |
+
.css('background', 'rgba(110,240,110,0.7)')
|
116 |
+
.append("<div class='spam-undo-inside'>"+ctCommentsScreen.ct_feedback_msg_whitelisted+" "+ctCommentsScreen.ct_feedback_msg+"</div>");
|
117 |
+
}
|
118 |
+
if(ct_comment_status == 'spam'){
|
119 |
+
if(jQuery('tr').is('#undo-'+ct_comment_id)){
|
120 |
+
jQuery('tr#undo-'+ct_comment_id)
|
121 |
+
.css('background', 'rgba(240,110,110,0.7)');
|
122 |
+
jQuery('tr#undo-'+ct_comment_id+' div.spam-undo-inside')
|
123 |
+
.append(" "+ctCommentsScreen.ct_feedback_msg_blacklisted+" "+ctCommentsScreen.ct_feedback_msg);
|
124 |
+
}else{
|
125 |
+
jQuery('tr#comment-'+ct_comment_id)
|
126 |
+
.html('')
|
127 |
+
.show()
|
128 |
+
.css('background', 'rgba(240,110,110,0.7)')
|
129 |
+
.append("<td colspan='5'></td>").children('td')
|
130 |
+
.append("<div class='spam-undo-inside'>"+ctCommentsScreen.ct_feedback_msg_blacklisted+" "+ctCommentsScreen.ct_feedback_msg+"</div>");
|
131 |
+
}
|
132 |
+
}
|
133 |
+
}
|
134 |
+
if(ct_result == 0){
|
135 |
+
// Error occurred
|
136 |
+
}if(ct_result == 'no_hash'){
|
137 |
+
// No hash for this comment
|
138 |
+
}
|
139 |
+
}
|
assets/js/cleantalk-public.js
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function(){
|
2 |
+
|
3 |
+
// Debug
|
4 |
+
if(parseInt(ctPublic.ct_debug_ajax))
|
5 |
+
jQuery(document).ajaxSuccess(function(e, xhr, settings, data) {
|
6 |
+
console.log(e);
|
7 |
+
console.log(xhr);
|
8 |
+
console.log(settings);
|
9 |
+
console.log(data);
|
10 |
+
});
|
11 |
+
|
12 |
+
// Set background-color similar to parents
|
13 |
+
var ct_current_wrapper = jQuery('.ct_comment_info').parent(),
|
14 |
+
ct_current_background_color;
|
15 |
+
for(var i=0; i < 30; i++){
|
16 |
+
if(ct_current_wrapper.css('background-color') == 'rgba(0, 0, 0, 0)' || i == 29)
|
17 |
+
ct_current_wrapper = ct_current_wrapper.parent();
|
18 |
+
else{
|
19 |
+
jQuery('.ct_comment_info').css('background', ct_current_wrapper.css('background-color'));
|
20 |
+
break;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
jQuery('.ct_this_is').on('click', function(){
|
25 |
+
|
26 |
+
var ct_current_button = jQuery(this),
|
27 |
+
ct_feedback_wrap = jQuery(this).siblings('.ct_feedback_wrap'),
|
28 |
+
ct_feedback_msg = jQuery('.ct_feedback_msg'),
|
29 |
+
ct_comment_status;
|
30 |
+
|
31 |
+
if(ct_current_button.hasClass('ct_this_is_spam'))
|
32 |
+
ct_comment_status = 'spam';
|
33 |
+
else
|
34 |
+
ct_comment_status = 'approve';
|
35 |
+
|
36 |
+
var data = {
|
37 |
+
'action': 'ct_feedback_comment',
|
38 |
+
'security': ctPublic.ct_ajax_nonce,
|
39 |
+
'comment_id': ct_current_button.attr('commentid'),
|
40 |
+
'comment_status': ct_comment_status,
|
41 |
+
'change_status': 1
|
42 |
+
};
|
43 |
+
|
44 |
+
jQuery.ajax({
|
45 |
+
type: "POST",
|
46 |
+
url: ct_ajaxurl,
|
47 |
+
data: data,
|
48 |
+
success: function(msg){
|
49 |
+
ct_current_button.hide();
|
50 |
+
ct_current_button.siblings('span.ct_this_is').show();
|
51 |
+
|
52 |
+
jQuery('.ct_feedback_result').hide();
|
53 |
+
if(ct_comment_status == 'approve')
|
54 |
+
jQuery('.ct_feedback_result_not_spam').show();
|
55 |
+
else
|
56 |
+
jQuery('.ct_feedback_result_spam').show();
|
57 |
+
|
58 |
+
if(msg == 1){
|
59 |
+
ct_feedback_msg.addClass('ct_feedback_success');
|
60 |
+
ct_feedback_msg.html(ctPublic.ct_feedback_msg);
|
61 |
+
}else if(msg == 0){
|
62 |
+
// Error occurred
|
63 |
+
ct_feedback_msg.addClass('ct_feedback_error');
|
64 |
+
ct_feedback_msg.html(ctPublic.ct_feedback_error);
|
65 |
+
}else if(msg == 'no_hash'){
|
66 |
+
// No hash for this comment
|
67 |
+
ct_feedback_msg.addClass('ct_feedback_no_hash');
|
68 |
+
ct_feedback_msg.html(ctPublic.ct_feedback_no_hash);
|
69 |
+
}
|
70 |
+
// Hidding feedback message for every message type
|
71 |
+
ct_feedback_wrap.show();
|
72 |
+
ct_feedback_wrap.css('display', 'inline-block');
|
73 |
+
|
74 |
+
var ct_timeout_id = ct_feedback_wrap.data('interval_id');
|
75 |
+
clearInterval(ct_timeout_id);
|
76 |
+
ct_timeout_id = setTimeout(function(){
|
77 |
+
ct_feedback_wrap.fadeOut(1000);
|
78 |
+
}, 5000);
|
79 |
+
ct_feedback_wrap.data('interval_id', ct_timeout_id);
|
80 |
+
},
|
81 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
82 |
+
|
83 |
+
},
|
84 |
+
timeout: 5000
|
85 |
+
});
|
86 |
+
});
|
87 |
+
|
88 |
+
});
|
{inc → assets/js}/cleantalk-users-checkspam.js
RENAMED
@@ -6,11 +6,9 @@ var ct_cool_down_time = 65000,
|
|
6 |
ct_cooling_down_flag = false;
|
7 |
var ct_new_check = true;
|
8 |
|
9 |
-
String.prototype.format = String.prototype.f = function ()
|
10 |
-
{
|
11 |
var args = arguments;
|
12 |
-
return this.replace(/\{\{|\}\}|\{(\d+)\}/g, function (m, n)
|
13 |
-
{
|
14 |
if (m == "{{") { return "{"; }
|
15 |
if (m == "}}") { return "}"; }
|
16 |
return args[n];
|
@@ -18,31 +16,23 @@ String.prototype.format = String.prototype.f = function ()
|
|
18 |
};
|
19 |
|
20 |
var close_animate=true;
|
21 |
-
function animate_comment(to,id)
|
22 |
-
{
|
23 |
-
|
24 |
-
{
|
25 |
-
if(to==0.3)
|
26 |
-
{
|
27 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
28 |
animate_comment(1,id)
|
29 |
});
|
30 |
-
}
|
31 |
-
else
|
32 |
-
{
|
33 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
34 |
animate_comment(0.3,id)
|
35 |
});
|
36 |
}
|
37 |
-
}
|
38 |
-
else
|
39 |
-
{
|
40 |
close_animate=true;
|
41 |
}
|
42 |
}
|
43 |
|
44 |
-
function ct_clear_users()
|
45 |
-
{
|
46 |
var data = {
|
47 |
'action': 'ajax_clear_users',
|
48 |
'security': ajax_nonce
|
@@ -66,8 +56,7 @@ function ct_cooling_down_toggle(){
|
|
66 |
ct_show_users_info();
|
67 |
}
|
68 |
|
69 |
-
function ct_send_users()
|
70 |
-
{
|
71 |
|
72 |
if(ct_cooling_down_flag == true)
|
73 |
return;
|
@@ -86,11 +75,12 @@ function ct_send_users()
|
|
86 |
'security': ajax_nonce,
|
87 |
'new_check': ct_new_check
|
88 |
};
|
|
|
89 |
jQuery.ajax({
|
90 |
type: "POST",
|
91 |
url: ajaxurl,
|
92 |
data: data,
|
93 |
-
success: function(msg){
|
94 |
ct_new_check = false;
|
95 |
if(parseInt(msg)==1){
|
96 |
ct_send_users();
|
@@ -100,7 +90,7 @@ function ct_send_users()
|
|
100 |
location.href='users.php?page=ct_check_users&ct_worked=1';
|
101 |
}else{
|
102 |
working=false;
|
103 |
-
alert(
|
104 |
location.href='users.php?page=ct_check_users&ct_worked=1';
|
105 |
}
|
106 |
},
|
@@ -113,10 +103,10 @@ function ct_send_users()
|
|
113 |
timeout: 15000
|
114 |
});
|
115 |
}
|
116 |
-
function ct_show_users_info()
|
117 |
-
|
118 |
-
if(working)
|
119 |
-
|
120 |
if(ct_cooling_down_flag == true){
|
121 |
jQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');
|
122 |
jQuery('#ct_cooling_notice').show();
|
@@ -147,8 +137,8 @@ function ct_show_users_info()
|
|
147 |
});
|
148 |
}
|
149 |
}
|
150 |
-
function ct_insert_users()
|
151 |
-
|
152 |
var data = {
|
153 |
'action': 'ajax_insert_users',
|
154 |
'security': ajax_nonce
|
@@ -163,8 +153,8 @@ function ct_insert_users()
|
|
163 |
}
|
164 |
});
|
165 |
}
|
166 |
-
function ct_delete_all_users()
|
167 |
-
|
168 |
var data = {
|
169 |
'action': 'ajax_delete_all_users',
|
170 |
'security': ajax_nonce
|
@@ -175,13 +165,10 @@ function ct_delete_all_users()
|
|
175 |
url: ajaxurl,
|
176 |
data: data,
|
177 |
success: function(msg){
|
178 |
-
if(msg>0)
|
179 |
-
{
|
180 |
jQuery('#cleantalk_users_left').html(msg);
|
181 |
ct_delete_all_users();
|
182 |
-
}
|
183 |
-
else
|
184 |
-
{
|
185 |
location.href='users.php?page=ct_check_users&ct_worked=1';
|
186 |
}
|
187 |
},
|
@@ -194,13 +181,12 @@ function ct_delete_all_users()
|
|
194 |
timeout: 25000
|
195 |
});
|
196 |
}
|
197 |
-
function ct_delete_checked_users()
|
198 |
-
|
199 |
ids=Array();
|
200 |
var cnt=0;
|
201 |
jQuery('input[id^=cb-select-][id!=cb-select-all-1]').each(function(){
|
202 |
-
if(jQuery(this).prop('checked'))
|
203 |
-
{
|
204 |
ids[cnt]=jQuery(this).attr('id').substring(10);
|
205 |
cnt++;
|
206 |
}
|
@@ -260,23 +246,20 @@ jQuery(document).ready(function(){
|
|
260 |
animate_comment(0.3, id);
|
261 |
});
|
262 |
|
|
|
263 |
jQuery("#ct_check_users_button").click(function(){
|
264 |
-
jQuery('#ct_working_message').show();
|
265 |
-
jQuery('#ct_check_users_button').hide();
|
266 |
-
jQuery('#ct_info_message').hide();
|
267 |
-
working=true;
|
268 |
-
ct_clear_users();
|
269 |
-
});
|
270 |
-
|
271 |
-
jQuery("#ct_check_users_button").click(function(){
|
272 |
-
|
273 |
// jQuery('#ct_checking_users_status').html('');
|
|
|
274 |
jQuery('#ct_check_users_table').hide();
|
|
|
275 |
jQuery('#ct_delete_all_users').hide();
|
276 |
-
jQuery('#ct_delete_checked_users').hide();
|
277 |
jQuery('#ct_get_csv_file').hide();
|
|
|
|
|
|
|
278 |
jQuery('#ct_preloader').show();
|
279 |
working=true;
|
|
|
280 |
ct_show_users_info();
|
281 |
});
|
282 |
|
@@ -288,18 +271,19 @@ jQuery(document).ready(function(){
|
|
288 |
//window.location.reload();
|
289 |
window.location.href='users.php?page=ct_check_users&ct_worked=1';
|
290 |
});
|
|
|
|
|
291 |
jQuery("#ct_delete_all_users").click(function(){
|
292 |
if (!confirm(ctUsersCheck.ct_confirm_deletion_all))
|
293 |
return false;
|
294 |
-
|
295 |
jQuery('#ct_checking_users_status').hide();
|
296 |
jQuery('#ct_check_users_table').hide();
|
297 |
jQuery('#ct_tools_buttons').hide();
|
298 |
jQuery('#ct_info_message').hide();
|
299 |
jQuery('#ct_ajax_info_users').hide();
|
300 |
-
jQuery('#ct_check_users_table').hide();
|
301 |
jQuery('#ct_check_users_button').hide();
|
302 |
jQuery('#ct_search_info').hide();
|
|
|
303 |
jQuery('#ct_deleting_message').show();
|
304 |
jQuery('#ct_preloader').show();
|
305 |
jQuery('#ct_stop_deletion').show();
|
@@ -349,6 +333,35 @@ jQuery(document).ready(function(){
|
|
349 |
});
|
350 |
},
|
351 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
});
|
353 |
|
354 |
// Request to Download CSV file.
|
@@ -372,11 +385,7 @@ jQuery(document).ready(function(){
|
|
372 |
});
|
373 |
|
374 |
//Default load actions
|
375 |
-
|
376 |
-
ct_show_users_info();
|
377 |
-
working=false;
|
378 |
-
if(location.href.match(/ct_check_users/) && !location.href.match(/ct_worked=1/))
|
379 |
-
{
|
380 |
jQuery("#ct_check_users_button").click();
|
381 |
}
|
382 |
});
|
6 |
ct_cooling_down_flag = false;
|
7 |
var ct_new_check = true;
|
8 |
|
9 |
+
String.prototype.format = String.prototype.f = function (){
|
|
|
10 |
var args = arguments;
|
11 |
+
return this.replace(/\{\{|\}\}|\{(\d+)\}/g, function (m, n){
|
|
|
12 |
if (m == "{{") { return "{"; }
|
13 |
if (m == "}}") { return "}"; }
|
14 |
return args[n];
|
16 |
};
|
17 |
|
18 |
var close_animate=true;
|
19 |
+
function animate_comment(to,id){
|
20 |
+
if(close_animate){
|
21 |
+
if(to==0.3){
|
|
|
|
|
|
|
22 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
23 |
animate_comment(1,id)
|
24 |
});
|
25 |
+
}else{
|
|
|
|
|
26 |
jQuery('#comment-'+id).fadeTo(200,to,function(){
|
27 |
animate_comment(0.3,id)
|
28 |
});
|
29 |
}
|
30 |
+
}else{
|
|
|
|
|
31 |
close_animate=true;
|
32 |
}
|
33 |
}
|
34 |
|
35 |
+
function ct_clear_users(){
|
|
|
36 |
var data = {
|
37 |
'action': 'ajax_clear_users',
|
38 |
'security': ajax_nonce
|
56 |
ct_show_users_info();
|
57 |
}
|
58 |
|
59 |
+
function ct_send_users(){
|
|
|
60 |
|
61 |
if(ct_cooling_down_flag == true)
|
62 |
return;
|
75 |
'security': ajax_nonce,
|
76 |
'new_check': ct_new_check
|
77 |
};
|
78 |
+
|
79 |
jQuery.ajax({
|
80 |
type: "POST",
|
81 |
url: ajaxurl,
|
82 |
data: data,
|
83 |
+
success: function(msg){
|
84 |
ct_new_check = false;
|
85 |
if(parseInt(msg)==1){
|
86 |
ct_send_users();
|
90 |
location.href='users.php?page=ct_check_users&ct_worked=1';
|
91 |
}else{
|
92 |
working=false;
|
93 |
+
alert(msg);
|
94 |
location.href='users.php?page=ct_check_users&ct_worked=1';
|
95 |
}
|
96 |
},
|
103 |
timeout: 15000
|
104 |
});
|
105 |
}
|
106 |
+
function ct_show_users_info(){
|
107 |
+
|
108 |
+
if(working){
|
109 |
+
|
110 |
if(ct_cooling_down_flag == true){
|
111 |
jQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');
|
112 |
jQuery('#ct_cooling_notice').show();
|
137 |
});
|
138 |
}
|
139 |
}
|
140 |
+
function ct_insert_users(){
|
141 |
+
|
142 |
var data = {
|
143 |
'action': 'ajax_insert_users',
|
144 |
'security': ajax_nonce
|
153 |
}
|
154 |
});
|
155 |
}
|
156 |
+
function ct_delete_all_users(){
|
157 |
+
|
158 |
var data = {
|
159 |
'action': 'ajax_delete_all_users',
|
160 |
'security': ajax_nonce
|
165 |
url: ajaxurl,
|
166 |
data: data,
|
167 |
success: function(msg){
|
168 |
+
if(msg>0){
|
|
|
169 |
jQuery('#cleantalk_users_left').html(msg);
|
170 |
ct_delete_all_users();
|
171 |
+
}else{
|
|
|
|
|
172 |
location.href='users.php?page=ct_check_users&ct_worked=1';
|
173 |
}
|
174 |
},
|
181 |
timeout: 25000
|
182 |
});
|
183 |
}
|
184 |
+
function ct_delete_checked_users(){
|
185 |
+
|
186 |
ids=Array();
|
187 |
var cnt=0;
|
188 |
jQuery('input[id^=cb-select-][id!=cb-select-all-1]').each(function(){
|
189 |
+
if(jQuery(this).prop('checked')){
|
|
|
190 |
ids[cnt]=jQuery(this).attr('id').substring(10);
|
191 |
cnt++;
|
192 |
}
|
246 |
animate_comment(0.3, id);
|
247 |
});
|
248 |
|
249 |
+
// Check users
|
250 |
jQuery("#ct_check_users_button").click(function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
// jQuery('#ct_checking_users_status').html('');
|
252 |
+
jQuery('#ct_delete_checked_users').hide();
|
253 |
jQuery('#ct_check_users_table').hide();
|
254 |
+
jQuery('#ct_check_users_button').hide();
|
255 |
jQuery('#ct_delete_all_users').hide();
|
|
|
256 |
jQuery('#ct_get_csv_file').hide();
|
257 |
+
jQuery('div.pagination').hide();
|
258 |
+
jQuery('#ct_info_message').hide();
|
259 |
+
jQuery('#ct_working_message').show();
|
260 |
jQuery('#ct_preloader').show();
|
261 |
working=true;
|
262 |
+
ct_clear_users();
|
263 |
ct_show_users_info();
|
264 |
});
|
265 |
|
271 |
//window.location.reload();
|
272 |
window.location.href='users.php?page=ct_check_users&ct_worked=1';
|
273 |
});
|
274 |
+
|
275 |
+
// Delete all spam users
|
276 |
jQuery("#ct_delete_all_users").click(function(){
|
277 |
if (!confirm(ctUsersCheck.ct_confirm_deletion_all))
|
278 |
return false;
|
|
|
279 |
jQuery('#ct_checking_users_status').hide();
|
280 |
jQuery('#ct_check_users_table').hide();
|
281 |
jQuery('#ct_tools_buttons').hide();
|
282 |
jQuery('#ct_info_message').hide();
|
283 |
jQuery('#ct_ajax_info_users').hide();
|
|
|
284 |
jQuery('#ct_check_users_button').hide();
|
285 |
jQuery('#ct_search_info').hide();
|
286 |
+
jQuery('div.pagination').hide();
|
287 |
jQuery('#ct_deleting_message').show();
|
288 |
jQuery('#ct_preloader').show();
|
289 |
jQuery('#ct_stop_deletion').show();
|
333 |
});
|
334 |
},
|
335 |
});
|
336 |
+
|
337 |
+
// Positive feedback
|
338 |
+
var data = {
|
339 |
+
'action': 'ct_feedback_user',
|
340 |
+
'security': ajax_nonce,
|
341 |
+
'user_id': ct_id,
|
342 |
+
'status': 'approve'
|
343 |
+
};
|
344 |
+
jQuery.ajax({
|
345 |
+
type: "POST",
|
346 |
+
url: ajaxurl,
|
347 |
+
data: data,
|
348 |
+
success: function(msg){
|
349 |
+
if(msg == 1){
|
350 |
+
// Success
|
351 |
+
}
|
352 |
+
if(msg == 0){
|
353 |
+
// Error occurred
|
354 |
+
}
|
355 |
+
if(msg == 'no_hash'){
|
356 |
+
// No hash
|
357 |
+
}
|
358 |
+
},
|
359 |
+
error: function(jqXHR, textStatus, errorThrown) {
|
360 |
+
|
361 |
+
},
|
362 |
+
timeout: 5000
|
363 |
+
});
|
364 |
+
|
365 |
});
|
366 |
|
367 |
// Request to Download CSV file.
|
385 |
});
|
386 |
|
387 |
//Default load actions
|
388 |
+
if(location.href.match(/ct_check_users/) && !location.href.match(/ct_worked=1/)){
|
|
|
|
|
|
|
|
|
389 |
jQuery("#ct_check_users_button").click();
|
390 |
}
|
391 |
});
|
assets/js/cleantalk-users-editscreen.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function ct_is_email(str){
|
2 |
+
return str.search(/.*@.*\..*/);
|
3 |
+
}
|
4 |
+
function ct_is_ip(str){
|
5 |
+
return str.search(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/);
|
6 |
+
}
|
7 |
+
|
8 |
+
jQuery(document).ready(function(){
|
9 |
+
|
10 |
+
/* Shows "Find spam users" Buttons */
|
11 |
+
jQuery('#changeit').after(' <a href="users.php?page=ct_check_users" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctUsersScreen.spambutton_users_text+'</a>' +
|
12 |
+
' <a href="users.php?page=ct_check_users&ct_worked=1" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctUsersScreen.spambutton_users_text_show+'</a>');
|
13 |
+
|
14 |
+
/* Shows link to blacklists near every email and IP address */
|
15 |
+
if(parseInt(ctUsersScreen.ct_show_check_links))
|
16 |
+
jQuery('.column-email a').each(function(){
|
17 |
+
var ct_curr_str = jQuery(this).html();
|
18 |
+
if(ct_is_email(ct_curr_str) != -1){
|
19 |
+
jQuery(this).after(' <a href="https://cleantalk.org/blacklists/'+ct_curr_str+'" target="_blank" title="https://cleantalk.org/blacklists/'+ct_curr_str+'" class="ct_link_new_tab"><img src="'+ctUsersScreen.ct_img_src_new_tab+'"></a>');
|
20 |
+
}
|
21 |
+
});
|
22 |
+
});
|
cleantalk.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
|
6 |
-
Version: 5.
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
-
$cleantalk_plugin_version='5.
|
11 |
-
$ct_agent_version = 'wordpress-
|
12 |
$cleantalk_executed=false;
|
13 |
$ct_sfw_updated = false;
|
14 |
|
@@ -32,8 +32,10 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
32 |
$ct_data=ct_get_data();
|
33 |
|
34 |
//Cron jobs
|
35 |
-
add_action('cleantalk_send_daily_report_hook', 'cleantalk_send_daily_report'); //Sending daily report
|
36 |
-
add_action('cleantalk_get_brief_data_hook', 'cleantalk_get_brief_data'); //Sending daily report
|
|
|
|
|
37 |
|
38 |
//Delete cookie for admin trial notice
|
39 |
add_action('wp_logout', 'ct_wp_logout');
|
@@ -140,7 +142,6 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
140 |
if(isset($_COOKIE['ct_sfw_pass_key']) && $_COOKIE['ct_sfw_pass_key'] == md5($ct_cur_ip.$ct_options['apikey'])){
|
141 |
$is_sfw_check=false;
|
142 |
if(isset($_COOKIE['ct_sfw_passed'])){
|
143 |
-
update_option('cleantalk_data', $ct_data);
|
144 |
CleanTalkSFW::sfw_update_logs($ct_cur_ip, 'passed');
|
145 |
@setcookie ('ct_sfw_passed', '0', 1, "/");
|
146 |
}
|
@@ -267,6 +268,17 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
267 |
|
268 |
}
|
269 |
if (defined( 'DOING_AJAX' ) && DOING_AJAX||isset($_POST['cma-action'])){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
$cleantalk_hooked_actions = array();
|
271 |
$cleantalk_ajax_actions_to_check = array();
|
272 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
|
@@ -274,6 +286,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
274 |
|
275 |
// Do check for AJAX if Unknown action or Known action with mandatory check
|
276 |
if( isset($_POST['action']) &&
|
|
|
277 |
!isset($_COOKIE[LOGGED_IN_COOKIE]) &&
|
278 |
(!in_array($_POST['action'], $cleantalk_hooked_actions) || in_array($_POST['action'], $cleantalk_ajax_actions_to_check))
|
279 |
){
|
@@ -309,18 +322,12 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
309 |
|
310 |
add_action('admin_enqueue_scripts', 'ct_enqueue_scripts');
|
311 |
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
add_action('comment_unapproved_to_spam', 'ct_comment_spam'); // param - comment object
|
317 |
-
add_action('comment_approved_to_spam', 'ct_comment_spam'); // param - comment object
|
318 |
-
//add_filter('get_comment_text', 'ct_get_comment_text'); // param - current comment text
|
319 |
-
add_filter('unspam_comment', 'ct_unspam_comment');
|
320 |
-
}
|
321 |
-
|
322 |
if($pagenow=='users.php')
|
323 |
-
add_action('delete_user', 'ct_delete_user');
|
324 |
|
325 |
if($pagenow=='plugins.php' || @strpos($_SERVER['REQUEST_URI'],'plugins.php')!==false){
|
326 |
|
@@ -334,13 +341,11 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
334 |
|
335 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
|
336 |
|
|
|
|
|
337 |
// Init action.
|
338 |
add_action('plugins_loaded', 'ct_init', 1);
|
339 |
-
|
340 |
-
// Hourly run hook
|
341 |
-
add_action('ct_hourly_event_hook', 'ct_do_this_hourly');
|
342 |
-
add_action('cleantalk_update_sfw_hook', 'cleantalk_update_sfw');
|
343 |
-
|
344 |
// Comments
|
345 |
add_filter('preprocess_comment', 'ct_preprocess_comment', 1, 1); // param - comment data array
|
346 |
add_filter('comment_text', 'ct_comment_text' );
|
@@ -358,6 +363,9 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
358 |
// Login form - for notifications only
|
359 |
add_filter('login_message', 'ct_login_message');
|
360 |
|
|
|
|
|
|
|
361 |
// Ait-Themes fix
|
362 |
if(isset($_GET['ait-action']) && $_GET['ait-action']=='register'){
|
363 |
$tmp=$_POST['redirect_to'];
|
@@ -365,8 +373,8 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
365 |
ct_contact_form_validate();
|
366 |
$_POST['redirect_to']=$tmp;
|
367 |
}
|
368 |
-
}
|
369 |
-
}
|
370 |
|
371 |
function ct_db_refresh(){
|
372 |
global $wpdb;
|
@@ -407,6 +415,7 @@ if (!function_exists ( 'ct_activation')) {
|
|
407 |
|
408 |
add_option('ct_plugin_do_activation_redirect', true);
|
409 |
add_option('cleantalk_activation_timestamp', time());
|
|
|
410 |
}
|
411 |
}
|
412 |
|
@@ -531,16 +540,16 @@ function ct_add_nocache_script_footer(){
|
|
531 |
|
532 |
global $test_external_forms, $test_internal_forms, $cleantalk_plugin_version;
|
533 |
|
534 |
-
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_nocache.js' , __FILE__ )."?
|
535 |
|
536 |
if($test_external_forms){
|
537 |
print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
538 |
-
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?
|
539 |
}
|
540 |
|
541 |
if($test_internal_forms){
|
542 |
print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
543 |
-
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_internal.js' , __FILE__ )."?
|
544 |
}
|
545 |
}
|
546 |
}
|
@@ -598,12 +607,7 @@ function ct_inject_nocache_script($html){
|
|
598 |
$ct_replace.="\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
599 |
$ct_replace.="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
600 |
}
|
601 |
-
|
602 |
-
if($test_internal_forms){
|
603 |
-
$ct_replace .= "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
604 |
-
$ct_replace .= "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_internal.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
605 |
-
}
|
606 |
-
|
607 |
$html = preg_replace("/<\/body>\s*<\/html>/", $ct_replace."</body></html>", $html, 1); }
|
608 |
}
|
609 |
return $html;
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
|
6 |
+
Version: 5.67
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
+
$cleantalk_plugin_version='5.67';
|
11 |
+
$ct_agent_version = 'wordpress-567';
|
12 |
$cleantalk_executed=false;
|
13 |
$ct_sfw_updated = false;
|
14 |
|
32 |
$ct_data=ct_get_data();
|
33 |
|
34 |
//Cron jobs
|
35 |
+
add_action('cleantalk_send_daily_report_hook', 'cleantalk_send_daily_report'); //Sending daily report (daily)
|
36 |
+
add_action('cleantalk_get_brief_data_hook', 'cleantalk_get_brief_data'); //Sending daily report (daily)
|
37 |
+
add_action('ct_hourly_event_hook', 'ct_do_this_hourly'); // Sends feedback, deleting old spam (hourly)
|
38 |
+
add_action('cleantalk_update_sfw_hook', 'cleantalk_update_sfw'); //Updates SFW (daily)
|
39 |
|
40 |
//Delete cookie for admin trial notice
|
41 |
add_action('wp_logout', 'ct_wp_logout');
|
142 |
if(isset($_COOKIE['ct_sfw_pass_key']) && $_COOKIE['ct_sfw_pass_key'] == md5($ct_cur_ip.$ct_options['apikey'])){
|
143 |
$is_sfw_check=false;
|
144 |
if(isset($_COOKIE['ct_sfw_passed'])){
|
|
|
145 |
CleanTalkSFW::sfw_update_logs($ct_cur_ip, 'passed');
|
146 |
@setcookie ('ct_sfw_passed', '0', 1, "/");
|
147 |
}
|
268 |
|
269 |
}
|
270 |
if (defined( 'DOING_AJAX' ) && DOING_AJAX||isset($_POST['cma-action'])){
|
271 |
+
|
272 |
+
// Feedback for comments
|
273 |
+
if(isset($_POST['action']) && $_POST['action'] == 'ct_feedback_comment'){
|
274 |
+
add_action( 'wp_ajax_nopriv_ct_feedback_comment', 'ct_comment_send_feedback',1 );
|
275 |
+
add_action( 'wp_ajax_ct_feedback_comment', 'ct_comment_send_feedback',1 );
|
276 |
+
}
|
277 |
+
if(isset($_POST['action']) && $_POST['action'] == 'ct_feedback_user'){
|
278 |
+
add_action( 'wp_ajax_nopriv_ct_feedback_user', 'ct_user_send_feedback',1 );
|
279 |
+
add_action( 'wp_ajax_ct_feedback_user', 'ct_user_send_feedback',1 );
|
280 |
+
}
|
281 |
+
|
282 |
$cleantalk_hooked_actions = array();
|
283 |
$cleantalk_ajax_actions_to_check = array();
|
284 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
|
286 |
|
287 |
// Do check for AJAX if Unknown action or Known action with mandatory check
|
288 |
if( isset($_POST['action']) &&
|
289 |
+
defined('LOGGED_IN_COOKIE') &&
|
290 |
!isset($_COOKIE[LOGGED_IN_COOKIE]) &&
|
291 |
(!in_array($_POST['action'], $cleantalk_hooked_actions) || in_array($_POST['action'], $cleantalk_ajax_actions_to_check))
|
292 |
){
|
322 |
|
323 |
add_action('admin_enqueue_scripts', 'ct_enqueue_scripts');
|
324 |
|
325 |
+
// Sends feedback to the cloud about comments
|
326 |
+
// add_action('wp_set_comment_status', 'ct_comment_send_feedback', 10, 2);
|
327 |
+
|
328 |
+
// Sends feedback to the cloud about deleted users
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
if($pagenow=='users.php')
|
330 |
+
add_action('delete_user', 'ct_delete_user', 10, 2);
|
331 |
|
332 |
if($pagenow=='plugins.php' || @strpos($_SERVER['REQUEST_URI'],'plugins.php')!==false){
|
333 |
|
341 |
|
342 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
|
343 |
|
344 |
+
add_action('wp_enqueue_scripts', 'ct_enqueue_scripts_public');
|
345 |
+
|
346 |
// Init action.
|
347 |
add_action('plugins_loaded', 'ct_init', 1);
|
348 |
+
|
|
|
|
|
|
|
|
|
349 |
// Comments
|
350 |
add_filter('preprocess_comment', 'ct_preprocess_comment', 1, 1); // param - comment data array
|
351 |
add_filter('comment_text', 'ct_comment_text' );
|
363 |
// Login form - for notifications only
|
364 |
add_filter('login_message', 'ct_login_message');
|
365 |
|
366 |
+
// Comments output hook
|
367 |
+
add_filter('wp_list_comments_args', 'ct_wp_list_comments_args');
|
368 |
+
|
369 |
// Ait-Themes fix
|
370 |
if(isset($_GET['ait-action']) && $_GET['ait-action']=='register'){
|
371 |
$tmp=$_POST['redirect_to'];
|
373 |
ct_contact_form_validate();
|
374 |
$_POST['redirect_to']=$tmp;
|
375 |
}
|
376 |
+
}
|
377 |
+
}
|
378 |
|
379 |
function ct_db_refresh(){
|
380 |
global $wpdb;
|
415 |
|
416 |
add_option('ct_plugin_do_activation_redirect', true);
|
417 |
add_option('cleantalk_activation_timestamp', time());
|
418 |
+
add_option('ct_installing', true);
|
419 |
}
|
420 |
}
|
421 |
|
540 |
|
541 |
global $test_external_forms, $test_internal_forms, $cleantalk_plugin_version;
|
542 |
|
543 |
+
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_nocache.js' , __FILE__ )."?ver=".$cleantalk_plugin_version."'></script>\n";
|
544 |
|
545 |
if($test_external_forms){
|
546 |
print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
547 |
+
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?ver=".$cleantalk_plugin_version."'></script>\n";
|
548 |
}
|
549 |
|
550 |
if($test_internal_forms){
|
551 |
print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
552 |
+
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_internal.js' , __FILE__ )."?ver=".$cleantalk_plugin_version."'></script>\n";
|
553 |
}
|
554 |
}
|
555 |
}
|
607 |
$ct_replace.="\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
608 |
$ct_replace.="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
609 |
}
|
610 |
+
|
|
|
|
|
|
|
|
|
|
|
611 |
$html = preg_replace("/<\/body>\s*<\/html>/", $ct_replace."</body></html>", $html, 1); }
|
612 |
}
|
613 |
return $html;
|
i18n/cleantalk-ru_RU.mo
CHANGED
Binary file
|
i18n/cleantalk.pot
CHANGED
@@ -3,8 +3,8 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
"Project-Id-Version: Anti-Spam by CleanTalk\n"
|
6 |
-
"POT-Creation-Date: 2017-
|
7 |
-
"PO-Revision-Date: 2017-
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
@@ -20,29 +20,29 @@ msgstr ""
|
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
|
23 |
-
#: cleantalk.php:
|
24 |
msgid "WordPress spam"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: cleantalk.php:
|
28 |
msgid "blocked by"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: cleantalk.php:
|
32 |
#, php-format
|
33 |
msgid "%d spam attacks have been blocked"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: cleantalk.php:
|
37 |
msgid "Complete setup"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: cleantalk.php:
|
41 |
msgid ""
|
42 |
"To see the anti-spam log and complete the setup, please get the Access key."
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: cleantalk.php:
|
46 |
#, php-format
|
47 |
msgid "%s spam attacks report"
|
48 |
msgstr ""
|
@@ -51,777 +51,843 @@ msgstr ""
|
|
51 |
msgid "CleanTalk Anti-Spam Statistics"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: inc/cleantalk-admin.php:
|
55 |
#, php-format
|
56 |
-
msgid "%
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: inc/cleantalk-admin.php:
|
60 |
#, php-format
|
61 |
-
msgid "%
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: inc/cleantalk-admin.php:
|
65 |
msgid "7 days anti-spam stats"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: inc/cleantalk-admin.php:
|
69 |
msgid "Top 5 spam IPs blocked"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: inc/cleantalk-admin.php:
|
73 |
msgid "IP"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: inc/cleantalk-admin.php:
|
77 |
msgid "Country"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: inc/cleantalk-admin.php:
|
81 |
msgid "Block Count"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: inc/cleantalk-admin.php:
|
85 |
msgid "Get Access key to activate Anti-Spam protection!"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: inc/cleantalk-admin.php:
|
89 |
msgid "Something went wrong! Server response is: \""
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: inc/cleantalk-admin.php:
|
93 |
msgid "Please, visit your dashboard."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: inc/cleantalk-admin.php:
|
97 |
#, php-format
|
98 |
msgid ""
|
99 |
"has blocked %s spam. The statistics is automatically updated every 24 hours."
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: inc/cleantalk-admin.php:
|
103 |
msgid "Failed from timeout. Going to check comments again."
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: inc/cleantalk-admin.php:
|
107 |
-
msgid "Added
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: inc/cleantalk-admin.php:
|
|
|
|
|
|
|
|
|
111 |
msgid "Delete all spam comments?"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: inc/cleantalk-admin.php:
|
115 |
msgid "Delete checked comments?"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: inc/cleantalk-admin.php:
|
119 |
msgid "Find spam-comments"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: inc/cleantalk-admin.php:
|
123 |
msgid "Show spam-comments"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: inc/cleantalk-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
msgid "Failed from timeout. Going to check users again."
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: inc/cleantalk-admin.php:
|
131 |
msgid "Failed from timeout. Going to run a new attempt to delete spam users."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: inc/cleantalk-admin.php:
|
135 |
msgid "Inserted"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: inc/cleantalk-admin.php:
|
139 |
msgid "users."
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: inc/cleantalk-admin.php:
|
143 |
msgid "Delete all spam users?"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: inc/cleantalk-admin.php:
|
147 |
msgid "Delete checked users?"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: inc/cleantalk-admin.php:
|
151 |
msgid ""
|
152 |
"File doesn't exist. File will be generated while checking. Please, press "
|
153 |
"\"Check for spam\"."
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: inc/cleantalk-admin.php:
|
157 |
msgid "Find spam-users"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: inc/cleantalk-admin.php:
|
161 |
msgid "Show spam-users"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: inc/cleantalk-admin.php:
|
165 |
msgid "CleanTalk settings"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: inc/cleantalk-admin.php:
|
169 |
#, php-format
|
170 |
msgid "Unable to connect to %s."
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: inc/cleantalk-admin.php:
|
174 |
msgid "Protection is active"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: inc/cleantalk-admin.php:
|
178 |
msgid "Advanced settings"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: inc/cleantalk-admin.php:
|
182 |
msgid "Access key"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: inc/cleantalk-admin.php:
|
186 |
msgid "Registration forms"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: inc/cleantalk-admin.php:
|
190 |
msgid "Comments form"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: inc/cleantalk-admin.php:
|
194 |
msgid "Contact forms"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: inc/cleantalk-admin.php:
|
198 |
msgid "Custom contact forms"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: inc/cleantalk-admin.php:
|
202 |
msgid "WooCommerce checkout form"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: inc/cleantalk-admin.php:
|
206 |
msgid "Protect external forms"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: inc/cleantalk-admin.php:
|
210 |
msgid "Protect internal forms"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: inc/cleantalk-admin.php:
|
214 |
msgid "buddyPress private messages"
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: inc/cleantalk-admin.php:
|
218 |
msgid "Don't check trusted user's comments"
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: inc/cleantalk-admin.php:
|
222 |
msgid "Automatically delete spam comments"
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: inc/cleantalk-admin.php:
|
226 |
msgid "Remove links from approved comments"
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: inc/cleantalk-admin.php:
|
|
|
|
|
|
|
|
|
230 |
msgid "Protect logged in Users"
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: inc/cleantalk-admin.php:
|
234 |
msgid "Use AJAX for JavaScript check"
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: inc/cleantalk-admin.php:
|
238 |
msgid "Check all post data"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: inc/cleantalk-admin.php:
|
242 |
msgid "Set cookies"
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: inc/cleantalk-admin.php:
|
246 |
msgid "Use SSL"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: inc/cleantalk-admin.php:
|
250 |
msgid "Show statistics in admin bar"
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: inc/cleantalk-admin.php:
|
254 |
msgid "Show All-time counter"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: inc/cleantalk-admin.php:
|
258 |
msgid "Show 24 hours counter"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: inc/cleantalk-admin.php:
|
262 |
msgid "SpamFireWall counter"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: inc/cleantalk-admin.php:
|
266 |
msgid "Collect details about browsers"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: inc/cleantalk-admin.php:
|
270 |
msgid "Tell others about CleanTalk"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: inc/cleantalk-admin.php:
|
274 |
-
#: inc/cleantalk-admin.php:
|
275 |
msgid "SpamFireWall"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: inc/cleantalk-admin.php:
|
279 |
-
#: inc/cleantalk-admin.php:
|
280 |
-
#: inc/cleantalk-admin.php:
|
281 |
-
#: inc/cleantalk-admin.php:
|
282 |
-
#: inc/cleantalk-admin.php:
|
283 |
-
#: inc/cleantalk-admin.php:
|
284 |
-
#: inc/cleantalk-admin.php:
|
285 |
-
#: inc/cleantalk-admin.php:
|
286 |
-
#: inc/cleantalk-admin.php:
|
287 |
-
#: inc/cleantalk-admin.php:
|
288 |
-
#: inc/cleantalk-admin.php:
|
289 |
msgid "Yes"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: inc/cleantalk-admin.php:
|
293 |
-
#: inc/cleantalk-admin.php:
|
294 |
-
#: inc/cleantalk-admin.php:
|
295 |
-
#: inc/cleantalk-admin.php:
|
296 |
-
#: inc/cleantalk-admin.php:
|
297 |
-
#: inc/cleantalk-admin.php:
|
298 |
-
#: inc/cleantalk-admin.php:
|
299 |
-
#: inc/cleantalk-admin.php:
|
300 |
-
#: inc/cleantalk-admin.php:
|
301 |
-
#: inc/cleantalk-admin.php:
|
302 |
-
#: inc/cleantalk-admin.php:
|
303 |
msgid "No"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: inc/cleantalk-admin.php:
|
307 |
msgid ""
|
308 |
"Display all-time requests counter in the admin bar. Counter displays number "
|
309 |
"of requests since plugin installation."
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: inc/cleantalk-admin.php:
|
313 |
msgid ""
|
314 |
"Display daily requests counter in the admin bar. Counter displays number of "
|
315 |
"requests of the past 24 hours."
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: inc/cleantalk-admin.php:
|
319 |
msgid "Since"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: inc/cleantalk-admin.php:
|
323 |
msgid ""
|
324 |
"All / Allowed / Blocked submissions. The number of submissions is being "
|
325 |
"counted since CleanTalk plugin installation."
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: inc/cleantalk-admin.php:
|
329 |
msgid "All"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: inc/cleantalk-admin.php:
|
333 |
msgid ""
|
334 |
"Allowed / Blocked submissions. The number of submissions for past 24 hours. "
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: inc/cleantalk-admin.php:
|
338 |
msgid "Day"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: inc/cleantalk-admin.php:
|
342 |
msgid ""
|
343 |
"All / Blocked events. Access attempts regitred by SpamFireWall counted since "
|
344 |
"the last plugin activation."
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: inc/cleantalk-admin.php:
|
348 |
msgid ""
|
349 |
"Allowed / Blocked submissions. The number of submissions is being counted "
|
350 |
"since "
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: inc/cleantalk-admin.php:
|
354 |
msgid "dashboard"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: inc/cleantalk-admin.php:
|
358 |
-
#: inc/cleantalk-admin.php:
|
359 |
msgid "Settings"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: inc/cleantalk-admin.php:
|
363 |
-
#: inc/cleantalk-admin.php:
|
364 |
msgid "Support"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: inc/cleantalk-admin.php:
|
368 |
msgid "Bulk spam comments removal tool."
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: inc/cleantalk-admin.php:
|
372 |
msgid "Check comments for spam"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: inc/cleantalk-admin.php:
|
376 |
msgid "Check users for spam"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: inc/cleantalk-admin.php:
|
380 |
msgid "Reset counter"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: inc/cleantalk-admin.php:
|
384 |
msgid "Comments forms"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: inc/cleantalk-admin.php:
|
388 |
#, php-format
|
389 |
msgid "has blocked <b>%s</b> spam."
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: inc/cleantalk-admin.php:
|
393 |
msgid "Click here to get anti-spam statistics"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: inc/cleantalk-admin.php:
|
397 |
msgid "Enter the key"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: inc/cleantalk-admin.php:
|
401 |
msgid "Get access key manually"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: inc/cleantalk-admin.php:
|
405 |
msgid "or"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: inc/cleantalk-admin.php:
|
409 |
msgid "Get access key automatically"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: inc/cleantalk-admin.php:
|
413 |
#, php-format
|
414 |
msgid "Admin e-mail (%s) will be used for registration"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: inc/cleantalk-admin.php:
|
418 |
msgid "License agreement"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: inc/cleantalk-admin.php:
|
422 |
msgid "Show the access key"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: inc/cleantalk-admin.php:
|
426 |
#, php-format
|
427 |
msgid ""
|
428 |
"Testing is failed, please, check the settings! Tech support "
|
429 |
"%ssupport@cleantalk.org%s"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: inc/cleantalk-admin.php:
|
433 |
msgid "WordPress, JetPack, WooCommerce."
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: inc/cleantalk-admin.php:
|
437 |
msgid "Forms to protect"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: inc/cleantalk-admin.php:
|
441 |
msgid "Comments and messages"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: inc/cleantalk-admin.php:
|
445 |
msgid "Data processing"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: inc/cleantalk-admin.php:
|
449 |
msgid "Admin bar"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: inc/cleantalk-admin.php:
|
453 |
msgid "Remove links from approved comments. Replace it with \"[Link deleted]\""
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: inc/cleantalk-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
msgid "WordPress, BuddyPress, bbPress, S2Member, WooCommerce."
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: inc/cleantalk-admin.php:
|
461 |
msgid ""
|
462 |
"Contact Form 7, Formidable forms, JetPack, Fast Secure Contact Form, "
|
463 |
"WordPress Landing Pages, Gravity Forms."
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: inc/cleantalk-admin.php:
|
467 |
msgid "Anti spam test for any WordPress themes or contacts forms."
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: inc/cleantalk-admin.php:
|
471 |
msgid "Anti spam test for WooCommerce checkout form."
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: inc/cleantalk-admin.php:
|
475 |
msgid "Check buddyPress private messages."
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: inc/cleantalk-admin.php:
|
479 |
#, php-format
|
480 |
msgid "Delete spam comments older than %d days."
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: inc/cleantalk-admin.php:
|
484 |
msgid ""
|
485 |
"Show/hide CleanTalk icon in top level menu in WordPress backend. The number "
|
486 |
"of submissions is being counted for past 24 hours."
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: inc/cleantalk-admin.php:
|
490 |
msgid ""
|
491 |
"Check all POST submissions from website visitors. Enable this option if you "
|
492 |
"have spam misses on website or you don`t have records about missed spam here:"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: inc/cleantalk-admin.php:
|
496 |
msgid "CleanTalk dashboard"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: inc/cleantalk-admin.php:
|
500 |
msgid "СAUTION! Option can catch POST requests in WordPress backend"
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: inc/cleantalk-admin.php:
|
504 |
msgid ""
|
505 |
"Options helps protect WordPress against spam with any caching plugins. Turn "
|
506 |
"this option on to avoid issues with caching plugins."
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: inc/cleantalk-admin.php:
|
510 |
msgid "Attention! Incompatible with AMP plugins!"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: inc/cleantalk-admin.php:
|
514 |
msgid "Dont't check comments for users with above"
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: inc/cleantalk-admin.php:
|
518 |
msgid "comments."
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: inc/cleantalk-admin.php:
|
522 |
msgid ""
|
523 |
"Checking this box you allow plugin store information about screen size and "
|
524 |
"browser plugins of website visitors. The option in a beta state."
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: inc/cleantalk-admin.php:
|
528 |
msgid ""
|
529 |
"Turn this option on to protect forms on your WordPress that send data to "
|
530 |
"third-part servers (like MailChimp)."
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: inc/cleantalk-admin.php:
|
534 |
msgid ""
|
535 |
"This option will enable protection for custom (hand-made) AJAX forms with "
|
536 |
"PHP scripts handlers on your WordPress."
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: inc/cleantalk-admin.php:
|
540 |
msgid ""
|
541 |
"Turn this option off to deny plugin generates any cookies on website front-"
|
542 |
"end. This option is helpful if you use Varnish. But most of contact forms "
|
543 |
"will not be protected by CleanTalk if the option is turned off!"
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: inc/cleantalk-admin.php:
|
547 |
msgid ""
|
548 |
"Turn this option on to use encrypted (SSL) connection with CleanTalk servers."
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: inc/cleantalk-admin.php:
|
552 |
msgid ""
|
553 |
"Turn this option on to check for spam any submissions (comments, contact "
|
554 |
"forms and etc.) from registered Users."
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: inc/cleantalk-admin.php:
|
558 |
msgid ""
|
559 |
"Checking this box places a small link under the comment form that lets "
|
560 |
"others know what anti-spam tool protects your site."
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: inc/cleantalk-admin.php:
|
564 |
msgid ""
|
565 |
"This option allows to filter spam bots before they access website. Also "
|
566 |
"reduces CPU usage on hosting server and accelerates pages load time."
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: inc/cleantalk-admin.php:
|
570 |
msgid "Learn more"
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: inc/cleantalk-admin.php:
|
574 |
msgid "Save Changes"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: inc/cleantalk-admin.php:
|
578 |
msgid "CleanTalk's tech support:"
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: inc/cleantalk-admin.php:
|
582 |
msgid "Plugin Homepage at"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: inc/cleantalk-admin.php:
|
586 |
msgid "Use s@cleantalk.org to test plugin in any WordPress form."
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: inc/cleantalk-admin.php:
|
590 |
msgid "CleanTalk is registered Trademark. All rights reserved."
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: inc/cleantalk-admin.php:
|
594 |
#, php-format
|
595 |
msgid "Unable to get Access key automatically: %s"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: inc/cleantalk-admin.php:
|
599 |
msgid "Get the Access key"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: inc/cleantalk-admin.php:
|
603 |
#, php-format
|
604 |
msgid "Please enter Access Key in %s settings to enable anti spam protection!"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: inc/cleantalk-admin.php:
|
608 |
#, php-format
|
609 |
msgid "%s trial period ends, please upgrade to %s!"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: inc/cleantalk-admin.php:
|
613 |
msgid "RENEW ANTI-SPAM"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: inc/cleantalk-admin.php:
|
617 |
msgid "next year"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: inc/cleantalk-admin.php:
|
621 |
#, php-format
|
622 |
msgid "Please renew your anti-spam license for %s."
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: inc/cleantalk-admin.php:
|
626 |
-
msgid ""
|
627 |
-
"Wrong <a href=\"options-general.php?page=cleantalk\"><b style=\"color: "
|
628 |
-
"#49C73B;\">Clean</b><b style=\"color: #349ebf;\">Talk</b> access key</"
|
629 |
-
"a>! Please check it or ask <a target=\"_blank\" href=\"https://cleantalk.org/"
|
630 |
-
"forum/\">support</a>."
|
631 |
-
msgstr ""
|
632 |
-
|
633 |
-
#: inc/cleantalk-admin.php:1859
|
634 |
msgid "Translate"
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: inc/cleantalk-admin.php:
|
638 |
msgid "FAQ"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: inc/cleantalk-comments.php:
|
642 |
-
#: inc/cleantalk-users.php:
|
643 |
msgid "Check for spam"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: inc/cleantalk-comments.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
msgid "Author"
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: inc/cleantalk-comments.php:
|
651 |
msgid "Comment"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: inc/cleantalk-comments.php:
|
655 |
msgid "In Response To"
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: inc/cleantalk-comments.php:
|
659 |
#, php-format
|
660 |
msgid "Submitted on <a href=\"%1$s\">%2$s at %3$s</a>"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: inc/cleantalk-comments.php:
|
664 |
msgid "Y/m/d"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: inc/cleantalk-comments.php:
|
668 |
msgid "Approve"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: inc/cleantalk-comments.php:
|
672 |
msgid "Delete"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: inc/cleantalk-comments.php:
|
676 |
msgid "View Post"
|
677 |
msgstr ""
|
678 |
|
679 |
-
#: inc/cleantalk-comments.php:
|
680 |
msgid "Delete all comments from the list"
|
681 |
msgstr ""
|
682 |
|
683 |
-
#: inc/cleantalk-comments.php:
|
684 |
msgid "Delete selected"
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: inc/cleantalk-comments.php:
|
688 |
-
msgid ""
|
689 |
-
"There is some differencies between blacklists database and our API "
|
690 |
-
"mechanisms. Blacklists shows all history of spam activity, but our API (that "
|
691 |
-
"used in spam checking) used another parameters, too: last day of activity, "
|
692 |
-
"number of spam attacks during last days etc. This mechanisms help us to "
|
693 |
-
"reduce number of false positivitie. So, there is nothing strange, if some "
|
694 |
-
"emails/IPs will be not found by this checking."
|
695 |
-
msgstr ""
|
696 |
-
|
697 |
-
#: inc/cleantalk-comments.php:225
|
698 |
-
msgid ""
|
699 |
-
"Please wait! CleanTalk is checking all approved and pending comments via "
|
700 |
-
"blacklist database at cleantalk.org. You will have option to delete found "
|
701 |
-
"spam comments after plugin finish."
|
702 |
-
msgstr ""
|
703 |
-
|
704 |
-
#: inc/cleantalk-comments.php:228
|
705 |
-
msgid ""
|
706 |
-
"Please wait for a while. CleanTalk is deleting spam comments. Comments left: "
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: inc/cleantalk-comments.php:
|
710 |
msgid ""
|
711 |
"The plugin will check all comments against blacklists database and show you "
|
712 |
"senders that have spam activity on other websites."
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: inc/cleantalk-comments.php:
|
716 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: inc/cleantalk-comments.php:
|
720 |
#, php-format
|
721 |
-
msgid "
|
|
|
|
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: inc/cleantalk-comments.php:
|
725 |
msgid "Please do backup of WordPress database before delete any comments!"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: inc/cleantalk-public.php:
|
729 |
-
#: inc/cleantalk-public.php:
|
730 |
-
#: inc/cleantalk-public.php:
|
731 |
msgid "Spam protection by CleanTalk"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: inc/cleantalk-public.php:
|
735 |
-
#: inc/cleantalk-public.php:
|
736 |
msgid "Spam protection"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: inc/cleantalk-public.php:
|
740 |
#, php-format
|
741 |
msgid "Registration is approved by %s."
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: inc/cleantalk-public.php:
|
745 |
msgid "Comment approved. Anti-spam by CleanTalk."
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: inc/cleantalk-public.php:
|
749 |
msgid "Attention, please!"
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: inc/cleantalk-public.php:
|
753 |
#, php-format
|
754 |
msgid "\"%s\" plugin error on your site %s:"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: inc/cleantalk-public.php:
|
758 |
#, php-format
|
759 |
msgid "[%s] %s error!"
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: inc/cleantalk-
|
763 |
-
msgid ""
|
764 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: inc/cleantalk-
|
|
|
|
|
|
|
|
|
768 |
msgid "Please wait for a while. CleanTalk is deleting spam users. Users left: "
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: inc/cleantalk-users.php:
|
772 |
msgid ""
|
773 |
"Please wait for a while. CleanTalk is checking all users via blacklist "
|
774 |
"database at cleantalk.org. You will have option to delete found spam users "
|
775 |
"after plugin finish."
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: inc/cleantalk-users.php:
|
779 |
msgid "Username"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: inc/cleantalk-users.php:
|
783 |
msgid "Name"
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: inc/cleantalk-users.php:
|
|
|
|
|
|
|
|
|
787 |
msgid "Role"
|
788 |
msgstr ""
|
789 |
|
790 |
-
#: inc/cleantalk-users.php:
|
791 |
msgid "Posts"
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: inc/cleantalk-users.php:
|
795 |
msgid "Delete all users from list"
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: inc/cleantalk-users.php:
|
799 |
msgid "Download results in CSV"
|
800 |
msgstr ""
|
801 |
|
802 |
-
#: inc/cleantalk-users.php:
|
803 |
msgid "Insert accounts"
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: inc/cleantalk-users.php:
|
807 |
msgid ""
|
808 |
"The plugin will check all users against blacklists database and show you "
|
809 |
"senders that have spam activity on other websites. Just click 'Find spam "
|
810 |
"users' to start."
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: inc/cleantalk-users.php:
|
814 |
msgid "Stop deletion"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: inc/cleantalk-users.php:
|
818 |
#, php-format
|
819 |
msgid ""
|
820 |
"Total users %s, checked %s, found %s spam users and %s bad users (without IP "
|
821 |
"or email)"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: inc/cleantalk-users.php:
|
825 |
msgid "Please do backup of WordPress database before delete any accounts!"
|
826 |
msgstr ""
|
827 |
|
3 |
msgstr ""
|
4 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
"Project-Id-Version: Anti-Spam by CleanTalk\n"
|
6 |
+
"POT-Creation-Date: 2017-05-31 17:48+0500\n"
|
7 |
+
"PO-Revision-Date: 2017-05-31 17:47+0500\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
|
23 |
+
#: cleantalk.php:618
|
24 |
msgid "WordPress spam"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: cleantalk.php:618
|
28 |
msgid "blocked by"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: cleantalk.php:776
|
32 |
#, php-format
|
33 |
msgid "%d spam attacks have been blocked"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: cleantalk.php:789
|
37 |
msgid "Complete setup"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: cleantalk.php:790 inc/cleantalk-admin.php:1704
|
41 |
msgid ""
|
42 |
"To see the anti-spam log and complete the setup, please get the Access key."
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: cleantalk.php:795
|
46 |
#, php-format
|
47 |
msgid "%s spam attacks report"
|
48 |
msgstr ""
|
51 |
msgid "CleanTalk Anti-Spam Statistics"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: inc/cleantalk-admin.php:22
|
55 |
#, php-format
|
56 |
+
msgid "%sRefresh%s"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: inc/cleantalk-admin.php:23
|
60 |
#, php-format
|
61 |
+
msgid "%sConfigure%s"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: inc/cleantalk-admin.php:73
|
65 |
msgid "7 days anti-spam stats"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: inc/cleantalk-admin.php:82
|
69 |
msgid "Top 5 spam IPs blocked"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: inc/cleantalk-admin.php:90
|
73 |
msgid "IP"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: inc/cleantalk-admin.php:91
|
77 |
msgid "Country"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: inc/cleantalk-admin.php:92
|
81 |
msgid "Block Count"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: inc/cleantalk-admin.php:129
|
85 |
msgid "Get Access key to activate Anti-Spam protection!"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: inc/cleantalk-admin.php:137
|
89 |
msgid "Something went wrong! Server response is: \""
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: inc/cleantalk-admin.php:141
|
93 |
msgid "Please, visit your dashboard."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: inc/cleantalk-admin.php:166
|
97 |
#, php-format
|
98 |
msgid ""
|
99 |
"has blocked %s spam. The statistics is automatically updated every 24 hours."
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: inc/cleantalk-admin.php:237
|
103 |
msgid "Failed from timeout. Going to check comments again."
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: inc/cleantalk-admin.php:238
|
107 |
+
msgid "Added"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: inc/cleantalk-admin.php:239
|
111 |
+
msgid "comments"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: inc/cleantalk-admin.php:240
|
115 |
msgid "Delete all spam comments?"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: inc/cleantalk-admin.php:241
|
119 |
msgid "Delete checked comments?"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: inc/cleantalk-admin.php:245
|
123 |
msgid "Find spam-comments"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: inc/cleantalk-admin.php:246
|
127 |
msgid "Show spam-comments"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: inc/cleantalk-admin.php:247
|
131 |
+
msgid "The sender has been whitelisted."
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: inc/cleantalk-admin.php:248
|
135 |
+
msgid "The sender has been blacklisted."
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: inc/cleantalk-admin.php:249 inc/cleantalk-public.php:2845
|
139 |
+
#, php-format
|
140 |
+
msgid "Feedback has been sent to %sCleanTalk Dashboard%s."
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: inc/cleantalk-admin.php:270
|
144 |
msgid "Failed from timeout. Going to check users again."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: inc/cleantalk-admin.php:271
|
148 |
msgid "Failed from timeout. Going to run a new attempt to delete spam users."
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: inc/cleantalk-admin.php:272
|
152 |
msgid "Inserted"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: inc/cleantalk-admin.php:273
|
156 |
msgid "users."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: inc/cleantalk-admin.php:274
|
160 |
msgid "Delete all spam users?"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: inc/cleantalk-admin.php:275
|
164 |
msgid "Delete checked users?"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: inc/cleantalk-admin.php:277
|
168 |
msgid ""
|
169 |
"File doesn't exist. File will be generated while checking. Please, press "
|
170 |
"\"Check for spam\"."
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: inc/cleantalk-admin.php:280
|
174 |
msgid "Find spam-users"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: inc/cleantalk-admin.php:281
|
178 |
msgid "Show spam-users"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: inc/cleantalk-admin.php:295 inc/cleantalk-admin.php:297
|
182 |
msgid "CleanTalk settings"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: inc/cleantalk-admin.php:416
|
186 |
#, php-format
|
187 |
msgid "Unable to connect to %s."
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: inc/cleantalk-admin.php:517
|
191 |
msgid "Protection is active"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: inc/cleantalk-admin.php:519
|
195 |
msgid "Advanced settings"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: inc/cleantalk-admin.php:523
|
199 |
msgid "Access key"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: inc/cleantalk-admin.php:532 inc/cleantalk-admin.php:900
|
203 |
msgid "Registration forms"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: inc/cleantalk-admin.php:533
|
207 |
msgid "Comments form"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: inc/cleantalk-admin.php:534 inc/cleantalk-admin.php:902
|
211 |
msgid "Contact forms"
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: inc/cleantalk-admin.php:535 inc/cleantalk-admin.php:903
|
215 |
msgid "Custom contact forms"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: inc/cleantalk-admin.php:536 inc/cleantalk-admin.php:907
|
219 |
msgid "WooCommerce checkout form"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: inc/cleantalk-admin.php:537
|
223 |
msgid "Protect external forms"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: inc/cleantalk-admin.php:538
|
227 |
msgid "Protect internal forms"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: inc/cleantalk-admin.php:542
|
231 |
msgid "buddyPress private messages"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: inc/cleantalk-admin.php:543
|
235 |
msgid "Don't check trusted user's comments"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: inc/cleantalk-admin.php:544
|
239 |
msgid "Automatically delete spam comments"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: inc/cleantalk-admin.php:545
|
243 |
msgid "Remove links from approved comments"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: inc/cleantalk-admin.php:546
|
247 |
+
msgid "Show links to check Emails, IPs for spam."
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: inc/cleantalk-admin.php:550
|
251 |
msgid "Protect logged in Users"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: inc/cleantalk-admin.php:551
|
255 |
msgid "Use AJAX for JavaScript check"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: inc/cleantalk-admin.php:552
|
259 |
msgid "Check all post data"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: inc/cleantalk-admin.php:553
|
263 |
msgid "Set cookies"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: inc/cleantalk-admin.php:554
|
267 |
msgid "Use SSL"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: inc/cleantalk-admin.php:558
|
271 |
msgid "Show statistics in admin bar"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: inc/cleantalk-admin.php:559
|
275 |
msgid "Show All-time counter"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: inc/cleantalk-admin.php:560
|
279 |
msgid "Show 24 hours counter"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: inc/cleantalk-admin.php:561
|
283 |
msgid "SpamFireWall counter"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: inc/cleantalk-admin.php:564 inc/cleantalk-admin.php:1300
|
287 |
msgid "Collect details about browsers"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: inc/cleantalk-admin.php:565 inc/cleantalk-admin.php:1464
|
291 |
msgid "Tell others about CleanTalk"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: inc/cleantalk-admin.php:566 inc/cleantalk-admin.php:904
|
295 |
+
#: inc/cleantalk-admin.php:1490
|
296 |
msgid "SpamFireWall"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: inc/cleantalk-admin.php:643 inc/cleantalk-admin.php:658
|
300 |
+
#: inc/cleantalk-admin.php:673 inc/cleantalk-admin.php:1030
|
301 |
+
#: inc/cleantalk-admin.php:1063 inc/cleantalk-admin.php:1079
|
302 |
+
#: inc/cleantalk-admin.php:1095 inc/cleantalk-admin.php:1111
|
303 |
+
#: inc/cleantalk-admin.php:1127 inc/cleantalk-admin.php:1143
|
304 |
+
#: inc/cleantalk-admin.php:1159 inc/cleantalk-admin.php:1178
|
305 |
+
#: inc/cleantalk-admin.php:1203 inc/cleantalk-admin.php:1228
|
306 |
+
#: inc/cleantalk-admin.php:1248 inc/cleantalk-admin.php:1278
|
307 |
+
#: inc/cleantalk-admin.php:1335 inc/cleantalk-admin.php:1355
|
308 |
+
#: inc/cleantalk-admin.php:1375 inc/cleantalk-admin.php:1395
|
309 |
+
#: inc/cleantalk-admin.php:1415 inc/cleantalk-admin.php:1436
|
310 |
msgid "Yes"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: inc/cleantalk-admin.php:645 inc/cleantalk-admin.php:660
|
314 |
+
#: inc/cleantalk-admin.php:675 inc/cleantalk-admin.php:1032
|
315 |
+
#: inc/cleantalk-admin.php:1065 inc/cleantalk-admin.php:1081
|
316 |
+
#: inc/cleantalk-admin.php:1097 inc/cleantalk-admin.php:1113
|
317 |
+
#: inc/cleantalk-admin.php:1129 inc/cleantalk-admin.php:1145
|
318 |
+
#: inc/cleantalk-admin.php:1161 inc/cleantalk-admin.php:1180
|
319 |
+
#: inc/cleantalk-admin.php:1205 inc/cleantalk-admin.php:1230
|
320 |
+
#: inc/cleantalk-admin.php:1250 inc/cleantalk-admin.php:1280
|
321 |
+
#: inc/cleantalk-admin.php:1337 inc/cleantalk-admin.php:1357
|
322 |
+
#: inc/cleantalk-admin.php:1377 inc/cleantalk-admin.php:1397
|
323 |
+
#: inc/cleantalk-admin.php:1417 inc/cleantalk-admin.php:1438
|
324 |
msgid "No"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: inc/cleantalk-admin.php:646 inc/cleantalk-admin.php:676
|
328 |
msgid ""
|
329 |
"Display all-time requests counter in the admin bar. Counter displays number "
|
330 |
"of requests since plugin installation."
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: inc/cleantalk-admin.php:661
|
334 |
msgid ""
|
335 |
"Display daily requests counter in the admin bar. Counter displays number of "
|
336 |
"requests of the past 24 hours."
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: inc/cleantalk-admin.php:727
|
340 |
msgid "Since"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: inc/cleantalk-admin.php:733
|
344 |
msgid ""
|
345 |
"All / Allowed / Blocked submissions. The number of submissions is being "
|
346 |
"counted since CleanTalk plugin installation."
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: inc/cleantalk-admin.php:733
|
350 |
msgid "All"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: inc/cleantalk-admin.php:741
|
354 |
msgid ""
|
355 |
"Allowed / Blocked submissions. The number of submissions for past 24 hours. "
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: inc/cleantalk-admin.php:741
|
359 |
msgid "Day"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: inc/cleantalk-admin.php:747
|
363 |
msgid ""
|
364 |
"All / Blocked events. Access attempts regitred by SpamFireWall counted since "
|
365 |
"the last plugin activation."
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: inc/cleantalk-admin.php:752
|
369 |
msgid ""
|
370 |
"Allowed / Blocked submissions. The number of submissions is being counted "
|
371 |
"since "
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: inc/cleantalk-admin.php:759
|
375 |
msgid "dashboard"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: inc/cleantalk-admin.php:768 inc/cleantalk-admin.php:774
|
379 |
+
#: inc/cleantalk-admin.php:1907 inc/cleantalk-admin.php:1908
|
380 |
msgid "Settings"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: inc/cleantalk-admin.php:783 inc/cleantalk-admin.php:961
|
384 |
+
#: inc/cleantalk-admin.php:1936
|
385 |
msgid "Support"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: inc/cleantalk-admin.php:792
|
389 |
msgid "Bulk spam comments removal tool."
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: inc/cleantalk-admin.php:792 inc/cleantalk-admin.php:999
|
393 |
msgid "Check comments for spam"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: inc/cleantalk-admin.php:802 inc/cleantalk-admin.php:1000
|
397 |
msgid "Check users for spam"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: inc/cleantalk-admin.php:811
|
401 |
msgid "Reset counter"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: inc/cleantalk-admin.php:901
|
405 |
msgid "Comments forms"
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: inc/cleantalk-admin.php:950
|
409 |
#, php-format
|
410 |
msgid "has blocked <b>%s</b> spam."
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: inc/cleantalk-admin.php:959
|
414 |
msgid "Click here to get anti-spam statistics"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: inc/cleantalk-admin.php:969
|
418 |
msgid "Enter the key"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: inc/cleantalk-admin.php:983
|
422 |
msgid "Get access key manually"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: inc/cleantalk-admin.php:984
|
426 |
msgid "or"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: inc/cleantalk-admin.php:985
|
430 |
msgid "Get access key automatically"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: inc/cleantalk-admin.php:990
|
434 |
#, php-format
|
435 |
msgid "Admin e-mail (%s) will be used for registration"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: inc/cleantalk-admin.php:991
|
439 |
msgid "License agreement"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: inc/cleantalk-admin.php:996
|
443 |
msgid "Show the access key"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: inc/cleantalk-admin.php:1013
|
447 |
#, php-format
|
448 |
msgid ""
|
449 |
"Testing is failed, please, check the settings! Tech support "
|
450 |
"%ssupport@cleantalk.org%s"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: inc/cleantalk-admin.php:1033
|
454 |
msgid "WordPress, JetPack, WooCommerce."
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: inc/cleantalk-admin.php:1038
|
458 |
msgid "Forms to protect"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: inc/cleantalk-admin.php:1042
|
462 |
msgid "Comments and messages"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: inc/cleantalk-admin.php:1046
|
466 |
msgid "Data processing"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: inc/cleantalk-admin.php:1050
|
470 |
msgid "Admin bar"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: inc/cleantalk-admin.php:1066
|
474 |
msgid "Remove links from approved comments. Replace it with \"[Link deleted]\""
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: inc/cleantalk-admin.php:1082
|
478 |
+
msgid ""
|
479 |
+
"Shows little icon near IP addresses and Emails allowing you to check it via "
|
480 |
+
"CleanTalk's database. Also allowing you to manage comments from the public "
|
481 |
+
"post's page."
|
482 |
+
msgstr ""
|
483 |
+
|
484 |
+
#: inc/cleantalk-admin.php:1098
|
485 |
msgid "WordPress, BuddyPress, bbPress, S2Member, WooCommerce."
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: inc/cleantalk-admin.php:1114
|
489 |
msgid ""
|
490 |
"Contact Form 7, Formidable forms, JetPack, Fast Secure Contact Form, "
|
491 |
"WordPress Landing Pages, Gravity Forms."
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: inc/cleantalk-admin.php:1130
|
495 |
msgid "Anti spam test for any WordPress themes or contacts forms."
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: inc/cleantalk-admin.php:1146
|
499 |
msgid "Anti spam test for WooCommerce checkout form."
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: inc/cleantalk-admin.php:1162
|
503 |
msgid "Check buddyPress private messages."
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: inc/cleantalk-admin.php:1181
|
507 |
#, php-format
|
508 |
msgid "Delete spam comments older than %d days."
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: inc/cleantalk-admin.php:1206
|
512 |
msgid ""
|
513 |
"Show/hide CleanTalk icon in top level menu in WordPress backend. The number "
|
514 |
"of submissions is being counted for past 24 hours."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: inc/cleantalk-admin.php:1231
|
518 |
msgid ""
|
519 |
"Check all POST submissions from website visitors. Enable this option if you "
|
520 |
"have spam misses on website or you don`t have records about missed spam here:"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: inc/cleantalk-admin.php:1231
|
524 |
msgid "CleanTalk dashboard"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: inc/cleantalk-admin.php:1231
|
528 |
msgid "СAUTION! Option can catch POST requests in WordPress backend"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: inc/cleantalk-admin.php:1251
|
532 |
msgid ""
|
533 |
"Options helps protect WordPress against spam with any caching plugins. Turn "
|
534 |
"this option on to avoid issues with caching plugins."
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: inc/cleantalk-admin.php:1251
|
538 |
msgid "Attention! Incompatible with AMP plugins!"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: inc/cleantalk-admin.php:1281
|
542 |
msgid "Dont't check comments for users with above"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: inc/cleantalk-admin.php:1281
|
546 |
msgid "comments."
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: inc/cleantalk-admin.php:1301
|
550 |
msgid ""
|
551 |
"Checking this box you allow plugin store information about screen size and "
|
552 |
"browser plugins of website visitors. The option in a beta state."
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: inc/cleantalk-admin.php:1358
|
556 |
msgid ""
|
557 |
"Turn this option on to protect forms on your WordPress that send data to "
|
558 |
"third-part servers (like MailChimp)."
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: inc/cleantalk-admin.php:1378
|
562 |
msgid ""
|
563 |
"This option will enable protection for custom (hand-made) AJAX forms with "
|
564 |
"PHP scripts handlers on your WordPress."
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: inc/cleantalk-admin.php:1398
|
568 |
msgid ""
|
569 |
"Turn this option off to deny plugin generates any cookies on website front-"
|
570 |
"end. This option is helpful if you use Varnish. But most of contact forms "
|
571 |
"will not be protected by CleanTalk if the option is turned off!"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: inc/cleantalk-admin.php:1418
|
575 |
msgid ""
|
576 |
"Turn this option on to use encrypted (SSL) connection with CleanTalk servers."
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: inc/cleantalk-admin.php:1439
|
580 |
msgid ""
|
581 |
"Turn this option on to check for spam any submissions (comments, contact "
|
582 |
"forms and etc.) from registered Users."
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: inc/cleantalk-admin.php:1465
|
586 |
msgid ""
|
587 |
"Checking this box places a small link under the comment form that lets "
|
588 |
"others know what anti-spam tool protects your site."
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: inc/cleantalk-admin.php:1491
|
592 |
msgid ""
|
593 |
"This option allows to filter spam bots before they access website. Also "
|
594 |
"reduces CPU usage on hosting server and accelerates pages load time."
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: inc/cleantalk-admin.php:1493
|
598 |
msgid "Learn more"
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: inc/cleantalk-admin.php:1609
|
602 |
msgid "Save Changes"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: inc/cleantalk-admin.php:1649
|
606 |
msgid "CleanTalk's tech support:"
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: inc/cleantalk-admin.php:1655
|
610 |
msgid "Plugin Homepage at"
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: inc/cleantalk-admin.php:1656
|
614 |
msgid "Use s@cleantalk.org to test plugin in any WordPress form."
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: inc/cleantalk-admin.php:1657
|
618 |
msgid "CleanTalk is registered Trademark. All rights reserved."
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: inc/cleantalk-admin.php:1712
|
622 |
#, php-format
|
623 |
msgid "Unable to get Access key automatically: %s"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: inc/cleantalk-admin.php:1713
|
627 |
msgid "Get the Access key"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: inc/cleantalk-admin.php:1724
|
631 |
#, php-format
|
632 |
msgid "Please enter Access Key in %s settings to enable anti spam protection!"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: inc/cleantalk-admin.php:1733
|
636 |
#, php-format
|
637 |
msgid "%s trial period ends, please upgrade to %s!"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: inc/cleantalk-admin.php:1744
|
641 |
msgid "RENEW ANTI-SPAM"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: inc/cleantalk-admin.php:1745
|
645 |
msgid "next year"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: inc/cleantalk-admin.php:1749
|
649 |
#, php-format
|
650 |
msgid "Please renew your anti-spam license for %s."
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: inc/cleantalk-admin.php:1932
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
654 |
msgid "Translate"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: inc/cleantalk-admin.php:1935
|
658 |
msgid "FAQ"
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: inc/cleantalk-comments.php:14 inc/cleantalk-comments.php:222
|
662 |
+
#: inc/cleantalk-users.php:14 inc/cleantalk-users.php:220
|
663 |
msgid "Check for spam"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: inc/cleantalk-comments.php:39 inc/cleantalk-users.php:37
|
667 |
+
msgid ""
|
668 |
+
"Ajax error. Process will be automatically restarted in 3 seconds. Status: "
|
669 |
+
msgstr ""
|
670 |
+
|
671 |
+
#: inc/cleantalk-comments.php:46
|
672 |
+
msgid ""
|
673 |
+
"Please wait for a while. CleanTalk is deleting spam comments. Comments left: "
|
674 |
+
msgstr ""
|
675 |
+
|
676 |
+
#: inc/cleantalk-comments.php:62
|
677 |
+
msgid ""
|
678 |
+
"Please wait! CleanTalk is checking all approved and pending comments via "
|
679 |
+
"blacklist database at cleantalk.org. You will have option to delete found "
|
680 |
+
"spam comments after plugin finish."
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: inc/cleantalk-comments.php:107
|
684 |
msgid "Author"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: inc/cleantalk-comments.php:108
|
688 |
msgid "Comment"
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: inc/cleantalk-comments.php:109
|
692 |
msgid "In Response To"
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: inc/cleantalk-comments.php:155
|
696 |
#, php-format
|
697 |
msgid "Submitted on <a href=\"%1$s\">%2$s at %3$s</a>"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: inc/cleantalk-comments.php:157
|
701 |
msgid "Y/m/d"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: inc/cleantalk-comments.php:167 inc/cleantalk-users.php:163
|
705 |
msgid "Approve"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: inc/cleantalk-comments.php:169 inc/cleantalk-users.php:165
|
709 |
msgid "Delete"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: inc/cleantalk-comments.php:184
|
713 |
msgid "View Post"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: inc/cleantalk-comments.php:211
|
717 |
msgid "Delete all comments from the list"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: inc/cleantalk-comments.php:212 inc/cleantalk-users.php:208
|
721 |
msgid "Delete selected"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: inc/cleantalk-comments.php:216
|
725 |
+
msgid "Insert comments"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: inc/cleantalk-comments.php:226
|
729 |
msgid ""
|
730 |
"The plugin will check all comments against blacklists database and show you "
|
731 |
"senders that have spam activity on other websites."
|
732 |
msgstr ""
|
733 |
|
734 |
+
#: inc/cleantalk-comments.php:235 inc/cleantalk-users.php:233
|
735 |
+
msgid ""
|
736 |
+
"There is some differencies between blacklists database and our API "
|
737 |
+
"mechanisms. Blacklists shows all history of spam activity, but our API (that "
|
738 |
+
"used in spam checking) used another parameters, too: last day of activity, "
|
739 |
+
"number of spam attacks during last days etc. This mechanisms help us to "
|
740 |
+
"reduce number of false positivitie. So, there is nothing strange, if some "
|
741 |
+
"emails/IPs will be not found by this checking."
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: inc/cleantalk-comments.php:441
|
745 |
#, php-format
|
746 |
+
msgid ""
|
747 |
+
"Total comments %s. Checked %s. Found %s spam comments. %d bad comments "
|
748 |
+
"(without IP or email)."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: inc/cleantalk-comments.php:445
|
752 |
msgid "Please do backup of WordPress database before delete any comments!"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: inc/cleantalk-public.php:407 inc/cleantalk-public.php:499
|
756 |
+
#: inc/cleantalk-public.php:560 inc/cleantalk-public.php:2306
|
757 |
+
#: inc/cleantalk-public.php:2609
|
758 |
msgid "Spam protection by CleanTalk"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: inc/cleantalk-public.php:1136 inc/cleantalk-public.php:1176
|
762 |
+
#: inc/cleantalk-public.php:1194
|
763 |
msgid "Spam protection"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: inc/cleantalk-public.php:1398
|
767 |
#, php-format
|
768 |
msgid "Registration is approved by %s."
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: inc/cleantalk-public.php:2141
|
772 |
msgid "Comment approved. Anti-spam by CleanTalk."
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: inc/cleantalk-public.php:2790
|
776 |
msgid "Attention, please!"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: inc/cleantalk-public.php:2791
|
780 |
#, php-format
|
781 |
msgid "\"%s\" plugin error on your site %s:"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: inc/cleantalk-public.php:2793
|
785 |
#, php-format
|
786 |
msgid "[%s] %s error!"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: inc/cleantalk-public.php:2846
|
790 |
+
msgid "Error occured while sending feedback."
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: inc/cleantalk-public.php:2847
|
794 |
+
msgid "Feedback wasn't sent. There is no associated request."
|
795 |
+
msgstr ""
|
796 |
+
|
797 |
+
#: inc/cleantalk-public.php:2885
|
798 |
+
msgid "Sender info"
|
799 |
+
msgstr ""
|
800 |
+
|
801 |
+
#: inc/cleantalk-public.php:2888
|
802 |
+
msgid "by"
|
803 |
+
msgstr ""
|
804 |
+
|
805 |
+
#: inc/cleantalk-public.php:2898
|
806 |
+
msgid "No email"
|
807 |
+
msgstr ""
|
808 |
+
|
809 |
+
#: inc/cleantalk-public.php:2907
|
810 |
+
msgid "No IP"
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#: inc/cleantalk-public.php:2909
|
814 |
+
msgid "Mark as spam"
|
815 |
+
msgstr ""
|
816 |
+
|
817 |
+
#: inc/cleantalk-public.php:2910
|
818 |
+
msgid "Unspam"
|
819 |
+
msgstr ""
|
820 |
+
|
821 |
+
#: inc/cleantalk-public.php:2912
|
822 |
+
msgid "Marked as spam."
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: inc/cleantalk-public.php:2913
|
826 |
+
msgid "Marked as not spam."
|
827 |
+
msgstr ""
|
828 |
+
|
829 |
+
#: inc/cleantalk-users.php:44
|
830 |
msgid "Please wait for a while. CleanTalk is deleting spam users. Users left: "
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: inc/cleantalk-users.php:60
|
834 |
msgid ""
|
835 |
"Please wait for a while. CleanTalk is checking all users via blacklist "
|
836 |
"database at cleantalk.org. You will have option to delete found spam users "
|
837 |
"after plugin finish."
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: inc/cleantalk-users.php:104
|
841 |
msgid "Username"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: inc/cleantalk-users.php:105
|
845 |
msgid "Name"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: inc/cleantalk-users.php:106
|
849 |
+
msgid "E-mail"
|
850 |
+
msgstr ""
|
851 |
+
|
852 |
+
#: inc/cleantalk-users.php:107
|
853 |
msgid "Role"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: inc/cleantalk-users.php:108
|
857 |
msgid "Posts"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: inc/cleantalk-users.php:207
|
861 |
msgid "Delete all users from list"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: inc/cleantalk-users.php:209
|
865 |
msgid "Download results in CSV"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: inc/cleantalk-users.php:213
|
869 |
msgid "Insert accounts"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: inc/cleantalk-users.php:224
|
873 |
msgid ""
|
874 |
"The plugin will check all users against blacklists database and show you "
|
875 |
"senders that have spam activity on other websites. Just click 'Find spam "
|
876 |
"users' to start."
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: inc/cleantalk-users.php:237
|
880 |
msgid "Stop deletion"
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: inc/cleantalk-users.php:431
|
884 |
#, php-format
|
885 |
msgid ""
|
886 |
"Total users %s, checked %s, found %s spam users and %s bad users (without IP "
|
887 |
"or email)"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: inc/cleantalk-users.php:434
|
891 |
msgid "Please do backup of WordPress database before delete any accounts!"
|
892 |
msgstr ""
|
893 |
|
inc/cleantalk-admin.php
CHANGED
@@ -196,14 +196,9 @@ add_action( 'wp_ajax_ajax_get_timezone', 'ct_ajax_get_timezone' );
|
|
196 |
* @param string $hook URL of hooked page
|
197 |
*/
|
198 |
function ct_enqueue_scripts($hook) {
|
199 |
-
global $cleantalk_plugin_version;
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
//wp_enqueue_script('ct_reload_script', plugins_url('/cleantalk-rel.js', __FILE__), array(), $cleantalk_plugin_version);
|
204 |
-
}
|
205 |
-
//*/
|
206 |
-
|
207 |
// Scripts to all admin pages
|
208 |
wp_enqueue_script('ct_admin_js_notices', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-admin.js'), array(), $cleantalk_plugin_version);
|
209 |
wp_enqueue_style ('ct_admin_css', plugins_url('/cleantalk-spam-protect/assets/css/cleantalk-admin.css'), array(), $cleantalk_plugin_version, 'all');
|
@@ -228,47 +223,64 @@ function ct_enqueue_scripts($hook) {
|
|
228 |
// Scripts for comments check
|
229 |
if( $hook == 'comments_page_ct_check_spam' || $hook == 'edit-comments.php'){
|
230 |
|
|
|
|
|
231 |
$ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
|
|
|
|
|
232 |
|
233 |
-
wp_enqueue_script('ct_comments_checkspam', plugins_url('/cleantalk-spam-protect/
|
234 |
-
wp_enqueue_script('ct_comments_editscreen', plugins_url('/cleantalk-spam-protect/
|
235 |
|
236 |
wp_localize_script( 'jquery', 'ctCommentsCheck', array(
|
237 |
'ct_ajax_nonce' => $ajax_nonce,
|
238 |
-
'ct_timeout_confirm'
|
239 |
-
'ct_comments_added'
|
240 |
-
'
|
|
|
241 |
'ct_confirm_deletion_checked' => __('Delete checked comments?', 'cleantalk')
|
242 |
));
|
243 |
wp_localize_script( 'jquery', 'ctCommentsScreen', array(
|
244 |
-
'
|
245 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
));
|
247 |
}
|
248 |
|
249 |
// Scripts for users check
|
250 |
if( $hook == 'users_page_ct_check_users' || $hook == 'users.php'){
|
251 |
|
|
|
|
|
252 |
$current_user = wp_get_current_user();
|
253 |
$ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
|
254 |
-
|
255 |
-
|
256 |
-
wp_enqueue_script('
|
|
|
257 |
|
258 |
wp_localize_script( 'jquery', 'ctUsersCheck', array(
|
259 |
-
'ct_ajax_nonce'
|
260 |
-
'ct_timeout'
|
261 |
-
'ct_timeout_delete'
|
262 |
-
'ct_inserted'
|
263 |
-
'ct_iusers'
|
264 |
-
'ct_confirm_deletion_all'
|
265 |
'ct_confirm_deletion_checked' => __('Delete checked users?', 'cleantalk'),
|
266 |
-
'ct_csv_filename'
|
267 |
-
'ct_bad_csv'
|
268 |
));
|
269 |
wp_localize_script( 'jquery', 'ctUsersScreen', array(
|
270 |
-
'spambutton_users_text'
|
271 |
-
'spambutton_users_text_show'
|
|
|
|
|
272 |
));
|
273 |
}
|
274 |
}
|
@@ -289,34 +301,53 @@ function ct_admin_add_page() {
|
|
289 |
/**
|
290 |
* Admin action 'admin_init' - Add the admin settings and such
|
291 |
*/
|
292 |
-
function ct_admin_init()
|
293 |
-
|
294 |
global $ct_server_timeout, $show_ct_notice_autokey, $ct_notice_autokey_label, $ct_notice_autokey_value, $show_ct_notice_renew, $ct_notice_renew_label, $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $renew_notice_showtime, $trial_notice_showtime, $ct_plugin_name, $ct_options, $ct_data, $trial_notice_check_timeout, $account_notice_check_timeout, $ct_user_token_label, $cleantalk_plugin_version, $notice_check_timeout, $renew_notice_check_timeout, $ct_agent_version;
|
295 |
|
296 |
$ct_options = ct_get_options();
|
297 |
$ct_data = ct_get_data();
|
298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
if(isset($_GET['from_report']) && $_GET['from_report']){
|
300 |
$ct_data['ct_show_notice_from_report'] = true;
|
301 |
update_option('cleantalk_data', $ct_data);
|
302 |
}
|
303 |
|
|
|
304 |
if(isset($_POST['ct_debug_reset']) && $_POST['ct_debug_reset']){
|
305 |
$ct_data['ct_debug_reset'] = true;
|
306 |
update_option('cleantalk_data', $ct_data);
|
307 |
}
|
308 |
|
309 |
-
|
310 |
-
if($
|
311 |
-
{
|
312 |
-
$ct_data['current_version']=$cleantalk_plugin_version;
|
313 |
-
update_option('cleantalk_data', $ct_data);
|
314 |
-
ct_send_feedback(
|
315 |
-
'0:' . $ct_agent_version // 0 - request_id, agent version.
|
316 |
-
);
|
317 |
-
}
|
318 |
-
if(isset($_POST['option_page'])&&$_POST['option_page']=='cleantalk_settings'&&isset($_POST['cleantalk_settings']['apikey']))
|
319 |
-
{
|
320 |
$ct_options['apikey']=$_POST['cleantalk_settings']['apikey'];
|
321 |
update_option('cleantalk_settings', $ct_options);
|
322 |
ct_send_feedback(
|
@@ -387,35 +418,35 @@ function ct_admin_init()
|
|
387 |
}
|
388 |
|
389 |
//Account's status check cron job
|
390 |
-
if (time() > $ct_data['next_account_status_check'] || isset($_POST['cleantalk_settings']['apikey']))
|
391 |
-
|
392 |
-
$result = false;
|
393 |
$notice_check_timeout = $account_notice_check_timeout;
|
394 |
-
|
|
|
|
|
395 |
if(!function_exists('noticePaidTill'))
|
396 |
require_once('cleantalk.class.php');
|
397 |
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
$result=noticePaidTill($ct_options['apikey']);
|
402 |
|
403 |
-
if ($result)
|
404 |
-
{
|
405 |
$result = json_decode($result, true);
|
|
|
406 |
if (isset($result['data']) && is_array($result['data']))
|
407 |
$result = $result['data'];
|
408 |
|
409 |
if(isset($result['spam_count']))
|
410 |
$ct_data['admin_blocked']=$result['spam_count'];
|
411 |
|
412 |
-
if (isset($result['show_notice']))
|
413 |
-
|
414 |
if ($result['show_notice'] == 1 && isset($result['trial']) && $result['trial'] == 1){
|
415 |
$notice_check_timeout = $trial_notice_check_timeout;
|
416 |
$show_ct_notice_trial = true;
|
417 |
$ct_data['show_ct_notice_trial']=1;
|
418 |
}
|
|
|
419 |
if ($result['show_notice'] == 1 && isset($result['renew']) && $result['renew'] == 1){
|
420 |
$notice_check_timeout = $renew_notice_check_timeout;
|
421 |
$show_ct_notice_renew = true;
|
@@ -512,6 +543,7 @@ function ct_admin_init()
|
|
512 |
add_settings_field('cleantalk_check_comments_number', __("Don't check trusted user's comments", 'cleantalk'), 'ct_input_check_comments_number', 'cleantalk', 'cleantalk_settings_anti_spam');
|
513 |
add_settings_field('cleantalk_remove_old_spam', __('Automatically delete spam comments', 'cleantalk'), 'ct_input_remove_old_spam', 'cleantalk', 'cleantalk_settings_anti_spam');
|
514 |
add_settings_field('cleantalk_remove_links_from_comments', __('Remove links from approved comments', 'cleantalk'), 'ct_input_remove_links_from_approved_comments', 'cleantalk', 'cleantalk_settings_anti_spam');
|
|
|
515 |
|
516 |
//Data processing
|
517 |
add_settings_field('cleantalk_title_data_processing', "", 'ct_input_data_processing', 'cleantalk', 'cleantalk_settings_anti_spam');//Title settings
|
@@ -1034,6 +1066,22 @@ function ct_input_remove_links_from_approved_comments() {
|
|
1034 |
admin_addDescriptionsFields(__('Remove links from approved comments. Replace it with "[Link deleted]"', 'cleantalk'));
|
1035 |
}
|
1036 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1037 |
/**
|
1038 |
* Admin callback function - Displays inputs of 'comments_test' plugin parameter
|
1039 |
*/
|
@@ -1625,12 +1673,11 @@ function cleantalk_admin_notice_message(){
|
|
1625 |
$page = get_current_screen();
|
1626 |
$activation_timestapm = get_option('cleantalk_activation_timestamp', false);
|
1627 |
|
1628 |
-
if(!isset($ct_data['moderate_ip']))
|
1629 |
-
$ct_data['moderate_ip'] = 0;
|
1630 |
|
1631 |
//General notice control flags
|
1632 |
-
$
|
1633 |
-
$
|
|
|
1634 |
$value = 1; //(current_user_can('activate_plugins') ? 1 : 0); //inactive
|
1635 |
$show_notice = true;
|
1636 |
|
@@ -1741,66 +1788,86 @@ function ct_valid_key($apikey = null) {
|
|
1741 |
return ($apikey === 'enter key' || $apikey === '') ? false : true;
|
1742 |
}
|
1743 |
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
$
|
1751 |
-
$
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
return true;
|
1759 |
-
}
|
1760 |
-
|
1761 |
-
/**
|
1762 |
-
* Admin action 'comment_approved_to_unapproved' - Unapprove comment, sends bad feedback to cleantalk
|
1763 |
-
* @param object $comment_object Comment object
|
1764 |
-
* @return boolean TRUE
|
1765 |
-
*/
|
1766 |
-
function ct_comment_unapproved($comment_object) {
|
1767 |
-
$comment = get_comment($comment_object->comment_ID, 'ARRAY_A');
|
1768 |
-
$hash = get_comment_meta($comment_object->comment_ID, 'ct_hash', true);
|
1769 |
-
ct_feedback($hash, $comment['comment_content'], 0);
|
1770 |
-
$comment['comment_approved'] = 0;
|
1771 |
-
wp_update_comment($comment);
|
1772 |
-
|
1773 |
-
return true;
|
1774 |
-
}
|
1775 |
-
|
1776 |
-
/**
|
1777 |
-
* Admin actions 'comment_unapproved_to_spam', 'comment_approved_to_spam' - Mark comment as spam, sends bad feedback to cleantalk
|
1778 |
-
* @param object $comment_object Comment object
|
1779 |
-
* @return boolean TRUE
|
1780 |
-
*/
|
1781 |
-
function ct_comment_spam($comment_object) {
|
1782 |
-
$comment = get_comment($comment_object->comment_ID, 'ARRAY_A');
|
1783 |
-
$hash = get_comment_meta($comment_object->comment_ID, 'ct_hash', true);
|
1784 |
-
ct_feedback($hash, $comment['comment_content'], 0);
|
1785 |
-
$comment['comment_approved'] = 'spam';
|
1786 |
-
wp_update_comment($comment);
|
1787 |
-
|
1788 |
-
return true;
|
1789 |
-
}
|
1790 |
-
|
1791 |
-
|
1792 |
-
/**
|
1793 |
-
* Unspam comment
|
1794 |
-
* @param type $comment_id
|
1795 |
-
*/
|
1796 |
-
function ct_unspam_comment($comment_id) {
|
1797 |
-
update_comment_meta($comment_id, '_wp_trash_meta_status', 1);
|
1798 |
-
$comment = get_comment($comment_id, 'ARRAY_A');
|
1799 |
$hash = get_comment_meta($comment_id, 'ct_hash', true);
|
1800 |
-
|
1801 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1802 |
|
1803 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1804 |
}
|
1805 |
|
1806 |
/**
|
@@ -1824,7 +1891,8 @@ function ct_get_comment_text($current_text) {
|
|
1824 |
* Send feedback for user deletion
|
1825 |
* @return null
|
1826 |
*/
|
1827 |
-
function ct_delete_user($user_id)
|
|
|
1828 |
$hash = get_user_meta($user_id, 'ct_hash', true);
|
1829 |
if ($hash !== '') {
|
1830 |
ct_feedback($hash, null, 0);
|
196 |
* @param string $hook URL of hooked page
|
197 |
*/
|
198 |
function ct_enqueue_scripts($hook) {
|
|
|
199 |
|
200 |
+
global $cleantalk_plugin_version, $ct_data, $ct_options;
|
201 |
+
|
|
|
|
|
|
|
|
|
202 |
// Scripts to all admin pages
|
203 |
wp_enqueue_script('ct_admin_js_notices', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-admin.js'), array(), $cleantalk_plugin_version);
|
204 |
wp_enqueue_style ('ct_admin_css', plugins_url('/cleantalk-spam-protect/assets/css/cleantalk-admin.css'), array(), $cleantalk_plugin_version, 'all');
|
223 |
// Scripts for comments check
|
224 |
if( $hook == 'comments_page_ct_check_spam' || $hook == 'edit-comments.php'){
|
225 |
|
226 |
+
wp_enqueue_style('cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/assets/css/cleantalk-spam-check.css', array(), $cleantalk_plugin_version, 'all');
|
227 |
+
|
228 |
$ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
|
229 |
+
$user_token = !empty($ct_data['user_token']) ? $ct_data['user_token'] : '';
|
230 |
+
$show_check_links = !empty($ct_options['show_check_links']) ? $ct_options['show_check_links'] : 0;
|
231 |
|
232 |
+
wp_enqueue_script('ct_comments_checkspam', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-comments-checkspam.js'), array(), $cleantalk_plugin_version);
|
233 |
+
wp_enqueue_script('ct_comments_editscreen', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-comments-editscreen.js'), array(), $cleantalk_plugin_version.time());
|
234 |
|
235 |
wp_localize_script( 'jquery', 'ctCommentsCheck', array(
|
236 |
'ct_ajax_nonce' => $ajax_nonce,
|
237 |
+
'ct_timeout_confirm' => __('Failed from timeout. Going to check comments again.', 'cleantalk'),
|
238 |
+
'ct_comments_added' => __('Added', 'cleantalk'),
|
239 |
+
'ct_comments_added_after' => __('comments', 'cleantalk'),
|
240 |
+
'ct_confirm_deletion_all' => __('Delete all spam comments?', 'cleantalk'),
|
241 |
'ct_confirm_deletion_checked' => __('Delete checked comments?', 'cleantalk')
|
242 |
));
|
243 |
wp_localize_script( 'jquery', 'ctCommentsScreen', array(
|
244 |
+
'ct_ajax_nonce' => $ajax_nonce,
|
245 |
+
'spambutton_text' => __("Find spam-comments", 'cleantalk'),
|
246 |
+
'spambutton_text_show' => __("Show spam-comments", 'cleantalk'),
|
247 |
+
'ct_feedback_msg_whitelisted' => __("The sender has been whitelisted.", 'cleantalk'),
|
248 |
+
'ct_feedback_msg_blacklisted' => __("The sender has been blacklisted.", 'cleantalk'),
|
249 |
+
'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk'), $user_token ? "<a target='_blank' href=https://cleantalk.org/my?user_token={$user_token}&cp_mode=antispam>" : '', $user_token ? "</a>" : ''),
|
250 |
+
'ct_show_check_links' => $show_check_links,
|
251 |
+
'ct_img_src_new_tab' => plugin_dir_url(__FILE__)."images/new_window.gif",
|
252 |
+
|
253 |
));
|
254 |
}
|
255 |
|
256 |
// Scripts for users check
|
257 |
if( $hook == 'users_page_ct_check_users' || $hook == 'users.php'){
|
258 |
|
259 |
+
wp_enqueue_style('cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/assets/css/cleantalk-spam-check.css', array(), $cleantalk_plugin_version, 'all');
|
260 |
+
|
261 |
$current_user = wp_get_current_user();
|
262 |
$ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
|
263 |
+
$show_check_links = !empty($ct_options['show_check_links']) ? $ct_options['show_check_links'] : 0;
|
264 |
+
|
265 |
+
wp_enqueue_script('ct_users_checkspam', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-users-checkspam.js'), array(), $cleantalk_plugin_version);
|
266 |
+
wp_enqueue_script('ct_users_editscreen', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-users-editscreen.js'), array(), $cleantalk_plugin_version);
|
267 |
|
268 |
wp_localize_script( 'jquery', 'ctUsersCheck', array(
|
269 |
+
'ct_ajax_nonce' => $ajax_nonce,
|
270 |
+
'ct_timeout' => __('Failed from timeout. Going to check users again.', 'cleantalk'),
|
271 |
+
'ct_timeout_delete' => __('Failed from timeout. Going to run a new attempt to delete spam users.', 'cleantalk'),
|
272 |
+
'ct_inserted' => __('Inserted', 'cleantalk'),
|
273 |
+
'ct_iusers' => __('users.', 'cleantalk'),
|
274 |
+
'ct_confirm_deletion_all' => __('Delete all spam users?', 'cleantalk'),
|
275 |
'ct_confirm_deletion_checked' => __('Delete checked users?', 'cleantalk'),
|
276 |
+
'ct_csv_filename' => "user_check_by_".$current_user->user_login,
|
277 |
+
'ct_bad_csv' => __("File doesn't exist. File will be generated while checking. Please, press \"Check for spam\".")
|
278 |
));
|
279 |
wp_localize_script( 'jquery', 'ctUsersScreen', array(
|
280 |
+
'spambutton_users_text' => __("Find spam-users", 'cleantalk'),
|
281 |
+
'spambutton_users_text_show' => __("Show spam-users", 'cleantalk'),
|
282 |
+
'ct_show_check_links' => $show_check_links,
|
283 |
+
'ct_img_src_new_tab' => plugin_dir_url(__FILE__)."images/new_window.gif"
|
284 |
));
|
285 |
}
|
286 |
}
|
301 |
/**
|
302 |
* Admin action 'admin_init' - Add the admin settings and such
|
303 |
*/
|
304 |
+
function ct_admin_init(){
|
305 |
+
|
306 |
global $ct_server_timeout, $show_ct_notice_autokey, $ct_notice_autokey_label, $ct_notice_autokey_value, $show_ct_notice_renew, $ct_notice_renew_label, $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $renew_notice_showtime, $trial_notice_showtime, $ct_plugin_name, $ct_options, $ct_data, $trial_notice_check_timeout, $account_notice_check_timeout, $ct_user_token_label, $cleantalk_plugin_version, $notice_check_timeout, $renew_notice_check_timeout, $ct_agent_version;
|
307 |
|
308 |
$ct_options = ct_get_options();
|
309 |
$ct_data = ct_get_data();
|
310 |
|
311 |
+
//Update logic
|
312 |
+
$is_installing = get_option('ct_installing');
|
313 |
+
if($is_installing){
|
314 |
+
delete_option('ct_installing');
|
315 |
+
$ct_data['plugin_version'] = $cleantalk_plugin_version;
|
316 |
+
$ct_data['next_account_status_check'] = 0; // Initilazing Notice_paid_till
|
317 |
+
update_option( 'cleantalk_data' , $ct_data);
|
318 |
+
}else{
|
319 |
+
$current_version = (isset($ct_data['plugin_version']) ? $ct_data['plugin_version'] : '5.66');
|
320 |
+
if($current_version != $cleantalk_plugin_version){
|
321 |
+
if(is_main_site()){
|
322 |
+
require_once('cleantalk-updater.php');
|
323 |
+
$result = ct_run_update_actions($current_version, $cleantalk_plugin_version);
|
324 |
+
//If update is successfull
|
325 |
+
if($result === true){
|
326 |
+
ct_send_feedback(
|
327 |
+
'0:' . $ct_agent_version // 0 - request_id, agent version.
|
328 |
+
);
|
329 |
+
$ct_data['plugin_version'] = $cleantalk_plugin_version;
|
330 |
+
update_option( 'cleantalk_data' , $ct_data);
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
// Set notice if came from report
|
338 |
if(isset($_GET['from_report']) && $_GET['from_report']){
|
339 |
$ct_data['ct_show_notice_from_report'] = true;
|
340 |
update_option('cleantalk_data', $ct_data);
|
341 |
}
|
342 |
|
343 |
+
// Drop debug data
|
344 |
if(isset($_POST['ct_debug_reset']) && $_POST['ct_debug_reset']){
|
345 |
$ct_data['ct_debug_reset'] = true;
|
346 |
update_option('cleantalk_data', $ct_data);
|
347 |
}
|
348 |
|
349 |
+
// Feedback when saving settings
|
350 |
+
if(isset($_POST['option_page']) && $_POST['option_page'] == 'cleantalk_settings' && isset($_POST['cleantalk_settings']['apikey'])){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
$ct_options['apikey']=$_POST['cleantalk_settings']['apikey'];
|
352 |
update_option('cleantalk_settings', $ct_options);
|
353 |
ct_send_feedback(
|
418 |
}
|
419 |
|
420 |
//Account's status check cron job
|
421 |
+
if (time() > $ct_data['next_account_status_check'] || isset($_POST['cleantalk_settings']['apikey'])){
|
422 |
+
|
|
|
423 |
$notice_check_timeout = $account_notice_check_timeout;
|
424 |
+
|
425 |
+
$api_key = isset($_POST['cleantalk_settings']['apikey']) ? $_POST['cleantalk_settings']['apikey'] : $ct_options['apikey'];
|
426 |
+
|
427 |
if(!function_exists('noticePaidTill'))
|
428 |
require_once('cleantalk.class.php');
|
429 |
|
430 |
+
$result = noticePaidTill($api_key);
|
431 |
+
|
432 |
+
if ($result){
|
|
|
433 |
|
|
|
|
|
434 |
$result = json_decode($result, true);
|
435 |
+
|
436 |
if (isset($result['data']) && is_array($result['data']))
|
437 |
$result = $result['data'];
|
438 |
|
439 |
if(isset($result['spam_count']))
|
440 |
$ct_data['admin_blocked']=$result['spam_count'];
|
441 |
|
442 |
+
if (isset($result['show_notice'])){
|
443 |
+
|
444 |
if ($result['show_notice'] == 1 && isset($result['trial']) && $result['trial'] == 1){
|
445 |
$notice_check_timeout = $trial_notice_check_timeout;
|
446 |
$show_ct_notice_trial = true;
|
447 |
$ct_data['show_ct_notice_trial']=1;
|
448 |
}
|
449 |
+
|
450 |
if ($result['show_notice'] == 1 && isset($result['renew']) && $result['renew'] == 1){
|
451 |
$notice_check_timeout = $renew_notice_check_timeout;
|
452 |
$show_ct_notice_renew = true;
|
543 |
add_settings_field('cleantalk_check_comments_number', __("Don't check trusted user's comments", 'cleantalk'), 'ct_input_check_comments_number', 'cleantalk', 'cleantalk_settings_anti_spam');
|
544 |
add_settings_field('cleantalk_remove_old_spam', __('Automatically delete spam comments', 'cleantalk'), 'ct_input_remove_old_spam', 'cleantalk', 'cleantalk_settings_anti_spam');
|
545 |
add_settings_field('cleantalk_remove_links_from_comments', __('Remove links from approved comments', 'cleantalk'), 'ct_input_remove_links_from_approved_comments', 'cleantalk', 'cleantalk_settings_anti_spam');
|
546 |
+
add_settings_field('cleantalk_show_check_links', __('Show links to check Emails, IPs for spam.', 'cleantalk'), 'ct_input_show_check_links', 'cleantalk', 'cleantalk_settings_anti_spam');
|
547 |
|
548 |
//Data processing
|
549 |
add_settings_field('cleantalk_title_data_processing', "", 'ct_input_data_processing', 'cleantalk', 'cleantalk_settings_anti_spam');//Title settings
|
1066 |
admin_addDescriptionsFields(__('Remove links from approved comments. Replace it with "[Link deleted]"', 'cleantalk'));
|
1067 |
}
|
1068 |
|
1069 |
+
/**
|
1070 |
+
* Admin callback function - Displays inputs of 'comments_test' plugin parameter
|
1071 |
+
*/
|
1072 |
+
function ct_input_show_check_links() {
|
1073 |
+
global $ct_options, $ct_data;
|
1074 |
+
|
1075 |
+
$ct_options = ct_get_options();
|
1076 |
+
$ct_data = ct_get_data();
|
1077 |
+
|
1078 |
+
$value = $ct_options['show_check_links'];
|
1079 |
+
echo "<input type='radio' id='cleantalk_show_check_links1' name='cleantalk_settings[show_check_links]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_show_check_links1'> " . __('Yes') . "</label>";
|
1080 |
+
echo ' ';
|
1081 |
+
echo "<input type='radio' id='cleantalk_show_check_links1' name='cleantalk_settings[show_check_links]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_show_check_links1'> " . __('No') . "</label>";
|
1082 |
+
admin_addDescriptionsFields(__('Shows little icon near IP addresses and Emails allowing you to check it via CleanTalk\'s database. Also allowing you to manage comments from the public post\'s page.', 'cleantalk'));
|
1083 |
+
}
|
1084 |
+
|
1085 |
/**
|
1086 |
* Admin callback function - Displays inputs of 'comments_test' plugin parameter
|
1087 |
*/
|
1673 |
$page = get_current_screen();
|
1674 |
$activation_timestapm = get_option('cleantalk_activation_timestamp', false);
|
1675 |
|
|
|
|
|
1676 |
|
1677 |
//General notice control flags
|
1678 |
+
$moderate_ip = (empty($ct_data['moderate_ip']) ? 0 : $ct_data['moderate_ip']);
|
1679 |
+
$self_owned_key = (!$moderate_ip && !defined('CLEANTALK_ACCESS_KEY') ? true : false);
|
1680 |
+
$is_admin = (is_network_admin() || is_admin() ? true : false);
|
1681 |
$value = 1; //(current_user_can('activate_plugins') ? 1 : 0); //inactive
|
1682 |
$show_notice = true;
|
1683 |
|
1788 |
return ($apikey === 'enter key' || $apikey === '') ? false : true;
|
1789 |
}
|
1790 |
|
1791 |
+
// Ajax action feedback form comments page.
|
1792 |
+
function ct_comment_send_feedback($comment_id = null, $comment_status = null, $change_status = false, $direct_call = null){
|
1793 |
+
|
1794 |
+
// For AJAX call
|
1795 |
+
check_ajax_referer('ct_secret_nonce', 'security');
|
1796 |
+
$comment_id = !empty($_POST['comment_id']) ? $_POST['comment_id'] : false;
|
1797 |
+
$comment_status = !empty($_POST['comment_status']) ? $_POST['comment_status'] : false;
|
1798 |
+
$change_status = !empty($_POST['change_status']) ? $_POST['change_status'] : false;
|
1799 |
+
|
1800 |
+
// If enter params is empty exit
|
1801 |
+
if(!$comment_id || !$comment_status)
|
1802 |
+
die();
|
1803 |
+
|
1804 |
+
// $comment = get_comment($comment_id, 'ARRAY_A');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1805 |
$hash = get_comment_meta($comment_id, 'ct_hash', true);
|
1806 |
+
|
1807 |
+
// If we can send the feedback
|
1808 |
+
if($hash){
|
1809 |
+
|
1810 |
+
// Approving
|
1811 |
+
if($comment_status == '1' || $comment_status == 'approve'){
|
1812 |
+
$result = ct_send_feedback($hash.":1");
|
1813 |
+
// $comment['comment_content'] = ct_unmark_red($comment['comment_content']);
|
1814 |
+
// wp_update_comment($comment);
|
1815 |
+
$result === true ? 1 : 0;
|
1816 |
+
}
|
1817 |
+
|
1818 |
+
// Disapproving
|
1819 |
+
if($comment_status == 'spam'){
|
1820 |
+
$result = ct_send_feedback($hash.":0");
|
1821 |
+
$result === true ? 1 : 0;
|
1822 |
+
}
|
1823 |
+
}else{
|
1824 |
+
$result = 'no_hash';
|
1825 |
+
}
|
1826 |
+
|
1827 |
+
// Changing comment status(folder) if flag is set. spam || approve
|
1828 |
+
if($change_status !== false)
|
1829 |
+
wp_set_comment_status($comment_id, $comment_status);
|
1830 |
+
|
1831 |
+
if(!$direct_call){
|
1832 |
+
echo !empty($result) ? $result : 0;
|
1833 |
+
die();
|
1834 |
+
}else{
|
1835 |
+
|
1836 |
+
}
|
1837 |
+
}
|
1838 |
|
1839 |
+
// Ajax action feedback form user page.
|
1840 |
+
function ct_user_send_feedback($user_id = null, $status = null, $direct_call = null){
|
1841 |
+
|
1842 |
+
check_ajax_referer('ct_secret_nonce', 'security');
|
1843 |
+
|
1844 |
+
if(!$direct_call){
|
1845 |
+
$user_id = $_POST['user_id'];
|
1846 |
+
$status = $_POST['status'];
|
1847 |
+
}
|
1848 |
+
|
1849 |
+
$hash = get_user_meta($user_id, 'ct_hash', true);
|
1850 |
+
|
1851 |
+
if($hash){
|
1852 |
+
if($status == 'approve' || $status == 1){
|
1853 |
+
$result = ct_send_feedback($hash.":1");
|
1854 |
+
$result === true ? 1 : 0;
|
1855 |
+
}
|
1856 |
+
if($status == 'spam' || $status == 'disapprove' || $status == 0){
|
1857 |
+
$result = ct_send_feedback($hash.":0");
|
1858 |
+
$result === true ? 1 : 0;
|
1859 |
+
}
|
1860 |
+
}else{
|
1861 |
+
$result = 'no_hash';
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
if(!$direct_call){
|
1865 |
+
echo !empty($result) ? $result : 0;
|
1866 |
+
die();
|
1867 |
+
}else{
|
1868 |
+
|
1869 |
+
}
|
1870 |
+
|
1871 |
}
|
1872 |
|
1873 |
/**
|
1891 |
* Send feedback for user deletion
|
1892 |
* @return null
|
1893 |
*/
|
1894 |
+
function ct_delete_user($user_id, $reassign = null){
|
1895 |
+
|
1896 |
$hash = get_user_meta($user_id, 'ct_hash', true);
|
1897 |
if ($hash !== '') {
|
1898 |
ct_feedback($hash, null, 0);
|
inc/cleantalk-ajax.php
CHANGED
@@ -14,6 +14,8 @@ $cleantalk_ajax_actions_to_check[] = 'amoforms_submit'; //amoForms
|
|
14 |
|
15 |
$cleantalk_hooked_actions[] = 'rwp_ajax_action_rating'; //Don't check Reviewer plugin
|
16 |
|
|
|
|
|
17 |
/* MailChimp Premium*/
|
18 |
add_filter('mc4wp_form_errors', 'ct_mc4wp_ajax_hook');
|
19 |
|
@@ -179,7 +181,8 @@ function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
|
|
179 |
$ct_request = new CleantalkRequest();
|
180 |
$ct_request->auth_key = $ct_options['apikey'];
|
181 |
$ct_request->sender_email = $email;
|
182 |
-
$ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
|
|
183 |
$ct_request->sender_nickname = '';
|
184 |
$ct_request->agent = $ct_agent_version;
|
185 |
$ct_request->sender_info = $sender_info;
|
@@ -264,7 +267,8 @@ function ct_user_register_ajaxlogin($user_id)
|
|
264 |
$ct_request = new CleantalkRequest();
|
265 |
$ct_request->auth_key = $ct_options['apikey'];
|
266 |
$ct_request->sender_email = sanitize_email($_POST['email']);
|
267 |
-
$ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
|
|
268 |
$ct_request->sender_nickname = sanitize_email($_POST['login']); ;
|
269 |
$ct_request->agent = $ct_agent_version;
|
270 |
$ct_request->sender_info = $sender_info;
|
@@ -537,10 +541,8 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
537 |
die();
|
538 |
}
|
539 |
|
540 |
-
//
|
541 |
// WooWaitList
|
542 |
// http://codecanyon.net/item/woowaitlist-woocommerce-back-in-stock-notifier/7103373
|
543 |
-
//
|
544 |
else if(isset($_POST['action']) && $_POST['action']=='wew_save_to_db_callback')
|
545 |
{
|
546 |
$result = array();
|
@@ -550,7 +552,7 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
550 |
print json_encode($result);
|
551 |
die();
|
552 |
}
|
553 |
-
//UserPro
|
554 |
else if(isset($_POST['action'], $_POST['template']) && $_POST['action']=='userpro_process_form' && $_POST['template']=='register')
|
555 |
{
|
556 |
foreach($_POST as $key => $value){
|
@@ -561,7 +563,7 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
561 |
print_r($output);
|
562 |
die;
|
563 |
}
|
564 |
-
//Quick event manager
|
565 |
else if(isset($_POST['action']) && $_POST['action']=='qem_validate_form'){
|
566 |
$errors[] = 'registration_forbidden';
|
567 |
$result = Array(
|
@@ -607,15 +609,28 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
607 |
print json_encode($result);
|
608 |
die();
|
609 |
}
|
610 |
-
//MailChimp for Wordpress Premium
|
611 |
elseif(!empty($_POST['_mc4wp_form_id']))
|
612 |
{
|
613 |
return 'ct_mc4wp_response';
|
614 |
}
|
615 |
-
//QAEngine Theme answers
|
616 |
elseif ( !empty($message_obj) && isset($message_obj['post_type'], $message_obj['author'], $message_obj['post_content']) ){
|
617 |
return new WP_Error('Spam comment', $ct_result->comment);
|
618 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
else
|
620 |
{
|
621 |
print $ct_result->comment;
|
14 |
|
15 |
$cleantalk_hooked_actions[] = 'rwp_ajax_action_rating'; //Don't check Reviewer plugin
|
16 |
|
17 |
+
$cleantalk_hooked_actions[] = 'ct_feedback_comment';
|
18 |
+
|
19 |
/* MailChimp Premium*/
|
20 |
add_filter('mc4wp_form_errors', 'ct_mc4wp_ajax_hook');
|
21 |
|
181 |
$ct_request = new CleantalkRequest();
|
182 |
$ct_request->auth_key = $ct_options['apikey'];
|
183 |
$ct_request->sender_email = $email;
|
184 |
+
// $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
185 |
+
$ct_request->sender_ip = cleantalk_get_real_ip();
|
186 |
$ct_request->sender_nickname = '';
|
187 |
$ct_request->agent = $ct_agent_version;
|
188 |
$ct_request->sender_info = $sender_info;
|
267 |
$ct_request = new CleantalkRequest();
|
268 |
$ct_request->auth_key = $ct_options['apikey'];
|
269 |
$ct_request->sender_email = sanitize_email($_POST['email']);
|
270 |
+
// $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
271 |
+
$ct_request->sender_ip = cleantalk_get_real_ip();
|
272 |
$ct_request->sender_nickname = sanitize_email($_POST['login']); ;
|
273 |
$ct_request->agent = $ct_agent_version;
|
274 |
$ct_request->sender_info = $sender_info;
|
541 |
die();
|
542 |
}
|
543 |
|
|
|
544 |
// WooWaitList
|
545 |
// http://codecanyon.net/item/woowaitlist-woocommerce-back-in-stock-notifier/7103373
|
|
|
546 |
else if(isset($_POST['action']) && $_POST['action']=='wew_save_to_db_callback')
|
547 |
{
|
548 |
$result = array();
|
552 |
print json_encode($result);
|
553 |
die();
|
554 |
}
|
555 |
+
// UserPro
|
556 |
else if(isset($_POST['action'], $_POST['template']) && $_POST['action']=='userpro_process_form' && $_POST['template']=='register')
|
557 |
{
|
558 |
foreach($_POST as $key => $value){
|
563 |
print_r($output);
|
564 |
die;
|
565 |
}
|
566 |
+
// Quick event manager
|
567 |
else if(isset($_POST['action']) && $_POST['action']=='qem_validate_form'){
|
568 |
$errors[] = 'registration_forbidden';
|
569 |
$result = Array(
|
609 |
print json_encode($result);
|
610 |
die();
|
611 |
}
|
612 |
+
// MailChimp for Wordpress Premium
|
613 |
elseif(!empty($_POST['_mc4wp_form_id']))
|
614 |
{
|
615 |
return 'ct_mc4wp_response';
|
616 |
}
|
617 |
+
// QAEngine Theme answers
|
618 |
elseif ( !empty($message_obj) && isset($message_obj['post_type'], $message_obj['author'], $message_obj['post_content']) ){
|
619 |
return new WP_Error('Spam comment', $ct_result->comment);
|
620 |
}
|
621 |
+
//Convertplug. Strpos because action value dynamically changes and depends on mailing service
|
622 |
+
elseif (isset($_POST['action']) && strpos($_POST['action'], '_add_subscriber') !== false){
|
623 |
+
$result = Array(
|
624 |
+
'action' => "message",
|
625 |
+
'detailed_msg' => "",
|
626 |
+
'email_status' => false,
|
627 |
+
'message' => "<h1 style='font-size: 25px; color: red;'>".$ct_result->comment."</h1>",
|
628 |
+
'status' => "error",
|
629 |
+
'url' => "none"
|
630 |
+
);
|
631 |
+
print json_encode($result);
|
632 |
+
die();
|
633 |
+
}
|
634 |
else
|
635 |
{
|
636 |
print $ct_result->comment;
|
inc/cleantalk-comments-editscreen.js
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
2 |
-
jQuery('#post-query-submit').after('<a href="edit-comments.php?page=ct_check_spam" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctCommentsScreen.spambutton_text+'</a>' +
|
3 |
-
' <a href="edit-comments.php?page=ct_check_spam&ct_worked=1" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctCommentsScreen.spambutton_text_show+'</a> ');
|
4 |
-
});
|
|
|
|
|
|
|
|
inc/cleantalk-comments.php
CHANGED
@@ -1,46 +1,72 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
add_action('admin_menu', 'ct_add_comments_menu');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
function ct_add_comments_menu()
|
6 |
-
{
|
7 |
if(current_user_can('activate_plugins'))
|
8 |
-
{
|
9 |
add_comments_page( __("Check for spam", 'cleantalk'), __("Check for spam", 'cleantalk'), 'read', 'ct_check_spam', 'ct_show_checkspam_page');
|
10 |
-
}
|
11 |
}
|
12 |
|
13 |
-
function ct_show_checkspam_page()
|
14 |
-
{
|
15 |
global $ct_plugin_name;
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
<div class="wrap">
|
18 |
<h2><?php echo $ct_plugin_name; ?></h2><br />
|
19 |
|
20 |
-
|
21 |
-
<
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
</div>
|
|
|
|
|
|
|
26 |
<?php
|
27 |
-
$args_spam = array(
|
28 |
-
'meta_query' => array(
|
29 |
-
Array(
|
30 |
-
'key' => 'ct_marked_as_spam',
|
31 |
-
'compare' => 'EXISTS'
|
32 |
-
)
|
33 |
-
),
|
34 |
-
'count'=>true
|
35 |
-
);
|
36 |
-
$cnt_spam=get_comments($args_spam);
|
37 |
|
|
|
|
|
|
|
38 |
|
39 |
-
$page=1;
|
40 |
-
if(isset($_GET['spam_page']))
|
41 |
-
{
|
42 |
-
$page=intval($_GET['spam_page']);
|
43 |
-
}
|
44 |
$args_spam = array(
|
45 |
'meta_query' => array(
|
46 |
Array(
|
@@ -49,221 +75,172 @@ function ct_show_checkspam_page()
|
|
49 |
'compare' => 'NUMERIC'
|
50 |
)
|
51 |
),
|
52 |
-
'number'
|
53 |
-
'offset'=>($page-1)
|
54 |
);
|
55 |
|
56 |
-
$c_spam=get_comments($args_spam);
|
57 |
-
if($cnt_spam>0)
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
?>
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
</th>
|
66 |
-
<th scope="col" id="author" class="manage-column column-slug"><?php print _e( 'Author' );?></th>
|
67 |
-
<th scope="col" id="comment" class="manage-column column-comment"><?php _e( 'Comment', 'cleantalk');;?></th>
|
68 |
-
<th scope="col" id="response" class="manage-column column-response sortable desc"><?php _e( 'In Response To', 'cleantalk' );?></th>
|
69 |
-
</thead>
|
70 |
-
<tbody id="the-comment-list" data-wp-lists="list:comment">
|
71 |
-
<?php
|
72 |
-
for($i=0;$i<sizeof($c_spam);$i++)
|
73 |
-
{
|
74 |
-
?>
|
75 |
-
<tr id="comment-<?php print $c_spam[$i]->comment_ID; ?>" class="comment even thread-even depth-1 approved cleantalk_comment" data-id="<?php print $c_spam[$i]->comment_ID; ?>">
|
76 |
-
<th scope="row" class="check-column">
|
77 |
-
<label class="screen-reader-text" for="cb-select-<?php print $c_spam[$i]->comment_ID; ?>">Select comment</label>
|
78 |
-
<input id="cb-select-<?php print $c_spam[$i]->comment_ID; ?>" type="checkbox" name="del_comments[]" value="<?php print $c_spam[$i]->comment_ID; ?>"/>
|
79 |
</th>
|
80 |
-
<
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
</td>
|
86 |
-
<td>
|
87 |
-
<?php print $c_spam[$i]->comment_author; ?><br />
|
88 |
-
<a href="mailto:<?php print $c_spam[$i]->comment_author_email; ?>"><?php print $c_spam[$i]->comment_author_email; ?></a> <a href="https://cleantalk.org/blacklists/<?php print $c_spam[$i]->comment_author_email ; ?>" target="_blank"><img src="<?php print plugin_dir_url(__FILE__); ?>images/new_window.gif" border="0" style="float:none"/></a>
|
89 |
-
<br/>
|
90 |
-
<a href="edit-comments.php?s=<?php print $c_spam[$i]->comment_author_IP ; ?>&mode=detail"><?php print $c_spam[$i]->comment_author_IP ; ?></a>
|
91 |
-
<a href="https://cleantalk.org/blacklists/<?php print $c_spam[$i]->comment_author_IP ; ?>" target="_blank"><img src="<?php print plugin_dir_url(__FILE__); ?>images/new_window.gif" border="0" style="float:none"/></a>
|
92 |
-
</td>
|
93 |
-
</tr>
|
94 |
-
</table>
|
95 |
-
</td>
|
96 |
-
<td class="comment column-comment">
|
97 |
-
<div class="submitted-on">
|
98 |
-
<?php printf( __( 'Submitted on <a href="%1$s">%2$s at %3$s</a>' ), get_comment_link($c_spam[$i]->comment_ID),
|
99 |
-
/* translators: comment date format. See http://php.net/date */
|
100 |
-
get_comment_date( __( 'Y/m/d' ),$c_spam[$i]->comment_ID ),
|
101 |
-
get_comment_date( get_option( 'time_format' ),$c_spam[$i]->comment_ID )
|
102 |
-
);
|
103 |
-
?>
|
104 |
-
|
105 |
-
</div>
|
106 |
-
<p>
|
107 |
-
<?php print $c_spam[$i]->comment_content; ?>
|
108 |
-
</p>
|
109 |
-
<div style="height:16px; display: none;" id='cleantalk_button_set_<?php print $c_spam[$i]->comment_ID; ?>'>
|
110 |
-
<a href="#" class="cleantalk_delete_from_list_button" data-id="<?php print $c_spam[$i]->comment_ID; ?>" style="color:#0a0;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Approve", "cleantalk"); ?></a>
|
111 |
-
|
|
112 |
-
<a href="#" class="cleantalk_delete_button" data-id="<?php print $c_spam[$i]->comment_ID; ?>" style="color:#a00;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Delete", "cleantalk"); ?></a>
|
113 |
-
</div>
|
114 |
-
</td>
|
115 |
-
<td class="response column-response">
|
116 |
-
<div>
|
117 |
-
<span>
|
118 |
-
<a href="/wp-admin/post.php?post=<?php print $c_spam[$i]->comment_post_ID; ?>&action=edit"><?php print get_the_title($c_spam[$i]->comment_post_ID); ?></a>
|
119 |
-
<br/>
|
120 |
-
<a href="/wp-admin/edit-comments.php?p=<?php print $c_spam[$i]->comment_post_ID; ?>" class="post-com-count">
|
121 |
-
<span class="comment-count"><?php
|
122 |
-
$p_cnt=wp_count_comments();
|
123 |
-
print $p_cnt->total_comments;
|
124 |
-
?></span>
|
125 |
-
</a>
|
126 |
-
</span>
|
127 |
-
<a href="<?php print get_permalink($c_spam[$i]->comment_post_ID); ?>"><?php print _e('View Post');?></a>
|
128 |
-
</div>
|
129 |
-
</td>
|
130 |
-
</tr>
|
131 |
-
<?php
|
132 |
-
}
|
133 |
-
$args_spam = array(
|
134 |
-
'meta_query' => array(
|
135 |
-
Array(
|
136 |
-
'key' => 'ct_marked_as_spam',
|
137 |
-
'value' => '1',
|
138 |
-
'compare' => 'NUMERIC'
|
139 |
-
)
|
140 |
-
|
141 |
-
),
|
142 |
-
'count'=>true
|
143 |
-
);
|
144 |
-
$cnt_spam=get_comments($args_spam);
|
145 |
-
if($cnt_spam>30)
|
146 |
-
{
|
147 |
-
?>
|
148 |
-
<tr class="comment even thread-even depth-1 approved">
|
149 |
-
<td colspan="4">
|
150 |
<?php
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
?>
|
165 |
-
</
|
166 |
-
</
|
167 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
}
|
169 |
?>
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
</table>
|
172 |
-
<div id="ct_tools_buttons" style="margin-top: 10px;">
|
173 |
-
<button class="button" id="ct_delete_all"><?php _e('Delete all comments from the list', 'cleantalk'); ?></button>
|
174 |
-
<button class="button" id="ct_delete_checked"><?php _e('Delete selected', 'cleantalk'); ?></button><br /><br />
|
175 |
-
</div>
|
176 |
<?php
|
177 |
-
|
|
|
|
|
|
|
|
|
178 |
?>
|
179 |
-
<?php
|
180 |
-
$args_unchecked = array(
|
181 |
-
'meta_query' => array(
|
182 |
-
'relation' => 'AND',
|
183 |
-
Array(
|
184 |
-
'key' => 'ct_checked',
|
185 |
-
'value' => '1',
|
186 |
-
'compare' => 'NOT EXISTS'
|
187 |
-
),
|
188 |
-
Array(
|
189 |
-
'key' => 'ct_hash',
|
190 |
-
'value' => '1',
|
191 |
-
'compare' => 'NOT EXISTS'
|
192 |
-
)
|
193 |
-
),
|
194 |
-
'count'=>true
|
195 |
-
);
|
196 |
-
$cnt_unchecked=get_comments($args_unchecked);
|
197 |
-
|
198 |
-
$args_spam = array(
|
199 |
-
'meta_query' => array(
|
200 |
-
Array(
|
201 |
-
'key' => 'ct_marked_as_spam',
|
202 |
-
'compare' => 'EXISTS'
|
203 |
-
)
|
204 |
-
),
|
205 |
-
'count'=>true
|
206 |
-
);
|
207 |
-
$cnt_spam=get_comments($args_spam);
|
208 |
-
//if($cnt_unchecked>0)
|
209 |
-
{
|
210 |
-
?>
|
211 |
-
<?php
|
212 |
-
if($cnt_spam>0)
|
213 |
-
{
|
214 |
-
print "<br />
|
215 |
-
<div id=\"ct_search_info\">
|
216 |
-
<br />".
|
217 |
-
__('There is some differencies between blacklists database and our API mechanisms. Blacklists shows all history of spam activity, but our API (that used in spam checking) used another parameters, too: last day of activity, number of spam attacks during last days etc. This mechanisms help us to reduce number of false positivitie. So, there is nothing strange, if some emails/IPs will be not found by this checking.', 'cleantalk')
|
218 |
-
."</div>";
|
219 |
-
}
|
220 |
-
?></div>
|
221 |
-
<?php
|
222 |
-
}
|
223 |
-
?>
|
224 |
-
<div id="ct_working_message" style="margin:auto;padding:3px;width:70%;border:2px dotted gray;display:none;background:#ffff99;">
|
225 |
-
<?php _e("Please wait! CleanTalk is checking all approved and pending comments via blacklist database at cleantalk.org. You will have option to delete found spam comments after plugin finish.", 'cleantalk'); ?>
|
226 |
-
</div>
|
227 |
-
<div id="ct_deleting_message" style="display:none;">
|
228 |
-
<?php _e("Please wait for a while. CleanTalk is deleting spam comments. Comments left: ", 'cleantalk'); ?> <span id="cleantalk_comments_left">
|
229 |
-
<?php echo $cnt_spam;?>
|
230 |
-
</span>
|
231 |
-
</div>
|
232 |
-
<div id="ct_done_message" <?php if($cnt_unchecked>0) print 'style="display:none"'; ?>>
|
233 |
-
<?php //_e("Done. All comments tested via blacklists database, please see result bellow.", 'cleantalk');
|
234 |
-
?>
|
235 |
-
</div><br />
|
236 |
-
<div id="ct_bottom_tools">
|
237 |
-
<table id="new_test_table">
|
238 |
-
<tr valign="top">
|
239 |
-
<td>
|
240 |
-
<button class="button" id="ct_check_spam_button"><?php _e("Check for spam", 'cleantalk'); ?></button><br /><br />
|
241 |
-
</td>
|
242 |
-
<td style="padding-left: 2em;">
|
243 |
-
<div id="ct_info_message"><?php _e("The plugin will check all comments against blacklists database and show you senders that have spam activity on other websites.", 'cleantalk'); ?>
|
244 |
-
</td>
|
245 |
-
</tr>
|
246 |
-
</table>
|
247 |
-
<?php
|
248 |
-
if($_SERVER['REMOTE_ADDR']=='127.0.0.1')print '<button class="button" id="ct_insert_comments">'. __('Insert comments', 'cleantalk') .'</button><br />';
|
249 |
-
?>
|
250 |
-
|
251 |
-
</div>
|
252 |
</div>
|
253 |
<?php
|
254 |
}
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
{
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
|
263 |
-
add_action( 'wp_ajax_ajax_check_comments', 'ct_ajax_check_comments' );
|
264 |
-
|
265 |
-
function ct_ajax_check_comments()
|
266 |
-
{
|
267 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
268 |
global $ct_options, $ct_ip_penalty_days;
|
269 |
$ct_options = ct_get_options();
|
@@ -276,7 +253,12 @@ function ct_ajax_check_comments()
|
|
276 |
'value' => '1',
|
277 |
'compare' => 'NOT EXISTS'
|
278 |
),
|
279 |
-
|
|
|
|
|
|
|
|
|
|
|
280 |
'key' => 'ct_hash',
|
281 |
'value' => '1',
|
282 |
'compare' => 'NOT EXISTS'
|
@@ -286,99 +268,122 @@ function ct_ajax_check_comments()
|
|
286 |
'status' => 'all'
|
287 |
);
|
288 |
|
289 |
-
$
|
|
|
|
|
290 |
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
292 |
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
|
|
295 |
$data=Array();
|
296 |
-
for($i=0;$i<sizeof($
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
304 |
}
|
|
|
|
|
|
|
|
|
|
|
305 |
$data=implode(',',$data);
|
306 |
-
|
307 |
-
|
308 |
-
$request['
|
309 |
-
$
|
|
|
|
|
|
|
|
|
310 |
|
311 |
if(!function_exists('sendRawRequest'))
|
312 |
require_once('cleantalk.class.php');
|
313 |
|
314 |
$result=sendRawRequest($url, $request, false, 5);
|
315 |
|
316 |
-
|
317 |
-
|
318 |
-
{
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
{
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
$uip=$u[$i]->comment_author_IP;
|
339 |
-
$uim=$u[$i]->comment_author_email;
|
340 |
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
|
|
|
|
349 |
}
|
350 |
-
|
351 |
-
/*
|
352 |
-
// Do not use the spam records becaus it was a spammer far time ago.
|
353 |
-
if (time() - $ip_update_time > 86400 * $ct_ip_penalty_days) {
|
354 |
-
$mark_spam_ip = false;
|
355 |
-
}
|
356 |
-
//*/
|
357 |
-
|
358 |
-
if ($mark_spam_ip || $mark_spam_email) {
|
359 |
-
add_comment_meta($u[$i]->comment_ID,'ct_marked_as_spam','1',true);
|
360 |
-
}
|
361 |
}
|
362 |
-
print 1;
|
363 |
}
|
364 |
-
}
|
365 |
-
else
|
366 |
-
{
|
367 |
print 0;
|
368 |
}
|
369 |
|
370 |
die;
|
371 |
}
|
372 |
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
if (!$direct_call) {
|
377 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
378 |
-
}
|
379 |
|
|
|
380 |
$cnt=get_comments(Array('count'=>true));
|
381 |
|
|
|
382 |
$args_spam = array(
|
383 |
'meta_query' => array(
|
384 |
Array(
|
@@ -389,19 +394,22 @@ function ct_ajax_info_comments($direct_call = true)
|
|
389 |
),
|
390 |
'count'=>true
|
391 |
);
|
392 |
-
|
393 |
$cnt_spam=get_comments($args_spam);
|
394 |
|
|
|
395 |
$args_checked1=array(
|
396 |
'meta_query' => array(
|
397 |
Array(
|
398 |
'key' => 'ct_hash',
|
399 |
-
//'value'=>'1',
|
400 |
'compare' => 'EXISTS'
|
401 |
)
|
402 |
),
|
403 |
'count'=>true
|
404 |
);
|
|
|
|
|
|
|
405 |
$args_checked2=array(
|
406 |
'meta_query' => array(
|
407 |
Array(
|
@@ -412,76 +420,97 @@ function ct_ajax_info_comments($direct_call = true)
|
|
412 |
),
|
413 |
'count'=>true
|
414 |
);
|
|
|
415 |
|
416 |
-
|
417 |
-
$cnt_checked2
|
418 |
-
$cnt_checked=$cnt_checked1+$cnt_checked2;
|
419 |
|
420 |
-
//
|
421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
$backup_notice = ' ';
|
423 |
-
|
|
|
424 |
$backup_notice = __("Please do backup of WordPress database before delete any comments!", 'cleantalk');
|
425 |
-
|
426 |
print "<p>$backup_notice</p>";
|
427 |
-
if (!$direct_call)
|
428 |
die();
|
429 |
-
|
430 |
return null;
|
431 |
}
|
432 |
|
433 |
-
|
434 |
-
function ct_ajax_insert_comments()
|
435 |
-
|
436 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
|
|
|
|
437 |
$time = current_time('mysql');
|
|
|
438 |
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
{
|
444 |
-
$
|
445 |
}
|
446 |
-
|
447 |
-
|
448 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
449 |
}
|
450 |
-
|
451 |
-
|
452 |
-
'comment_author' => "author_$rnd",
|
453 |
-
'comment_author_email' => $email,
|
454 |
-
'comment_author_url' => 'http://',
|
455 |
-
'comment_content' => "comment content ".mt_rand(1,10000)." ".mt_rand(1,10000)." ".mt_rand(1,10000),
|
456 |
-
'comment_type' => '',
|
457 |
-
'comment_parent' => 0,
|
458 |
-
'user_id' => 1,
|
459 |
-
'comment_author_IP' => '127.0.0.1',
|
460 |
-
'comment_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)',
|
461 |
-
'comment_date' => $time,
|
462 |
-
'comment_approved' => 1,
|
463 |
-
);
|
464 |
-
|
465 |
-
wp_insert_comment($data);
|
466 |
}
|
467 |
-
|
|
|
468 |
die();
|
469 |
}
|
470 |
|
471 |
-
|
472 |
-
function ct_ajax_delete_checked()
|
473 |
-
{
|
474 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
475 |
-
foreach($_POST['ids'] as $key=>$value)
|
476 |
-
{
|
477 |
wp_delete_comment($value, false);
|
478 |
}
|
479 |
die();
|
480 |
}
|
481 |
|
482 |
-
|
483 |
-
function ct_ajax_delete_all()
|
484 |
-
{
|
485 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
486 |
$args_spam = array(
|
487 |
'number'=>100,
|
@@ -509,8 +538,7 @@ function ct_ajax_delete_all()
|
|
509 |
);
|
510 |
$cnt_all=get_comments($args_spam);
|
511 |
|
512 |
-
for($i=0;$i<sizeof($c_spam);$i++)
|
513 |
-
{
|
514 |
wp_delete_comment($c_spam[$i]->comment_ID, false);
|
515 |
usleep(10000);
|
516 |
}
|
@@ -518,20 +546,17 @@ function ct_ajax_delete_all()
|
|
518 |
die();
|
519 |
}
|
520 |
|
521 |
-
|
522 |
-
function ct_ajax_clear_comments()
|
523 |
-
{
|
524 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
525 |
global $wpdb;
|
526 |
-
$wpdb->query("delete from $wpdb->commentmeta where meta_key='
|
527 |
die();
|
528 |
}
|
529 |
|
530 |
/**
|
531 |
* Admin action 'comment_unapproved_to_approved' - Approve comment, delete from the deleting list
|
532 |
*/
|
533 |
-
|
534 |
-
function ct_commentcheck_approve_comment() {
|
535 |
|
536 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
537 |
|
1 |
<?php
|
|
|
2 |
add_action('admin_menu', 'ct_add_comments_menu');
|
3 |
+
add_action( 'wp_ajax_ajax_check_comments', 'ct_ajax_check_comments' );
|
4 |
+
add_action( 'wp_ajax_ajax_info_comments', 'ct_ajax_info_comments' );
|
5 |
+
add_action( 'wp_ajax_ajax_insert_comments', 'ct_ajax_insert_comments' );
|
6 |
+
add_action( 'wp_ajax_ajax_delete_checked', 'ct_ajax_delete_checked' );
|
7 |
+
add_action( 'wp_ajax_ajax_delete_all', 'ct_ajax_delete_all' );
|
8 |
+
add_action( 'wp_ajax_ajax_clear_comments', 'ct_ajax_clear_comments' );
|
9 |
+
add_action( 'wp_ajax_ajax_ct_approve_comment', 'ct_comment_check_approve_comment' );
|
10 |
+
|
11 |
|
12 |
+
function ct_add_comments_menu(){
|
|
|
13 |
if(current_user_can('activate_plugins'))
|
|
|
14 |
add_comments_page( __("Check for spam", 'cleantalk'), __("Check for spam", 'cleantalk'), 'read', 'ct_check_spam', 'ct_show_checkspam_page');
|
|
|
15 |
}
|
16 |
|
17 |
+
function ct_show_checkspam_page(){
|
|
|
18 |
global $ct_plugin_name;
|
19 |
+
|
20 |
+
// Getting total spam comments
|
21 |
+
$args_spam = array(
|
22 |
+
'meta_query' => array(
|
23 |
+
Array(
|
24 |
+
'key' => 'ct_marked_as_spam',
|
25 |
+
'compare' => 'EXISTS'
|
26 |
+
)
|
27 |
+
),
|
28 |
+
'count'=>true
|
29 |
+
);
|
30 |
+
$cnt_spam = get_comments($args_spam);
|
31 |
+
|
32 |
+
?>
|
33 |
<div class="wrap">
|
34 |
<h2><?php echo $ct_plugin_name; ?></h2><br />
|
35 |
|
36 |
+
<!-- AJAX error message -->
|
37 |
+
<div id="ct_error_message" style="display:none">
|
38 |
+
<h3>
|
39 |
+
<?php _e("Ajax error. Process will be automatically restarted in 3 seconds. Status: ", 'cleantalk'); ?><span id="cleantalk_ajax_error"></span> (<span id="cleantalk_js_func"></span>)
|
40 |
+
</h3>
|
41 |
+
<h4 style="text-align:center;width:90%;">Please, check for JavaScript errors in your dashboard and and repair it.</h4>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
<!-- Deleting message -->
|
45 |
+
<div id="ct_deleting_message" style="display:none;">
|
46 |
+
<?php _e("Please wait for a while. CleanTalk is deleting spam comments. Comments left: ", 'cleantalk'); ?> <span id="cleantalk_comments_left">
|
47 |
+
<?php echo $cnt_spam;?>
|
48 |
+
</span>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
<!-- Main info -->
|
52 |
+
<h3 id="ct_checking_status"><?php ct_ajax_info_comments(true);?></h3>
|
53 |
+
|
54 |
+
<!-- Cooling notice -->
|
55 |
+
<h3 id="ct_cooling_notice"></h3>
|
56 |
+
|
57 |
+
<!-- Preloader and working message -->
|
58 |
+
<div id="ct_preloader">
|
59 |
+
<img border=0 src="<?php print plugin_dir_url(__FILE__); ?>images/preloader.gif" />
|
60 |
</div>
|
61 |
+
<div id="ct_working_message">
|
62 |
+
<?php _e("Please wait! CleanTalk is checking all approved and pending comments via blacklist database at cleantalk.org. You will have option to delete found spam comments after plugin finish.", 'cleantalk'); ?>
|
63 |
+
</div>
|
64 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
+
// Pagination
|
67 |
+
$page = !empty($_GET['spam_page']) ? intval($_GET['spam_page']) : 1;
|
68 |
+
$on_page = 20;
|
69 |
|
|
|
|
|
|
|
|
|
|
|
70 |
$args_spam = array(
|
71 |
'meta_query' => array(
|
72 |
Array(
|
75 |
'compare' => 'NUMERIC'
|
76 |
)
|
77 |
),
|
78 |
+
'number'=>$on_page,
|
79 |
+
'offset'=>($page-1)*$on_page
|
80 |
);
|
81 |
|
82 |
+
$c_spam = get_comments($args_spam);
|
83 |
+
if($cnt_spam>0){
|
84 |
+
|
85 |
+
$pages = ceil(intval($cnt_spam)/$on_page);
|
86 |
+
if($pages && $pages != 1){
|
87 |
+
echo "<div class='pagination'>"
|
88 |
+
."<b>Pages:</b>"
|
89 |
+
."<ul class='pagination'>";
|
90 |
+
for($i = 1; $i <= $pages; $i++){
|
91 |
+
echo "<li class='pagination'>"
|
92 |
+
."<a href='edit-comments.php?page=ct_check_spam&spam_page=$i&ct_worked=1'>"
|
93 |
+
.($i == $page ? "<span class='current_page'>$i</span>" : $i)
|
94 |
+
."</a>"
|
95 |
+
."</li>";
|
96 |
+
}
|
97 |
+
echo "</ul>";
|
98 |
+
echo "</div>";
|
99 |
+
}
|
100 |
?>
|
101 |
+
<table class="widefat fixed comments" id="ct_check_comments_table">
|
102 |
+
<thead>
|
103 |
+
<th scope="col" id="cb" class="manage-column column-cb check-column">
|
104 |
+
<label class="screen-reader-text" for="cb-select-all-1">Select All</label>
|
105 |
+
<input id="cb-select-all-1" type="checkbox" style="margin-top:0;"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
</th>
|
107 |
+
<th scope="col" id="author" class="manage-column column-slug"><?php print _e( 'Author' );?></th>
|
108 |
+
<th scope="col" id="comment" class="manage-column column-comment"><?php _e( 'Comment', 'cleantalk');;?></th>
|
109 |
+
<th scope="col" id="response" class="manage-column column-response sortable desc"><?php _e( 'In Response To', 'cleantalk' );?></th>
|
110 |
+
</thead>
|
111 |
+
<tbody id="the-comment-list" data-wp-lists="list:comment">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
<?php
|
113 |
+
for($i=0;$i<sizeof($c_spam);$i++){
|
114 |
+
$id = $c_spam[$i]->comment_ID;
|
115 |
+
$post_id = $c_spam[$i]->comment_post_ID;
|
116 |
+
$login = $c_spam[$i]->comment_author;
|
117 |
+
$email = $c_spam[$i]->comment_author_email;
|
118 |
+
$ip = $c_spam[$i]->comment_author_IP;
|
119 |
+
|
120 |
+
echo "<tr id='comment-$id' class='comment even thread-even depth-1 approved cleantalk_comment' data-id='$id'>"
|
121 |
+
."<th scope='row' class='check-column'>"
|
122 |
+
."<label class='screen-reader-text' for='cb-select-$id'>Select comment</label>"
|
123 |
+
."<input id='cb-select-$id' type='checkbox' name='del_comments[]' value='$id'/>"
|
124 |
+
."</th>"
|
125 |
+
."<td class='author column-author' nowrap>"
|
126 |
+
."<strong>"
|
127 |
+
.get_avatar( $c_spam[$i]->user_id , 32)
|
128 |
+
."$login"
|
129 |
+
."</strong>"
|
130 |
+
."<br />"
|
131 |
+
."<br />";
|
132 |
+
|
133 |
+
// Outputs email if exists
|
134 |
+
if($email)
|
135 |
+
echo "<a href='mailto:$email'>$email</a>"
|
136 |
+
."<a href='https://cleantalk.org/blacklists/$email ' target='_blank'>"
|
137 |
+
." <img src='".plugin_dir_url(__FILE__)."images/new_window.gif' border='0' style='float:none'/>"
|
138 |
+
."</a>";
|
139 |
+
else
|
140 |
+
echo "No email";
|
141 |
+
echo "<br/>";
|
142 |
+
|
143 |
+
// Outputs IP if exists
|
144 |
+
if($ip)
|
145 |
+
echo "<a href='edit-comments.php?s=$ip&mode=detail'>$ip </a>"
|
146 |
+
."<a href='https://cleantalk.org/blacklists/$ip ' target='_blank'>"
|
147 |
+
." <img src='".plugin_dir_url(__FILE__)."images/new_window.gif' border='0' style='float:none'/>"
|
148 |
+
."</a>";
|
149 |
+
else
|
150 |
+
echo "No IP adress";
|
151 |
+
echo "</td>";
|
152 |
+
?>
|
153 |
+
<td class="comment column-comment">
|
154 |
+
<div class="submitted-on">
|
155 |
+
<?php printf( __( 'Submitted on <a href="%1$s">%2$s at %3$s</a>' ), get_comment_link($id),
|
156 |
+
/* translators: comment date format. See http://php.net/date */
|
157 |
+
get_comment_date( __( 'Y/m/d' ),$id ),
|
158 |
+
get_comment_date( get_option( 'time_format' ),$id )
|
159 |
+
);
|
160 |
+
?>
|
161 |
+
|
162 |
+
</div>
|
163 |
+
<p>
|
164 |
+
<?php print $c_spam[$i]->comment_content; ?>
|
165 |
+
</p>
|
166 |
+
<div style="height:16px; display: none;" id='cleantalk_button_set_<?php print $id; ?>'>
|
167 |
+
<a href="#" class="cleantalk_delete_from_list_button" data-id="<?php print $id; ?>" style="color:#0a0;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Approve", "cleantalk"); ?></a>
|
168 |
+
|
|
169 |
+
<a href="#" class="cleantalk_delete_button" data-id="<?php print $id; ?>" style="color:#a00;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Delete", "cleantalk"); ?></a>
|
170 |
+
</div>
|
171 |
+
</td>
|
172 |
+
<td class="response column-response">
|
173 |
+
<div>
|
174 |
+
<span>
|
175 |
+
<a href="/wp-admin/post.php?post=<?php print $post_id; ?>&action=edit"><?php print get_the_title($post_id); ?></a>
|
176 |
+
<br/>
|
177 |
+
<a href="/wp-admin/edit-comments.php?p=<?php print $post_id; ?>" class="post-com-count">
|
178 |
+
<span class="comment-count"><?php
|
179 |
+
$p_cnt=wp_count_comments();
|
180 |
+
print $p_cnt->total_comments;
|
181 |
+
?></span>
|
182 |
+
</a>
|
183 |
+
</span>
|
184 |
+
<a href="<?php print get_permalink($post_id); ?>"><?php print _e('View Post');?></a>
|
185 |
+
</div>
|
186 |
+
</td>
|
187 |
+
</tr>
|
188 |
+
<?php
|
189 |
}
|
190 |
?>
|
191 |
+
</tbody>
|
192 |
+
</table>
|
193 |
<?php
|
194 |
+
// Pagination
|
195 |
+
if($pages && $pages != 1){
|
196 |
+
echo "<div class='pagination'>"
|
197 |
+
."<b>Pages:</b>"
|
198 |
+
."<ul class='pagination'>";
|
199 |
+
for($i = 1; $i <= $pages; $i++){
|
200 |
+
echo "<li class='pagination'>"
|
201 |
+
."<a href='edit-comments.php?page=ct_check_spam&spam_page=$i&ct_worked=1'>"
|
202 |
+
.($i == $page ? "<span class='current_page'>$i</span>" : $i)
|
203 |
+
."</a>"
|
204 |
+
."</li>";
|
205 |
+
}
|
206 |
+
echo "</ul>";
|
207 |
+
echo "</div>";
|
208 |
}
|
209 |
?>
|
210 |
+
<div id="ct_tools_buttons" style="margin-top: 10px;">
|
211 |
+
<button class="button" id="ct_delete_all"><?php _e('Delete all comments from the list', 'cleantalk'); ?></button>
|
212 |
+
<button class="button" id="ct_delete_checked"><?php _e('Delete selected', 'cleantalk'); ?></button><br /><br />
|
213 |
+
</div>
|
214 |
+
<?php
|
215 |
+
}
|
216 |
+
echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<br /><button class="button" id="ct_insert_comments">'. __('Insert comments', 'cleantalk') .'</button><br />' : '';
|
217 |
+
?>
|
218 |
+
<br />
|
219 |
+
<table id="new_test_table">
|
220 |
+
<tr valign="top">
|
221 |
+
<td>
|
222 |
+
<button class="button" id="ct_check_spam_button"><?php _e("Check for spam", 'cleantalk'); ?></button><br /><br />
|
223 |
+
</td>
|
224 |
+
<td style="padding-left: 2em;">
|
225 |
+
<div id="ct_info_message">
|
226 |
+
<?php _e("The plugin will check all comments against blacklists database and show you senders that have spam activity on other websites.", 'cleantalk'); ?>
|
227 |
+
</div>
|
228 |
+
</td>
|
229 |
+
</tr>
|
230 |
</table>
|
|
|
|
|
|
|
|
|
231 |
<?php
|
232 |
+
if($cnt_spam > 0)
|
233 |
+
echo "<div id='ct_search_info'>"
|
234 |
+
."<br />"
|
235 |
+
.__('There is some differencies between blacklists database and our API mechanisms. Blacklists shows all history of spam activity, but our API (that used in spam checking) used another parameters, too: last day of activity, number of spam attacks during last days etc. This mechanisms help us to reduce number of false positivitie. So, there is nothing strange, if some emails/IPs will be not found by this checking.', 'cleantalk')
|
236 |
+
."</div>";
|
237 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
</div>
|
239 |
<?php
|
240 |
}
|
241 |
|
242 |
+
function ct_ajax_check_comments(){
|
243 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
245 |
global $ct_options, $ct_ip_penalty_days;
|
246 |
$ct_options = ct_get_options();
|
253 |
'value' => '1',
|
254 |
'compare' => 'NOT EXISTS'
|
255 |
),
|
256 |
+
array(
|
257 |
+
'key' => 'ct_bad',
|
258 |
+
'value' => '1',
|
259 |
+
'compare' => 'NOT EXISTS'
|
260 |
+
)
|
261 |
+
/*array(
|
262 |
'key' => 'ct_hash',
|
263 |
'value' => '1',
|
264 |
'compare' => 'NOT EXISTS'
|
268 |
'status' => 'all'
|
269 |
);
|
270 |
|
271 |
+
$c=get_comments($args_unchecked);
|
272 |
+
|
273 |
+
$c=array_values($c);
|
274 |
|
275 |
+
if(sizeof($c)>0){
|
276 |
+
|
277 |
+
foreach($c as $comment_index => $comment){
|
278 |
+
|
279 |
+
if(!isset($curr_date))
|
280 |
+
$curr_date = (substr($comment->comment_date, 0, 10) ? substr($comment->comment_date, 0, 10) : '');
|
281 |
|
282 |
+
if(substr($comment->comment_date, 0, 10) != $curr_date)
|
283 |
+
unset($c[$comment_index]);
|
284 |
+
|
285 |
+
}
|
286 |
+
unset($comment_index, $comment);
|
287 |
+
|
288 |
$data=Array();
|
289 |
+
for($i=0;$i<sizeof($c);$i++){
|
290 |
+
|
291 |
+
$curr_ip = $c[$i]->comment_author_IP;
|
292 |
+
$curr_email = $c[$i]->comment_author_email;
|
293 |
+
|
294 |
+
// Check for identity
|
295 |
+
$curr_ip = preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $curr_ip) === 1 ? $curr_ip : null;
|
296 |
+
$curr_email = preg_match('/^\S+@\S+\.\S+$/', $curr_email) === 1 ? $curr_email : null;
|
297 |
+
|
298 |
+
if(empty($curr_ip) && empty($curr_email)){
|
299 |
+
update_comment_meta($c[$i]->comment_ID,'ct_bad','1',true);
|
300 |
+
unset($c[$i]);
|
301 |
+
$c = array_values($c);
|
302 |
+
}else{
|
303 |
+
if(!empty($curr_ip))
|
304 |
+
$data[] = $curr_ip;
|
305 |
+
if(!empty($curr_email))
|
306 |
+
$data[] = $curr_email;
|
307 |
+
$c[$i]->comment_author_IP = empty($curr_ip) ? 'none' : $curr_ip;
|
308 |
+
$c[$i]->comment_author_email = empty($curr_email) ? 'none' : $curr_email;
|
309 |
}
|
310 |
}
|
311 |
+
|
312 |
+
// Drop if data empty
|
313 |
+
if(count($data) == 0)
|
314 |
+
die('1');
|
315 |
+
|
316 |
$data=implode(',',$data);
|
317 |
+
|
318 |
+
$request=Array();
|
319 |
+
$request['method_name'] = 'spam_check_cms';
|
320 |
+
$request['auth_key'] = $ct_options['apikey'];
|
321 |
+
$request['data'] = $data;
|
322 |
+
$request['date'] = $curr_date;
|
323 |
+
|
324 |
+
$url='https://api.cleantalk.org';
|
325 |
|
326 |
if(!function_exists('sendRawRequest'))
|
327 |
require_once('cleantalk.class.php');
|
328 |
|
329 |
$result=sendRawRequest($url, $request, false, 5);
|
330 |
|
331 |
+
if(empty($result)){
|
332 |
+
echo "Connection error";
|
333 |
+
}else{
|
334 |
+
|
335 |
+
$result=json_decode($result);
|
336 |
+
if(isset($result->error_message)){
|
337 |
+
|
338 |
+
// Data not set, marks comments as checked to avoid loops.
|
339 |
+
if (isset($result->error_no) && $result->error_no == 8) { // Data not set.
|
340 |
+
for($i=0;$i<sizeof($c);$i++) {
|
341 |
+
add_comment_meta($c[$i]->comment_ID,'ct_checked',date("Y-m-d H:m:s"),true);
|
342 |
+
}
|
343 |
+
print 1;
|
344 |
+
}else
|
345 |
+
print "Server response: ".$result->error_message;
|
346 |
+
|
347 |
+
}else{
|
348 |
+
for($i=0;$i<sizeof($c);$i++){
|
349 |
+
|
350 |
+
|
351 |
+
$mark_spam_ip = false;
|
352 |
+
$mark_spam_email = false;
|
|
|
|
|
353 |
|
354 |
+
add_comment_meta($c[$i]->comment_ID,'ct_checked',date("Y-m-d H:m:s"),true);
|
355 |
+
$uip=$c[$i]->comment_author_IP;
|
356 |
+
$uim=$c[$i]->comment_author_email;
|
357 |
+
|
358 |
+
if(isset($result->data->$uip) && $result->data->$uip->appears == 1)
|
359 |
+
$mark_spam_ip = true;
|
360 |
+
|
361 |
+
if(isset($result->data->$uim) && $result->data->$uim->appears==1)
|
362 |
+
$mark_spam_email = true;
|
363 |
+
|
364 |
+
if ($mark_spam_ip || $mark_spam_email)
|
365 |
+
add_comment_meta($c[$i]->comment_ID,'ct_marked_as_spam','1',true);
|
366 |
+
|
367 |
}
|
368 |
+
print 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
}
|
|
|
370 |
}
|
371 |
+
}else{
|
|
|
|
|
372 |
print 0;
|
373 |
}
|
374 |
|
375 |
die;
|
376 |
}
|
377 |
|
378 |
+
function ct_ajax_info_comments($direct_call = true){
|
379 |
+
|
380 |
+
if (!$direct_call)
|
|
|
381 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
|
|
382 |
|
383 |
+
// Total comments
|
384 |
$cnt=get_comments(Array('count'=>true));
|
385 |
|
386 |
+
// Spam comments
|
387 |
$args_spam = array(
|
388 |
'meta_query' => array(
|
389 |
Array(
|
394 |
),
|
395 |
'count'=>true
|
396 |
);
|
|
|
397 |
$cnt_spam=get_comments($args_spam);
|
398 |
|
399 |
+
// Already checked by Cleantalk
|
400 |
$args_checked1=array(
|
401 |
'meta_query' => array(
|
402 |
Array(
|
403 |
'key' => 'ct_hash',
|
404 |
+
// 'value'=>'1',
|
405 |
'compare' => 'EXISTS'
|
406 |
)
|
407 |
),
|
408 |
'count'=>true
|
409 |
);
|
410 |
+
$cnt_checked1=get_comments($args_checked1);
|
411 |
+
|
412 |
+
// Checked comments
|
413 |
$args_checked2=array(
|
414 |
'meta_query' => array(
|
415 |
Array(
|
420 |
),
|
421 |
'count'=>true
|
422 |
);
|
423 |
+
$cnt_checked2 =get_comments($args_checked2);
|
424 |
|
425 |
+
// Total checked
|
426 |
+
$cnt_checked =$cnt_checked1 + $cnt_checked2;
|
|
|
427 |
|
428 |
+
// Bad comments (without IP and Email)
|
429 |
+
$args_bad=array(
|
430 |
+
'meta_query' => array(
|
431 |
+
Array(
|
432 |
+
'key' => 'ct_bad',
|
433 |
+
'value'=>'1',
|
434 |
+
'compare' => 'NUMERIC'
|
435 |
+
)
|
436 |
+
),
|
437 |
+
'count'=>true
|
438 |
+
);
|
439 |
+
$cnt_bad =get_comments($args_bad);
|
440 |
+
|
441 |
+
printf (__("Total comments %s. Checked %s. Found %s spam comments. %d bad comments (without IP or email).", 'cleantalk'), $cnt, $cnt_checked, $cnt_spam, $cnt_bad);
|
442 |
$backup_notice = ' ';
|
443 |
+
|
444 |
+
if ($cnt_spam > 0)
|
445 |
$backup_notice = __("Please do backup of WordPress database before delete any comments!", 'cleantalk');
|
446 |
+
|
447 |
print "<p>$backup_notice</p>";
|
448 |
+
if (!$direct_call)
|
449 |
die();
|
450 |
+
|
451 |
return null;
|
452 |
}
|
453 |
|
454 |
+
|
455 |
+
function ct_ajax_insert_comments(){
|
456 |
+
|
457 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
458 |
+
global $wpdb;
|
459 |
+
|
460 |
$time = current_time('mysql');
|
461 |
+
$to_insert = 20;
|
462 |
|
463 |
+
$result = $wpdb->get_results("SELECT network FROM `".$wpdb->base_prefix."cleantalk_sfw` LIMIT $to_insert;", ARRAY_A);
|
464 |
+
|
465 |
+
if($result){
|
466 |
+
$ip = array();
|
467 |
+
foreach($result as $value){
|
468 |
+
$ips[] = long2ip($value['network']);
|
469 |
}
|
470 |
+
unset($value);
|
471 |
+
|
472 |
+
$inserted = 0;
|
473 |
+
for($i=0; $i<$to_insert; $i++){
|
474 |
+
|
475 |
+
$rnd=mt_rand(1,100);
|
476 |
+
|
477 |
+
$email="stop_email@example.com";
|
478 |
+
|
479 |
+
$data = array(
|
480 |
+
'comment_post_ID' => 1,
|
481 |
+
'comment_author' => "author_$rnd",
|
482 |
+
'comment_author_email' => $email,
|
483 |
+
'comment_author_url' => 'http://',
|
484 |
+
'comment_content' => "comment content ".mt_rand(1,10000)." ".mt_rand(1,10000)." ".mt_rand(1,10000),
|
485 |
+
'comment_type' => '',
|
486 |
+
'comment_parent' => 0,
|
487 |
+
'user_id' => 1,
|
488 |
+
'comment_author_IP' => $ips[$i],
|
489 |
+
'comment_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)',
|
490 |
+
'comment_date' => $time,
|
491 |
+
'comment_approved' => 1,
|
492 |
+
);
|
493 |
+
|
494 |
+
wp_insert_comment($data);
|
495 |
+
$inserted++;
|
496 |
}
|
497 |
+
}else{
|
498 |
+
$inserted = '0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
}
|
500 |
+
|
501 |
+
print $inserted;
|
502 |
die();
|
503 |
}
|
504 |
|
505 |
+
function ct_ajax_delete_checked(){
|
|
|
|
|
506 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
507 |
+
foreach($_POST['ids'] as $key=>$value){
|
|
|
508 |
wp_delete_comment($value, false);
|
509 |
}
|
510 |
die();
|
511 |
}
|
512 |
|
513 |
+
function ct_ajax_delete_all(){
|
|
|
|
|
514 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
515 |
$args_spam = array(
|
516 |
'number'=>100,
|
538 |
);
|
539 |
$cnt_all=get_comments($args_spam);
|
540 |
|
541 |
+
for($i=0;$i<sizeof($c_spam);$i++){
|
|
|
542 |
wp_delete_comment($c_spam[$i]->comment_ID, false);
|
543 |
usleep(10000);
|
544 |
}
|
546 |
die();
|
547 |
}
|
548 |
|
549 |
+
function ct_ajax_clear_comments(){
|
|
|
|
|
550 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
551 |
global $wpdb;
|
552 |
+
$wpdb->query("delete from $wpdb->commentmeta where meta_key='ct_checked' or meta_key='ct_marked_as_spam' or meta_key='ct_bad';");
|
553 |
die();
|
554 |
}
|
555 |
|
556 |
/**
|
557 |
* Admin action 'comment_unapproved_to_approved' - Approve comment, delete from the deleting list
|
558 |
*/
|
559 |
+
function ct_comment_check_approve_comment(){
|
|
|
560 |
|
561 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
562 |
|
inc/cleantalk-common.php
CHANGED
@@ -185,7 +185,8 @@ function ct_base_call($params = array()) {
|
|
185 |
$ct_request->example = $params['example'];
|
186 |
$ct_request->sender_email = $params['sender_email'];
|
187 |
$ct_request->sender_nickname = $params['sender_nickname'];
|
188 |
-
|
|
|
189 |
$ct_request->agent = $ct_agent_version;
|
190 |
$ct_request->sender_info = $sender_info;
|
191 |
$ct_request->js_on = $params['checkjs'];
|
@@ -484,6 +485,7 @@ function ct_def_options() {
|
|
484 |
'check_comments_number' => '1',
|
485 |
'remove_old_spam' => '0',
|
486 |
'remove_comments_links' => '0', //Removes links from approved comments
|
|
|
487 |
//Data processing
|
488 |
'protect_logged_in' => '1', // Do anit-spam tests to for logged in users.
|
489 |
'use_ajax' => '1',
|
@@ -742,7 +744,10 @@ function ct_get_fields_any($arr, $message=array(), $email = null, $nickname = ar
|
|
742 |
'si_contact_action',
|
743 |
//Ninja Forms
|
744 |
'formData_id',
|
745 |
-
'formData_settings'
|
|
|
|
|
|
|
746 |
);
|
747 |
|
748 |
$skip_message_post = array( // Reset $message if we have a sign-up data
|
@@ -773,7 +778,7 @@ function ct_get_fields_any($arr, $message=array(), $email = null, $nickname = ar
|
|
773 |
|
774 |
//Skipping fields names with strings from (array)skip_fields_with_strings
|
775 |
foreach($skip_fields_with_strings as $needle){
|
776 |
-
if (
|
777 |
continue(2);
|
778 |
}
|
779 |
}unset($needle);
|
185 |
$ct_request->example = $params['example'];
|
186 |
$ct_request->sender_email = $params['sender_email'];
|
187 |
$ct_request->sender_nickname = $params['sender_nickname'];
|
188 |
+
// $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
189 |
+
$ct_request->sender_ip = cleantalk_get_real_ip();
|
190 |
$ct_request->agent = $ct_agent_version;
|
191 |
$ct_request->sender_info = $sender_info;
|
192 |
$ct_request->js_on = $params['checkjs'];
|
485 |
'check_comments_number' => '1',
|
486 |
'remove_old_spam' => '0',
|
487 |
'remove_comments_links' => '0', //Removes links from approved comments
|
488 |
+
'show_check_links' => '1', //Shows check link to Cleantalk's DB. And allowing to control comments form public page.
|
489 |
//Data processing
|
490 |
'protect_logged_in' => '1', // Do anit-spam tests to for logged in users.
|
491 |
'use_ajax' => '1',
|
744 |
'si_contact_action',
|
745 |
//Ninja Forms
|
746 |
'formData_id',
|
747 |
+
'formData_settings',
|
748 |
+
//E_signature
|
749 |
+
'recipient_signature',
|
750 |
+
'output_\d+_\w{0,2}'
|
751 |
);
|
752 |
|
753 |
$skip_message_post = array( // Reset $message if we have a sign-up data
|
778 |
|
779 |
//Skipping fields names with strings from (array)skip_fields_with_strings
|
780 |
foreach($skip_fields_with_strings as $needle){
|
781 |
+
if (preg_match("/".$needle."/", $prev_name.$key) == 1){
|
782 |
continue(2);
|
783 |
}
|
784 |
}unset($needle);
|
inc/cleantalk-public.php
CHANGED
@@ -51,7 +51,8 @@ function ct_init() {
|
|
51 |
print "<script>
|
52 |
if(document.forms[0].submit != 'undefined'){
|
53 |
var objects = document.getElementsByName('submit');
|
54 |
-
|
|
|
55 |
}
|
56 |
document.forms[0].submit();
|
57 |
</script>";
|
@@ -1661,7 +1662,8 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
|
|
1661 |
$ct_request = new CleantalkRequest();
|
1662 |
$ct_request->auth_key = $ct_options['apikey'];
|
1663 |
$ct_request->sender_email = $user_email;
|
1664 |
-
$ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
|
|
1665 |
$ct_request->sender_nickname = $sanitized_user_login;
|
1666 |
$ct_request->agent = $ct_agent_version;
|
1667 |
$ct_request->sender_info = $sender_info;
|
@@ -2361,7 +2363,8 @@ function ct_s2member_registration_test() {
|
|
2361 |
|
2362 |
$ct_request->auth_key = $ct_options['apikey'];
|
2363 |
$ct_request->sender_email = $sender_email;
|
2364 |
-
$ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
|
|
2365 |
$ct_request->sender_nickname = $sender_nickname;
|
2366 |
$ct_request->agent = $ct_agent_version;
|
2367 |
$ct_request->sender_info = $sender_info;
|
@@ -2406,19 +2409,16 @@ function ct_contact_form_validate() {
|
|
2406 |
$ct_data = ct_get_data();
|
2407 |
|
2408 |
if($cleantalk_executed)
|
2409 |
-
{
|
2410 |
return null;
|
2411 |
-
|
2412 |
if(isset($cleantalk_url_exclusions))
|
2413 |
-
|
2414 |
-
$ct_cnt=sizeof($cleantalk_url_exclusions);
|
2415 |
-
}
|
2416 |
else
|
2417 |
-
|
2418 |
-
|
2419 |
-
}
|
2420 |
//@header("CtExclusions: ".$ct_cnt);
|
2421 |
cleantalk_debug("CtExclusions", $ct_cnt);
|
|
|
2422 |
if (@sizeof($_POST)==0 ||
|
2423 |
(isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
|
2424 |
(isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
|
@@ -2449,15 +2449,15 @@ function ct_contact_form_validate() {
|
|
2449 |
(isset($_POST['wc_reset_password'], $_POST['_wpnonce'], $_POST['_wp_http_referer'])) || //WooCommerce recovery password form
|
2450 |
(isset($_POST['woocommerce-login-nonce'], $_POST['login'], $_POST['password'], $_POST['_wp_http_referer'])) || //WooCommerce login form
|
2451 |
(isset($_POST['ccf_form']) && intval($_POST['ccf_form']) == 1) ||
|
2452 |
-
(isset($_POST['contact_tags']) && strpos($_POST['contact_tags'], 'MBR:') !== false)
|
|
|
2453 |
) {
|
2454 |
return null;
|
2455 |
}
|
2456 |
|
2457 |
// Do not execute anti-spam test for logged in users.
|
2458 |
-
if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $ct_options['protect_logged_in'] != 1)
|
2459 |
return null;
|
2460 |
-
}
|
2461 |
|
2462 |
//Skip the test if the checkout setting is unset && and it's not WooCommerce
|
2463 |
if($ct_options['wc_checkout_test'] == 0 && strpos($_SERVER['REQUEST_URI'],'wc-ajax=checkout') && strpos($_POST['_wp_http_referer'],'wc-ajax=update_order_review'))
|
@@ -2479,7 +2479,7 @@ function ct_contact_form_validate() {
|
|
2479 |
}
|
2480 |
|
2481 |
$ct_temp_msg_data = ct_get_fields_any($_POST);
|
2482 |
-
|
2483 |
$sender_email = ($ct_temp_msg_data['email'] ? $ct_temp_msg_data['email'] : '');
|
2484 |
$sender_nickname = ($ct_temp_msg_data['nickname'] ? $ct_temp_msg_data['nickname'] : '');
|
2485 |
$subject = ($ct_temp_msg_data['subject'] ? $ct_temp_msg_data['subject'] : '');
|
@@ -2517,7 +2517,7 @@ function ct_contact_form_validate() {
|
|
2517 |
$tmp=$_POST['TellAFriend_Link'];
|
2518 |
unset($_POST['TellAFriend_Link']);
|
2519 |
}
|
2520 |
-
|
2521 |
//@header("CtBaseCallBefore: 1");
|
2522 |
cleantalk_debug("CtBaseCallBefore", "1");
|
2523 |
|
@@ -2530,6 +2530,7 @@ function ct_contact_form_validate() {
|
|
2530 |
'sender_info' => get_sender_info(),
|
2531 |
'checkjs' => $checkjs
|
2532 |
));
|
|
|
2533 |
//@header("CtBaseCall: Executed");
|
2534 |
cleantalk_debug("CtBaseCall", "Executed");
|
2535 |
|
@@ -2626,7 +2627,8 @@ function ct_contact_form_validate() {
|
|
2626 |
die;
|
2627 |
// Enfold Theme Contact Form. Using $contact_form
|
2628 |
}elseif(!empty($contact_form) && $contact_form == 'enfold_theme_contact_form'){
|
2629 |
-
|
|
|
2630 |
}else{
|
2631 |
ct_die(null, null);
|
2632 |
}
|
@@ -2825,4 +2827,99 @@ function ct_print_form($arr,$k)
|
|
2825 |
}
|
2826 |
}
|
2827 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2828 |
?>
|
51 |
print "<script>
|
52 |
if(document.forms[0].submit != 'undefined'){
|
53 |
var objects = document.getElementsByName('submit');
|
54 |
+
if(objects.length > 0)
|
55 |
+
document.forms[0].removeChild(objects[0]);
|
56 |
}
|
57 |
document.forms[0].submit();
|
58 |
</script>";
|
1662 |
$ct_request = new CleantalkRequest();
|
1663 |
$ct_request->auth_key = $ct_options['apikey'];
|
1664 |
$ct_request->sender_email = $user_email;
|
1665 |
+
// $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
1666 |
+
$ct_request->sender_ip = cleantalk_get_real_ip();
|
1667 |
$ct_request->sender_nickname = $sanitized_user_login;
|
1668 |
$ct_request->agent = $ct_agent_version;
|
1669 |
$ct_request->sender_info = $sender_info;
|
2363 |
|
2364 |
$ct_request->auth_key = $ct_options['apikey'];
|
2365 |
$ct_request->sender_email = $sender_email;
|
2366 |
+
// $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
|
2367 |
+
$ct_request->sender_ip = cleantalk_get_real_ip();
|
2368 |
$ct_request->sender_nickname = $sender_nickname;
|
2369 |
$ct_request->agent = $ct_agent_version;
|
2370 |
$ct_request->sender_info = $sender_info;
|
2409 |
$ct_data = ct_get_data();
|
2410 |
|
2411 |
if($cleantalk_executed)
|
|
|
2412 |
return null;
|
2413 |
+
|
2414 |
if(isset($cleantalk_url_exclusions))
|
2415 |
+
$ct_cnt = count($cleantalk_url_exclusions);
|
|
|
|
|
2416 |
else
|
2417 |
+
$ct_cnt = 0;
|
2418 |
+
|
|
|
2419 |
//@header("CtExclusions: ".$ct_cnt);
|
2420 |
cleantalk_debug("CtExclusions", $ct_cnt);
|
2421 |
+
|
2422 |
if (@sizeof($_POST)==0 ||
|
2423 |
(isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
|
2424 |
(isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
|
2449 |
(isset($_POST['wc_reset_password'], $_POST['_wpnonce'], $_POST['_wp_http_referer'])) || //WooCommerce recovery password form
|
2450 |
(isset($_POST['woocommerce-login-nonce'], $_POST['login'], $_POST['password'], $_POST['_wp_http_referer'])) || //WooCommerce login form
|
2451 |
(isset($_POST['ccf_form']) && intval($_POST['ccf_form']) == 1) ||
|
2452 |
+
(isset($_POST['contact_tags']) && strpos($_POST['contact_tags'], 'MBR:') !== false) ||
|
2453 |
+
(strpos($_SERVER['REQUEST_URI'], 'bizuno.php') && !empty($_POST['bizPass']))
|
2454 |
) {
|
2455 |
return null;
|
2456 |
}
|
2457 |
|
2458 |
// Do not execute anti-spam test for logged in users.
|
2459 |
+
if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $ct_options['protect_logged_in'] != 1)
|
2460 |
return null;
|
|
|
2461 |
|
2462 |
//Skip the test if the checkout setting is unset && and it's not WooCommerce
|
2463 |
if($ct_options['wc_checkout_test'] == 0 && strpos($_SERVER['REQUEST_URI'],'wc-ajax=checkout') && strpos($_POST['_wp_http_referer'],'wc-ajax=update_order_review'))
|
2479 |
}
|
2480 |
|
2481 |
$ct_temp_msg_data = ct_get_fields_any($_POST);
|
2482 |
+
|
2483 |
$sender_email = ($ct_temp_msg_data['email'] ? $ct_temp_msg_data['email'] : '');
|
2484 |
$sender_nickname = ($ct_temp_msg_data['nickname'] ? $ct_temp_msg_data['nickname'] : '');
|
2485 |
$subject = ($ct_temp_msg_data['subject'] ? $ct_temp_msg_data['subject'] : '');
|
2517 |
$tmp=$_POST['TellAFriend_Link'];
|
2518 |
unset($_POST['TellAFriend_Link']);
|
2519 |
}
|
2520 |
+
|
2521 |
//@header("CtBaseCallBefore: 1");
|
2522 |
cleantalk_debug("CtBaseCallBefore", "1");
|
2523 |
|
2530 |
'sender_info' => get_sender_info(),
|
2531 |
'checkjs' => $checkjs
|
2532 |
));
|
2533 |
+
|
2534 |
//@header("CtBaseCall: Executed");
|
2535 |
cleantalk_debug("CtBaseCall", "Executed");
|
2536 |
|
2627 |
die;
|
2628 |
// Enfold Theme Contact Form. Using $contact_form
|
2629 |
}elseif(!empty($contact_form) && $contact_form == 'enfold_theme_contact_form'){
|
2630 |
+
echo "<div id='ajaxresponse_1' class='ajaxresponse ajaxresponse_1' style='display: block;'><div id='ajaxresponse_1' class='ajaxresponse ajaxresponse_1'><h3 class='avia-form-success'>Antispam by CleanTalk: ".$ct_result->comment."</h3><a href='.'><-Back</a></div></div>";
|
2631 |
+
die();
|
2632 |
}else{
|
2633 |
ct_die(null, null);
|
2634 |
}
|
2827 |
}
|
2828 |
}
|
2829 |
|
2830 |
+
/**
|
2831 |
+
* Attaches public scripts and styles.
|
2832 |
+
*/
|
2833 |
+
function ct_enqueue_scripts_public($hook){
|
2834 |
+
|
2835 |
+
global $cleantalk_plugin_version, $current_user, $ct_data, $ct_options;
|
2836 |
+
|
2837 |
+
if(in_array("administrator", $current_user->roles)){
|
2838 |
+
|
2839 |
+
if(!empty($ct_options['show_check_links'])){
|
2840 |
+
|
2841 |
+
$ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
|
2842 |
+
$user_token = !empty($ct_data['user_token']) ? $ct_data['user_token'] : null;
|
2843 |
+
|
2844 |
+
wp_localize_script( 'jquery', 'ctPublic', array(
|
2845 |
+
'ct_ajax_nonce' => $ajax_nonce,
|
2846 |
+
'ct_ajaxurl' => admin_url('admin-ajax.php'),
|
2847 |
+
'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk'), $user_token ? "<a target='_blank' href=https://cleantalk.org/my/show_requests?user_token={$user_token}&cp_mode=antispam>" : '', $user_token ? "</a>" : ''),
|
2848 |
+
'ct_feedback_error' => __('Error occured while sending feedback.', 'cleantalk'),
|
2849 |
+
'ct_feedback_no_hash' => __('Feedback wasn\'t sent. There is no associated request.', 'cleantalk'),
|
2850 |
+
'ct_debug_ajax' => '0'
|
2851 |
+
));
|
2852 |
+
|
2853 |
+
wp_enqueue_style ('ct_public_css', plugins_url('/cleantalk-spam-protect/assets/css/cleantalk-public.css'), array(), $cleantalk_plugin_version, 'all');
|
2854 |
+
wp_enqueue_script('ct_public_js', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-public.js'), array(), $cleantalk_plugin_version, true);
|
2855 |
+
|
2856 |
+
}
|
2857 |
+
}
|
2858 |
+
}
|
2859 |
+
|
2860 |
+
/**
|
2861 |
+
* Reassign callbackback function for the bootom of comment output.
|
2862 |
+
*/
|
2863 |
+
function ct_wp_list_comments_args($options){
|
2864 |
+
|
2865 |
+
global $current_user, $ct_options;
|
2866 |
+
|
2867 |
+
if(in_array("administrator", $current_user->roles))
|
2868 |
+
if(!empty($ct_options['show_check_links']))
|
2869 |
+
$options['end-callback'] = 'ct_comments_output';
|
2870 |
+
|
2871 |
+
return $options;
|
2872 |
+
}
|
2873 |
+
|
2874 |
+
/**
|
2875 |
+
* Callback function for the bootom comment output.
|
2876 |
+
*/
|
2877 |
+
function ct_comments_output($curr_comment, $param2, $wp_list_comments_args){
|
2878 |
+
|
2879 |
+
$email = $curr_comment->comment_author_email;
|
2880 |
+
$ip = $curr_comment->comment_author_IP;
|
2881 |
+
$id = $curr_comment->comment_ID;
|
2882 |
+
|
2883 |
+
$settings_link = '/wp-admin/'.(is_network_admin() ? "settings.php?page=cleantalk" : "options-general.php?page=cleantalk");
|
2884 |
+
|
2885 |
+
echo "<div class='ct_comment_info'>";
|
2886 |
+
|
2887 |
+
echo "<p class='ct_comment_info_title'>".__('Sender info', 'cleantalk')."</p>";
|
2888 |
+
|
2889 |
+
echo "<p class='ct_comment_logo_title'>
|
2890 |
+
".__('by', 'cleantalk')." <a href='{$settings_link}' target='_blank'><img class='ct_comment_logo_img' src='".plugins_url()."/cleantalk-spam-protect/inc/images/logo_color.png'> CleanTalk</a>
|
2891 |
+
</p>";
|
2892 |
+
|
2893 |
+
// Outputs email if exists
|
2894 |
+
if($email)
|
2895 |
+
echo "$email"
|
2896 |
+
."<a href='https://cleantalk.org/blacklists/$email' target='_blank' title='https://cleantalk.org/blacklists/$email'>"
|
2897 |
+
." <img src='".plugins_url()."/cleantalk-spam-protect/inc/images/new_window.gif' border='0' style='float:none'/>"
|
2898 |
+
."</a> | ";
|
2899 |
+
else
|
2900 |
+
echo __('No email', 'cleantalk').' | ';
|
2901 |
+
|
2902 |
+
// Outputs IP if exists
|
2903 |
+
if($ip)
|
2904 |
+
echo "$ip"
|
2905 |
+
."<a href='https://cleantalk.org/blacklists/$ip' target='_blank' title='https://cleantalk.org/blacklists/$ip'>"
|
2906 |
+
." <img src='".plugins_url()."/cleantalk-spam-protect/inc/images/new_window.gif' border='0' style='float:none'/>"
|
2907 |
+
."</a> | ";
|
2908 |
+
else
|
2909 |
+
echo __('No IP', 'cleantalk').' | ';
|
2910 |
+
|
2911 |
+
echo "<span commentid='$id' class='ct_this_is ct_this_is_spam' href='#'>".__('Mark as spam', 'cleantalk')."</span>";
|
2912 |
+
echo "<span commentid='$id' class='ct_this_is ct_this_is_not_spam ct_hidden' href='#'>".__('Unspam', 'cleantalk')."</span>";
|
2913 |
+
echo "<p class='ct_feedback_wrap'>";
|
2914 |
+
echo "<span class='ct_feedback_result ct_feedback_result_spam'>".__('Marked as spam.', 'cleantalk')."</span>";
|
2915 |
+
echo "<span class='ct_feedback_result ct_feedback_result_not_spam'>".__('Marked as not spam.', 'cleantalk')."</span>";
|
2916 |
+
echo " <span class='ct_feedback_msg'><span>";
|
2917 |
+
echo "</p>";
|
2918 |
+
|
2919 |
+
echo "</div>";
|
2920 |
+
|
2921 |
+
// Ending comment output
|
2922 |
+
echo "</{$wp_list_comments_args['style']}>";
|
2923 |
+
}
|
2924 |
+
|
2925 |
?>
|
inc/cleantalk-rel.js
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
//< target : http://wp2.host/wp-admin/comment.php?c=26&action=approvecomment&_wpnonce=338ed90533
|
2 |
-
//> target : http://wp2.host/wp-admin/comment.php?c=26&action=unapprovecomment&_wpnonce=338ed90533
|
3 |
-
|
4 |
-
//< data : action=dim-comment&id=26&dimClass=unapproved&_ajax_nonce=338ed90533&new=approved
|
5 |
-
//> data : action=dim-comment&id=26&dimClass=unapproved&_ajax_nonce=338ed90533&new=unapproved
|
6 |
-
|
7 |
-
jQuery(document).ajaxSuccess(function(e, xhr, settings) {
|
8 |
-
if(settings['target'].toString().indexOf('action=approvecomment') > -1){
|
9 |
-
window.location.reload();
|
10 |
-
}
|
11 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/cleantalk-sfw.class.php
CHANGED
@@ -73,9 +73,18 @@ class CleanTalkSFW
|
|
73 |
$sfw_die_page=str_replace("{REMOTE_ADDRESS}",$this->blocked_ip,$sfw_die_page);
|
74 |
$sfw_die_page=str_replace("{REQUEST_URI}",$_SERVER['REQUEST_URI'],$sfw_die_page);
|
75 |
$sfw_die_page=str_replace("{SFW_COOKIE}",md5($this->blocked_ip.$ct_options['apikey']),$sfw_die_page);
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
wp_die( $sfw_die_page, "Blacklisted", Array('response'=>403) );
|
80 |
}
|
81 |
|
73 |
$sfw_die_page=str_replace("{REMOTE_ADDRESS}",$this->blocked_ip,$sfw_die_page);
|
74 |
$sfw_die_page=str_replace("{REQUEST_URI}",$_SERVER['REQUEST_URI'],$sfw_die_page);
|
75 |
$sfw_die_page=str_replace("{SFW_COOKIE}",md5($this->blocked_ip.$ct_options['apikey']),$sfw_die_page);
|
76 |
+
|
77 |
+
if(headers_sent() === false){
|
78 |
+
header("Cache-Control: no-store, no-cache, must-revalidate");
|
79 |
+
header("Pragma: no-cache");
|
80 |
+
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
|
81 |
+
header("Expires: 0");
|
82 |
+
header("HTTP/1.0 403 Forbidden");
|
83 |
+
$sfw_die_page = str_replace("{GENERATED}", "", $sfw_die_page);
|
84 |
+
}else{
|
85 |
+
$sfw_die_page = str_replace("{GENERATED}", "<h2 class='second'>The page was generated at ".date("D, d M Y H:i:s")."</h2>",$sfw_die_page);
|
86 |
+
}
|
87 |
+
|
88 |
wp_die( $sfw_die_page, "Blacklisted", Array('response'=>403) );
|
89 |
}
|
90 |
|
inc/cleantalk-updater.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function ct_run_update_actions($current_version, $new_version){
|
4 |
+
|
5 |
+
return true;
|
6 |
+
|
7 |
+
}
|
8 |
+
|
9 |
+
?>
|
inc/cleantalk-users-editscreen.js
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
2 |
-
jQuery('#changeit').after(' <a href="users.php?page=ct_check_users" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctUsersScreen.spambutton_users_text+'</a>' +
|
3 |
-
' <a href="users.php?page=ct_check_users&ct_worked=1" class="button" style="margin:1px 0 0 0; display: inline-block;">'+ctUsersScreen.spambutton_users_text_show+'</a>');
|
4 |
-
});
|
|
|
|
|
|
|
|
inc/cleantalk-users.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php
|
2 |
add_action('admin_menu', 'ct_add_users_menu');
|
3 |
-
add_action('admin_print_footer_scripts','ct_add_users_button');
|
4 |
add_action( 'wp_ajax_ajax_check_users', 'ct_ajax_check_users' );
|
5 |
add_action( 'wp_ajax_ajax_info_users', 'ct_ajax_info_users' );
|
6 |
add_action( 'wp_ajax_ajax_insert_users', 'ct_ajax_insert_users' );
|
@@ -11,70 +10,60 @@ add_action( 'wp_ajax_ajax_ct_approve_user', 'ct_usercheck_approve_user' );
|
|
11 |
add_action( 'wp_ajax_ajax_ct_get_csv_file', 'ct_usercheck_get_csv_file' );
|
12 |
|
13 |
function ct_add_users_menu(){
|
14 |
-
|
15 |
if(current_user_can('activate_plugins'))
|
16 |
add_users_page( __("Check for spam", 'cleantalk'), __("Check for spam", 'cleantalk'), 'read', 'ct_check_users', 'ct_show_users_page');
|
17 |
-
|
18 |
}
|
19 |
|
20 |
-
function ct_show_users_page()
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
<div class="wrap">
|
25 |
<h2><?php echo $ct_plugin_name; ?></h2><br />
|
26 |
-
<?php
|
27 |
-
global $wpdb;
|
28 |
-
$r=$wpdb->get_results("
|
29 |
-
SELECT
|
30 |
-
COUNT(all_users.ID) - COUNT(meta_users.user_id) AS cnt_unchecked
|
31 |
-
FROM $wpdb->users all_users
|
32 |
-
LEFT JOIN $wpdb->usermeta meta_users
|
33 |
-
ON all_users.ID = meta_users.user_id
|
34 |
-
WHERE meta_users.meta_key='ct_checked'
|
35 |
-
OR meta_users.meta_key='ct_hash';
|
36 |
-
");
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
/*$args_spam = array(
|
41 |
-
'meta_query' => array(
|
42 |
-
Array(
|
43 |
-
'key' => 'ct_marked_as_spam',
|
44 |
-
'compare' => 'EXISTS'
|
45 |
-
)
|
46 |
-
)
|
47 |
-
);*/
|
48 |
-
$r=$wpdb->get_results("select distinct count($wpdb->users.ID) as cnt from $wpdb->users inner join $wpdb->usermeta on $wpdb->users.ID=$wpdb->usermeta.user_id where $wpdb->usermeta.meta_key='ct_marked_as_spam';", ARRAY_A);
|
49 |
-
$cnt_spam1=$r[0]['cnt'];
|
50 |
-
?>
|
51 |
-
|
52 |
<div id="ct_error_message" style="display:none">
|
53 |
<h3 style="text-align: center;width:90%;">
|
54 |
<?php _e("Ajax error. Process will be automatically restarted in 3 seconds. Status: ", 'cleantalk'); ?><span id="cleantalk_ajax_error"></span> (<span id="cleantalk_js_func"></span>)
|
55 |
</h3>
|
56 |
<h4 style="text-align:center;width:90%;">Please, check for JavaScript errors in your dashboard and and repair it.</h4>
|
57 |
</div>
|
|
|
|
|
58 |
<div id="ct_deleting_message" style="display:none">
|
59 |
<?php _e("Please wait for a while. CleanTalk is deleting spam users. Users left: ", 'cleantalk'); ?> <span id="cleantalk_users_left">
|
60 |
<?php echo $cnt_spam1;?>
|
61 |
</span>
|
62 |
</div>
|
63 |
-
|
64 |
-
|
65 |
-
</div>
|
66 |
<h3 id="ct_checking_users_status" style="text-align:center;width:90%;"><?php ct_ajax_info_users(true);?></h3>
|
|
|
|
|
67 |
<h3 id="ct_cooling_notice" style="text-align:center;width:90%;"></h3>
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
70 |
<?php _e("Please wait for a while. CleanTalk is checking all users via blacklist database at cleantalk.org. You will have option to delete found spam users after plugin finish.", 'cleantalk'); ?>
|
71 |
</div>
|
|
|
72 |
<?php
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
$page=intval($_GET['spam_page']);
|
77 |
-
}
|
78 |
$args_spam = array(
|
79 |
'meta_query' => array(
|
80 |
Array(
|
@@ -83,164 +72,177 @@ $cnt_spam1=$r[0]['cnt'];
|
|
83 |
'compare' => 'NUMERIC'
|
84 |
)
|
85 |
),
|
86 |
-
'number'
|
87 |
-
'offset'=>($page-1)
|
88 |
);
|
89 |
|
90 |
$c_spam=get_users($args_spam);
|
91 |
-
if($cnt_spam1>0)
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
?>
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
</th>
|
100 |
-
<th scope="col" id="author" class="manage-column column-slug"><?php _e('Username');?></th>
|
101 |
-
<th scope="col" id="comment" class="manage-column column-comment"><?php _e( 'Name' );;?></th>
|
102 |
-
<th scope="col" id="response" class="manage-column column-comment">E-mail</th>
|
103 |
-
<th scope="col" id="role" class="manage-column column-response sortable desc"><?php _e( 'Role' );?></th>
|
104 |
-
<th scope="col" id="posts" class="manage-column column-response sortable desc"><?php print _e( 'Posts' );?></th>
|
105 |
-
</thead>
|
106 |
-
<tbody id="the-comment-list" data-wp-lists="list:comment">
|
107 |
-
<?php
|
108 |
-
for($i=0;$i<sizeof($c_spam);$i++)
|
109 |
-
{
|
110 |
-
?>
|
111 |
-
<tr id="comment-<?php print $c_spam[$i]->ID; ?>" class="comment even thread-even depth-1 approved cleantalk_user" data-id="<?php print $c_spam[$i]->ID; ?>">
|
112 |
-
<th scope="row" class="check-column">
|
113 |
-
<label class="screen-reader-text" for="cb-select-<?php print $c_spam[$i]->ID; ?>">Select user</label>
|
114 |
-
<input id="cb-select-<?php print $c_spam[$i]->ID; ?>" type="checkbox" name="del_comments[]" value="<?php print $c_spam[$i]->comment_ID; ?>"/>
|
115 |
</th>
|
116 |
-
<
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
<br/>
|
124 |
-
<?php
|
125 |
-
$user_meta=get_user_meta($c_spam[$i]->ID, 'session_tokens', true);
|
126 |
-
if(is_array($user_meta))
|
127 |
-
{
|
128 |
-
$user_meta=array_values($user_meta);
|
129 |
-
}
|
130 |
-
$ip='';
|
131 |
-
if(@isset($user_meta[0]['ip']))
|
132 |
-
{
|
133 |
-
$ip=$user_meta[0]['ip'];
|
134 |
-
?>
|
135 |
-
<a href="user-edit.php?user_id=<?php print $c_spam[$i]->ID ; ?>"><?php print $ip ; ?></a>
|
136 |
-
<a href="https://cleantalk.org/blacklists/<?php print $ip ; ?>" target="_blank"><img src="<?php print plugin_dir_url(__FILE__); ?>images/new_window.gif" border="0" style="float:none"/></a>
|
137 |
-
<?php
|
138 |
-
}
|
139 |
-
?>
|
140 |
-
</td>
|
141 |
-
<td class="comment column-comment">
|
142 |
-
<div class="submitted-on">
|
143 |
-
<?php print $c_spam[$i]->data->display_name; ?>
|
144 |
-
<div style="height:16px; display: none;" id="cleantalk_button_set_<?php print $c_spam[$i]->ID; ?>">
|
145 |
-
<a href="#" class="cleantalk_delete_from_list_button" data-id="<?php print $c_spam[$i]->ID; ?>" style="color:#0a0;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Approve", "cleantalk"); ?></a>
|
146 |
-
|
|
147 |
-
<a href="#" class="cleantalk_delete_user_button" id="cleantalk_delete_user_<?php print $c_spam[$i]->ID; ?>" data-id="<?php print $c_spam[$i]->ID; ?>" style="color:#a00;display:none;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Delete", "cleantalk"); ?></a>
|
148 |
-
</div>
|
149 |
-
</div>
|
150 |
-
</td>
|
151 |
-
<td class="comment column-comment">
|
152 |
-
<?php print $c_spam[$i]->data->user_email; ?>
|
153 |
-
</td>
|
154 |
-
<td class="comment column-comment">
|
155 |
-
<?php
|
156 |
-
$info=get_userdata( $c_spam[$i]->ID );
|
157 |
-
print implode(', ', $info->roles);
|
158 |
-
?>
|
159 |
-
</td>
|
160 |
-
<td class="comment column-comment">
|
161 |
-
<?php
|
162 |
-
print count_user_posts($c_spam[$i]->ID);
|
163 |
-
?>
|
164 |
-
</td>
|
165 |
-
</tr>
|
166 |
-
<?php
|
167 |
-
}
|
168 |
-
if($cnt_spam1>30)
|
169 |
-
{
|
170 |
-
?>
|
171 |
-
<tr class="comment even thread-even depth-1 approved">
|
172 |
-
<td colspan="4">
|
173 |
<?php
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
?>
|
188 |
-
</
|
189 |
-
</
|
190 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
192 |
-
?>
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
<?php
|
200 |
}
|
201 |
-
|
202 |
-
print '<button class="button" id="ct_insert_users">'. __('Insert accounts', 'cleantalk'). '</button><br />';
|
203 |
?>
|
204 |
-
|
205 |
-
<br
|
206 |
<table>
|
207 |
<tr>
|
208 |
<td>
|
209 |
<button class="button" id="ct_check_users_button"><?php _e("Check for spam", 'cleantalk'); ?></button>
|
210 |
</td>
|
211 |
<td style="padding-left: 2em;">
|
212 |
-
|
|
|
|
|
213 |
</td>
|
214 |
</tr>
|
215 |
</table>
|
216 |
<?php
|
217 |
-
if($cnt_spam1>0)
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
</div>
|
228 |
-
|
229 |
-
<div>
|
230 |
-
<button class="button" id="ct_stop_deletion" style="display:none;"><?php _e("Stop deletion", 'cleantalk'); ?></button>
|
231 |
-
</div>
|
232 |
-
<div id='ct_csv_wrapper' style="display: none;"></div>
|
233 |
-
<?php
|
234 |
-
}
|
235 |
-
|
236 |
-
function ct_add_users_button()
|
237 |
-
{
|
238 |
-
global $cleantalk_plugin_version;
|
239 |
-
|
240 |
}
|
241 |
|
242 |
-
function ct_ajax_check_users()
|
243 |
-
|
244 |
global $ct_options,$ct_ip_penalty_days;
|
245 |
|
246 |
check_ajax_referer('ct_secret_nonce', 'security');
|
@@ -275,9 +277,9 @@ function ct_ajax_check_users()
|
|
275 |
foreach($u as $user_index => $user){
|
276 |
|
277 |
if(!isset($curr_date))
|
278 |
-
$curr_date = (substr($user->data->user_registered, 0,
|
279 |
|
280 |
-
if(substr($user->data->user_registered, 0,
|
281 |
unset($u[$user_index]);
|
282 |
|
283 |
}
|
@@ -311,6 +313,7 @@ function ct_ajax_check_users()
|
|
311 |
}
|
312 |
}
|
313 |
|
|
|
314 |
if(count($data) == 0)
|
315 |
die('1');
|
316 |
|
@@ -319,70 +322,72 @@ function ct_ajax_check_users()
|
|
319 |
$request=Array();
|
320 |
$request['method_name'] = 'spam_check_cms';
|
321 |
$request['auth_key'] = $ct_options['apikey'];
|
322 |
-
$request['data'] = $data;
|
|
|
323 |
$url='https://api.cleantalk.org';
|
324 |
if(!function_exists('sendRawRequest'))
|
325 |
require_once('cleantalk.class.php');
|
326 |
|
327 |
$result=sendRawRequest($url, $request, false, 5);
|
328 |
-
|
329 |
-
$result = json_decode($result);
|
330 |
|
331 |
-
if(
|
332 |
-
|
333 |
-
|
334 |
-
else{
|
335 |
|
336 |
-
|
337 |
-
$current_user = wp_get_current_user();
|
338 |
-
$filename = WP_PLUGIN_DIR."/cleantalk-spam-protect/check-results/user_check_by_{$current_user->user_login}.csv";
|
339 |
-
$text = "";
|
340 |
|
341 |
-
if(isset($
|
342 |
-
|
343 |
-
|
344 |
-
}else
|
345 |
-
$file_desc = fopen($filename, 'a+');
|
346 |
-
// End of Opening CSV
|
347 |
-
|
348 |
-
for($i=0;$i<sizeof($u);$i++){
|
349 |
-
|
350 |
-
update_user_meta($u[$i]->ID,'ct_checked',date("Y-m-d H:m:s"),true);
|
351 |
-
|
352 |
-
// Do not display forbidden roles.
|
353 |
-
foreach ($skip_roles as $role) {
|
354 |
-
if (in_array($role, $u[$i]->roles)){
|
355 |
-
delete_user_meta($u[$i]->ID, 'ct_marked_as_spam');
|
356 |
-
continue 2;
|
357 |
-
}
|
358 |
-
}
|
359 |
-
|
360 |
-
$mark_spam_ip = false;
|
361 |
-
$mark_spam_email = false;
|
362 |
-
$ip_update_time = 0;
|
363 |
-
|
364 |
-
$uip = $u[$i]->data->user_ip;
|
365 |
-
$uim = $u[$i]->data->user_email;
|
366 |
-
|
367 |
-
if(isset($result->data->$uip) && $result->data->$uip->appears == 1){
|
368 |
-
$mark_spam_ip = true;
|
369 |
-
$ip_update_time = strtotime($result->data->$uip->updated);
|
370 |
-
}
|
371 |
|
372 |
-
|
373 |
-
|
|
|
|
|
374 |
|
375 |
-
if
|
376 |
-
|
377 |
-
$text .=
|
378 |
-
|
379 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
}
|
381 |
-
|
|
|
|
|
382 |
}
|
383 |
-
fwrite($file_desc, $text);
|
384 |
-
fclose($file_desc);
|
385 |
-
print 1;
|
386 |
}
|
387 |
}else
|
388 |
print 0;
|
@@ -396,14 +401,20 @@ function ct_ajax_info_users($direct_call = false)
|
|
396 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
397 |
}
|
398 |
|
399 |
-
|
|
|
400 |
// All users
|
401 |
-
$r=$wpdb->get_results("
|
402 |
-
SELECT
|
403 |
-
COUNT(ID) AS cnt
|
404 |
-
FROM $wpdb->users
|
405 |
-
");
|
406 |
-
$cnt = $r[0]->cnt;
|
|
|
|
|
|
|
|
|
|
|
407 |
|
408 |
// Checked
|
409 |
$r=$wpdb->get_results("select distinct count($wpdb->users.ID) as cnt from $wpdb->users inner join $wpdb->usermeta on $wpdb->users.ID=$wpdb->usermeta.user_id where $wpdb->usermeta.meta_key='ct_checked' or $wpdb->usermeta.meta_key='ct_hash';");
|
@@ -433,8 +444,9 @@ function ct_ajax_info_users($direct_call = false)
|
|
433 |
function ct_ajax_insert_users()
|
434 |
{
|
435 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
|
|
436 |
|
437 |
-
|
438 |
|
439 |
/* DELETION
|
440 |
$users = get_users(array('search' => '*user_*', 'search_columns' => array('login', 'nicename')));
|
@@ -448,7 +460,7 @@ function ct_ajax_insert_users()
|
|
448 |
}
|
449 |
//*/
|
450 |
|
451 |
-
$result = $wpdb->get_results("SELECT network FROM `".$wpdb->base_prefix."cleantalk_sfw` LIMIT
|
452 |
|
453 |
if($result){
|
454 |
$ip = array();
|
@@ -458,8 +470,7 @@ function ct_ajax_insert_users()
|
|
458 |
unset($value);
|
459 |
|
460 |
$inserted = 0;
|
461 |
-
$
|
462 |
-
for($i=0; $i<20 ;$i++){
|
463 |
$rnd=mt_rand(1,10000000);
|
464 |
|
465 |
$user_name = "user_$rnd";
|
@@ -531,7 +542,7 @@ function ct_ajax_clear_users()
|
|
531 |
{
|
532 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
533 |
global $wpdb;
|
534 |
-
$wpdb->query("delete from $wpdb->usermeta where meta_key='
|
535 |
die();
|
536 |
}
|
537 |
|
1 |
<?php
|
2 |
add_action('admin_menu', 'ct_add_users_menu');
|
|
|
3 |
add_action( 'wp_ajax_ajax_check_users', 'ct_ajax_check_users' );
|
4 |
add_action( 'wp_ajax_ajax_info_users', 'ct_ajax_info_users' );
|
5 |
add_action( 'wp_ajax_ajax_insert_users', 'ct_ajax_insert_users' );
|
10 |
add_action( 'wp_ajax_ajax_ct_get_csv_file', 'ct_usercheck_get_csv_file' );
|
11 |
|
12 |
function ct_add_users_menu(){
|
|
|
13 |
if(current_user_can('activate_plugins'))
|
14 |
add_users_page( __("Check for spam", 'cleantalk'), __("Check for spam", 'cleantalk'), 'read', 'ct_check_users', 'ct_show_users_page');
|
|
|
15 |
}
|
16 |
|
17 |
+
function ct_show_users_page(){
|
18 |
+
global $ct_plugin_name, $wpdb;
|
19 |
+
|
20 |
+
// Getting total spam users
|
21 |
+
$r = $wpdb->get_results("
|
22 |
+
SELECT
|
23 |
+
DISTINCT COUNT($wpdb->users.ID) AS cnt
|
24 |
+
FROM $wpdb->users
|
25 |
+
INNER JOIN $wpdb->usermeta
|
26 |
+
ON $wpdb->users.ID = $wpdb->usermeta.user_id
|
27 |
+
WHERE $wpdb->usermeta.meta_key='ct_marked_as_spam';"
|
28 |
+
, ARRAY_A);
|
29 |
+
$cnt_spam1=$r[0]['cnt'];
|
30 |
+
?>
|
31 |
<div class="wrap">
|
32 |
<h2><?php echo $ct_plugin_name; ?></h2><br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
+
<!-- AJAX error message -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<div id="ct_error_message" style="display:none">
|
36 |
<h3 style="text-align: center;width:90%;">
|
37 |
<?php _e("Ajax error. Process will be automatically restarted in 3 seconds. Status: ", 'cleantalk'); ?><span id="cleantalk_ajax_error"></span> (<span id="cleantalk_js_func"></span>)
|
38 |
</h3>
|
39 |
<h4 style="text-align:center;width:90%;">Please, check for JavaScript errors in your dashboard and and repair it.</h4>
|
40 |
</div>
|
41 |
+
|
42 |
+
<!-- Deleting message -->
|
43 |
<div id="ct_deleting_message" style="display:none">
|
44 |
<?php _e("Please wait for a while. CleanTalk is deleting spam users. Users left: ", 'cleantalk'); ?> <span id="cleantalk_users_left">
|
45 |
<?php echo $cnt_spam1;?>
|
46 |
</span>
|
47 |
</div>
|
48 |
+
|
49 |
+
<!-- Main info -->
|
|
|
50 |
<h3 id="ct_checking_users_status" style="text-align:center;width:90%;"><?php ct_ajax_info_users(true);?></h3>
|
51 |
+
|
52 |
+
<!-- Cooling notice -->
|
53 |
<h3 id="ct_cooling_notice" style="text-align:center;width:90%;"></h3>
|
54 |
+
|
55 |
+
<!-- Preloader and working message -->
|
56 |
+
<div id="ct_preloader">
|
57 |
+
<img border=0 src="<?php print plugin_dir_url(__FILE__); ?>images/preloader.gif" />
|
58 |
+
</div>
|
59 |
+
<div id="ct_working_message">
|
60 |
<?php _e("Please wait for a while. CleanTalk is checking all users via blacklist database at cleantalk.org. You will have option to delete found spam users after plugin finish.", 'cleantalk'); ?>
|
61 |
</div>
|
62 |
+
|
63 |
<?php
|
64 |
+
// Pagination
|
65 |
+
$page = !empty($_GET['spam_page']) ? intval($_GET['spam_page']) : 1;
|
66 |
+
$on_page = 20;
|
|
|
|
|
67 |
$args_spam = array(
|
68 |
'meta_query' => array(
|
69 |
Array(
|
72 |
'compare' => 'NUMERIC'
|
73 |
)
|
74 |
),
|
75 |
+
'number'=>$on_page,
|
76 |
+
'offset'=>($page-1)*$on_page
|
77 |
);
|
78 |
|
79 |
$c_spam=get_users($args_spam);
|
80 |
+
if($cnt_spam1 > 0){
|
81 |
+
|
82 |
+
$pages = ceil(intval($cnt_spam1)/$on_page);
|
83 |
+
if($pages && $pages != 1){
|
84 |
+
echo "<div class='pagination'>"
|
85 |
+
."<b>Pages:</b>"
|
86 |
+
."<ul class='pagination'>";
|
87 |
+
for($i = 1; $i <= $pages; $i++){
|
88 |
+
echo "<li class='pagination'>"
|
89 |
+
."<a href='users.php?page=ct_check_users&spam_page=$i&ct_worked=1'>"
|
90 |
+
.($i == $page ? "<span class='current_page'>$i</span>" : $i)
|
91 |
+
."</a>"
|
92 |
+
."</li>";
|
93 |
+
}
|
94 |
+
echo "</ul>";
|
95 |
+
echo "</div>";
|
96 |
+
}
|
97 |
?>
|
98 |
+
<table class="widefat fixed comments" id="ct_check_users_table">
|
99 |
+
<thead>
|
100 |
+
<th scope="col" id="cb" class="manage-column column-cb check-column">
|
101 |
+
<label class="screen-reader-text" for="cb-select-all-1">Select All</label>
|
102 |
+
<input id="cb-select-all-1" type="checkbox"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
</th>
|
104 |
+
<th scope="col" id="author" class="manage-column column-slug"><?php _e('Username');?></th>
|
105 |
+
<th scope="col" id="comment" class="manage-column column-comment"><?php _e('Name');?></th>
|
106 |
+
<th scope="col" id="response" class="manage-column column-comment"><?php _e('E-mail');?></th>
|
107 |
+
<th scope="col" id="role" class="manage-column column-response sortable desc"><?php _e('Role');?></th>
|
108 |
+
<th scope="col" id="posts" class="manage-column column-response sortable desc"><?php _e('Posts');?></th>
|
109 |
+
</thead>
|
110 |
+
<tbody id="the-comment-list" data-wp-lists="list:comment">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
<?php
|
112 |
+
for($i=0;$i<sizeof($c_spam);$i++){
|
113 |
+
$id = $c_spam[$i]->ID;
|
114 |
+
$login = $c_spam[$i]->data->user_login;
|
115 |
+
$email = $c_spam[$i]->data->user_email;
|
116 |
+
|
117 |
+
echo "<tr id='comment-$id' class='comment even thread-even depth-1 approved cleantalk_user' data-id='$id'>"
|
118 |
+
."<th scope='row' class='check-column'>"
|
119 |
+
."<label class='screen-reader-text' for='cb-select-$id'>Select user</label>"
|
120 |
+
."<input id='cb-select-$id' type='checkbox' name='del_comments[]' />"
|
121 |
+
."</th>"
|
122 |
+
."<td class='author column-author' nowrap>"
|
123 |
+
."<strong>"
|
124 |
+
.get_avatar( $c_spam[$i]->data->ID , 32)
|
125 |
+
.$login
|
126 |
+
."</strong>"
|
127 |
+
."<br/>"
|
128 |
+
."<br/>";
|
129 |
+
|
130 |
+
// Outputs email if exists
|
131 |
+
if(!empty($email)){
|
132 |
+
echo "<a href='mailto:$email'>$email</a>"
|
133 |
+
."<a href='https://cleantalk.org/blacklists/$email' target='_blank'>"
|
134 |
+
." <img src='".plugin_dir_url(__FILE__)."images/new_window.gif' border='0' style='float:none' />"
|
135 |
+
."</a>";
|
136 |
+
}else{
|
137 |
+
echo "No email";
|
138 |
+
}
|
139 |
+
echo "<br/>";
|
140 |
+
|
141 |
+
// Outputs IP if exists
|
142 |
+
$user_meta = get_user_meta($id, 'session_tokens', true);
|
143 |
+
if(!empty($user_meta) && is_array($user_meta)){
|
144 |
+
$user_meta=array_values($user_meta);
|
145 |
+
if(!empty($user_meta[0]['ip'])){
|
146 |
+
$ip = $user_meta[0]['ip'];
|
147 |
+
echo "<a href='user-edit.php?user_id=$id'>$ip</a>"
|
148 |
+
."<a href='https://cleantalk.org/blacklists/$ip' target='_blank'>"
|
149 |
+
." <img src='".plugin_dir_url(__FILE__)."images/new_window.gif' border='0' style='float:none' />"
|
150 |
+
."</a>";
|
151 |
+
}else
|
152 |
+
echo "No IP adress";
|
153 |
+
}else
|
154 |
+
echo "No IP adress";
|
155 |
+
echo "</td>";
|
156 |
+
?>
|
157 |
+
|
158 |
+
|
159 |
+
<td class="comment column-comment">
|
160 |
+
<div class="submitted-on">
|
161 |
+
<?php print $c_spam[$i]->data->display_name; ?>
|
162 |
+
<div style="height:16px; display: none;" id="cleantalk_button_set_<?php print $id; ?>">
|
163 |
+
<a href="#" class="cleantalk_delete_from_list_button" data-id="<?php print $id; ?>" style="color:#0a0;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Approve", "cleantalk"); ?></a>
|
164 |
+
|
|
165 |
+
<a href="#" class="cleantalk_delete_user_button" id="cleantalk_delete_user_<?php print $id; ?>" data-id="<?php print $id; ?>" style="color:#a00;display:none;" onclick="return false;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';"><?php _e("Delete", "cleantalk"); ?></a>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
</td>
|
169 |
+
<td class="comment column-comment">
|
170 |
+
<?php print $email; ?>
|
171 |
+
</td>
|
172 |
+
<td class="comment column-comment">
|
173 |
+
<?php
|
174 |
+
$info=get_userdata( $id );
|
175 |
+
print implode(', ', $info->roles);
|
176 |
+
?>
|
177 |
+
</td>
|
178 |
+
<td class="comment column-comment">
|
179 |
+
<?php
|
180 |
+
print count_user_posts($id);
|
181 |
+
?>
|
182 |
+
</td>
|
183 |
+
</tr>
|
184 |
+
<?php
|
185 |
}
|
186 |
?>
|
187 |
+
</tbody>
|
188 |
+
</table>
|
189 |
<?php
|
190 |
+
// Pagination
|
191 |
+
if($pages && $pages != 1){
|
192 |
+
echo "<div class='pagination'>"
|
193 |
+
."<b>Pages:</b>"
|
194 |
+
."<ul class='pagination'>";
|
195 |
+
for($i = 1; $i <= $pages; $i++){
|
196 |
+
echo "<li class='pagination'>"
|
197 |
+
."<a href='users.php?page=ct_check_users&spam_page=$i&ct_worked=1'>"
|
198 |
+
.($i == $page ? "<span class='current_page'>$i</span>" : $i)
|
199 |
+
."</a>"
|
200 |
+
."</li>";
|
201 |
+
}
|
202 |
+
echo "</ul>";
|
203 |
+
echo "</div>";
|
204 |
}
|
205 |
+
?>
|
206 |
+
<div id="ct_tools_buttons" style="margin-top: 10px;">
|
207 |
+
<button class="button" id="ct_delete_all_users"><?php _e('Delete all users from list', 'cleantalk'); ?></button>
|
208 |
+
<button class="button" id="ct_delete_checked_users"><?php _e('Delete selected', 'cleantalk'); ?></button>
|
209 |
+
<button class="button" id="ct_get_csv_file"><?php _e('Download results in CSV', 'cleantalk'); ?></button>
|
210 |
+
</div>
|
211 |
+
<?php
|
|
|
212 |
}
|
213 |
+
echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<br /><button class="button" id="ct_insert_users">'. __('Insert accounts', 'cleantalk'). '</button><br />' : '';
|
|
|
214 |
?>
|
215 |
+
<br />
|
216 |
+
<br />
|
217 |
<table>
|
218 |
<tr>
|
219 |
<td>
|
220 |
<button class="button" id="ct_check_users_button"><?php _e("Check for spam", 'cleantalk'); ?></button>
|
221 |
</td>
|
222 |
<td style="padding-left: 2em;">
|
223 |
+
<div id="ct_info_message" class="wrap">
|
224 |
+
<?php _e("The plugin will check all users against blacklists database and show you senders that have spam activity on other websites. Just click 'Find spam users' to start.", 'cleantalk'); ?>
|
225 |
+
</div>
|
226 |
</td>
|
227 |
</tr>
|
228 |
</table>
|
229 |
<?php
|
230 |
+
if($cnt_spam1 > 0)
|
231 |
+
echo "<div id='ct_search_info'>"
|
232 |
+
."<br />"
|
233 |
+
.__("There is some differencies between blacklists database and our API mechanisms. Blacklists shows all history of spam activity, but our API (that used in spam checking) used another parameters, too: last day of activity, number of spam attacks during last days etc. This mechanisms help us to reduce number of false positivitie. So, there is nothing strange, if some emails/IPs will be not found by this checking.", 'cleantalk')
|
234 |
+
."</div>";
|
235 |
+
?>
|
236 |
+
<div>
|
237 |
+
<button class="button" id="ct_stop_deletion" style="display:none;"><?php _e("Stop deletion", 'cleantalk'); ?></button>
|
238 |
+
</div>
|
239 |
+
<div id='ct_csv_wrapper' style="display: none;"></div>
|
240 |
</div>
|
241 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
243 |
|
244 |
+
function ct_ajax_check_users(){
|
245 |
+
|
246 |
global $ct_options,$ct_ip_penalty_days;
|
247 |
|
248 |
check_ajax_referer('ct_secret_nonce', 'security');
|
277 |
foreach($u as $user_index => $user){
|
278 |
|
279 |
if(!isset($curr_date))
|
280 |
+
$curr_date = (substr($user->data->user_registered, 0, 10) ? substr($user->data->user_registered, 0, 10) : '');
|
281 |
|
282 |
+
if(substr($user->data->user_registered, 0, 10) != $curr_date)
|
283 |
unset($u[$user_index]);
|
284 |
|
285 |
}
|
313 |
}
|
314 |
}
|
315 |
|
316 |
+
// Drop if data empty
|
317 |
if(count($data) == 0)
|
318 |
die('1');
|
319 |
|
322 |
$request=Array();
|
323 |
$request['method_name'] = 'spam_check_cms';
|
324 |
$request['auth_key'] = $ct_options['apikey'];
|
325 |
+
$request['data'] = $data;
|
326 |
+
$request['date'] = $curr_date;
|
327 |
$url='https://api.cleantalk.org';
|
328 |
if(!function_exists('sendRawRequest'))
|
329 |
require_once('cleantalk.class.php');
|
330 |
|
331 |
$result=sendRawRequest($url, $request, false, 5);
|
|
|
|
|
332 |
|
333 |
+
if(empty($result)){
|
334 |
+
echo "Connection error";
|
335 |
+
}else{
|
|
|
336 |
|
337 |
+
$result = json_decode($result);
|
|
|
|
|
|
|
338 |
|
339 |
+
if(isset($result->error_message))
|
340 |
+
print "Server response: ".$result->error_message;
|
341 |
+
else{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
|
343 |
+
// Opening CSV file
|
344 |
+
$current_user = wp_get_current_user();
|
345 |
+
$filename = WP_PLUGIN_DIR."/cleantalk-spam-protect/check-results/user_check_by_{$current_user->user_login}.csv";
|
346 |
+
$text = "";
|
347 |
|
348 |
+
if(isset($_POST['new_check']) && $_POST['new_check'] == 'true'){
|
349 |
+
$file_desc = fopen($filename, 'w');
|
350 |
+
$text .= "login,email,ip".PHP_EOL;
|
351 |
+
}else
|
352 |
+
$file_desc = fopen($filename, 'a+');
|
353 |
+
// End of Opening CSV
|
354 |
+
|
355 |
+
for($i=0;$i<sizeof($u);$i++){
|
356 |
+
|
357 |
+
update_user_meta($u[$i]->ID,'ct_checked',date("Y-m-d H:m:s"),true);
|
358 |
+
|
359 |
+
// Do not display forbidden roles.
|
360 |
+
foreach ($skip_roles as $role) {
|
361 |
+
if (in_array($role, $u[$i]->roles)){
|
362 |
+
delete_user_meta($u[$i]->ID, 'ct_marked_as_spam');
|
363 |
+
continue 2;
|
364 |
+
}
|
365 |
+
}
|
366 |
+
|
367 |
+
$mark_spam_ip = false;
|
368 |
+
$mark_spam_email = false;
|
369 |
+
|
370 |
+
$uip = $u[$i]->data->user_ip;
|
371 |
+
$uim = $u[$i]->data->user_email;
|
372 |
+
|
373 |
+
if(isset($result->data->$uip) && $result->data->$uip->appears == 1)
|
374 |
+
$mark_spam_ip = true;
|
375 |
+
|
376 |
+
if(isset($result->data->$uim) && $result->data->$uim->appears==1)
|
377 |
+
$mark_spam_email = true;
|
378 |
+
|
379 |
+
if ($mark_spam_ip || $mark_spam_email){
|
380 |
+
update_user_meta($u[$i]->ID,'ct_marked_as_spam','1',true);
|
381 |
+
$text .= $u[$i]->user_login.',';
|
382 |
+
$text .= ($mark_spam_email ? $uim : '').',';
|
383 |
+
$text .= ($mark_spam_ip ? $uip : '').PHP_EOL;
|
384 |
+
}
|
385 |
+
|
386 |
}
|
387 |
+
fwrite($file_desc, $text);
|
388 |
+
fclose($file_desc);
|
389 |
+
print 1;
|
390 |
}
|
|
|
|
|
|
|
391 |
}
|
392 |
}else
|
393 |
print 0;
|
401 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
402 |
}
|
403 |
|
404 |
+
global $wpdb;
|
405 |
+
|
406 |
// All users
|
407 |
+
// $r=$wpdb->get_results("
|
408 |
+
// SELECT
|
409 |
+
// COUNT(ID) AS cnt
|
410 |
+
// FROM $wpdb->users
|
411 |
+
// ");
|
412 |
+
// $cnt = $r[0]->cnt;
|
413 |
+
$args = array(
|
414 |
+
'total_users' => true
|
415 |
+
);
|
416 |
+
$user_query = new WP_User_Query($args);
|
417 |
+
$cnt = $user_query->get_total();
|
418 |
|
419 |
// Checked
|
420 |
$r=$wpdb->get_results("select distinct count($wpdb->users.ID) as cnt from $wpdb->users inner join $wpdb->usermeta on $wpdb->users.ID=$wpdb->usermeta.user_id where $wpdb->usermeta.meta_key='ct_checked' or $wpdb->usermeta.meta_key='ct_hash';");
|
444 |
function ct_ajax_insert_users()
|
445 |
{
|
446 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
447 |
+
global $wpdb;
|
448 |
|
449 |
+
$to_insert = 20;
|
450 |
|
451 |
/* DELETION
|
452 |
$users = get_users(array('search' => '*user_*', 'search_columns' => array('login', 'nicename')));
|
460 |
}
|
461 |
//*/
|
462 |
|
463 |
+
$result = $wpdb->get_results("SELECT network FROM `".$wpdb->base_prefix."cleantalk_sfw` LIMIT $to_insert;", ARRAY_A);
|
464 |
|
465 |
if($result){
|
466 |
$ip = array();
|
470 |
unset($value);
|
471 |
|
472 |
$inserted = 0;
|
473 |
+
for($i=0; $i<$to_insert; $i++){
|
|
|
474 |
$rnd=mt_rand(1,10000000);
|
475 |
|
476 |
$user_name = "user_$rnd";
|
542 |
{
|
543 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
544 |
global $wpdb;
|
545 |
+
$wpdb->query("delete from $wpdb->usermeta where meta_key='ct_checked' or meta_key='ct_marked_as_spam' or meta_key='ct_bad';");
|
546 |
die();
|
547 |
}
|
548 |
|
inc/cleantalk.class.php
CHANGED
@@ -575,9 +575,8 @@ class Cleantalk {
|
|
575 |
// Removing non UTF8 characters from request, because non UTF8 or malformed characters break json_encode().
|
576 |
//
|
577 |
foreach ($request as $param => $value) {
|
578 |
-
if (!preg_match('//u', $value))
|
579 |
$request->{$param} = 'Nulled. Not UTF8 encoded or malformed.';
|
580 |
-
}
|
581 |
}
|
582 |
|
583 |
return $request;
|
@@ -592,6 +591,9 @@ class Cleantalk {
|
|
592 |
// Convert to array
|
593 |
$data = (array)json_decode(json_encode($data), true);
|
594 |
|
|
|
|
|
|
|
595 |
//Cleaning from 'null' values
|
596 |
$tmp_data = array();
|
597 |
foreach($data as $key => $value){
|
@@ -636,13 +638,18 @@ class Cleantalk {
|
|
636 |
}
|
637 |
else if ($this->ssl_on && $this->ssl_path!='') {
|
638 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
639 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,
|
640 |
curl_setopt($ch, CURLOPT_CAINFO, $this->ssl_path);
|
641 |
}
|
642 |
|
643 |
$result = curl_exec($ch);
|
644 |
if (!$result) {
|
645 |
$curl_error = curl_error($ch);
|
|
|
|
|
|
|
|
|
|
|
646 |
}
|
647 |
|
648 |
curl_close($ch);
|
@@ -724,13 +731,11 @@ class Cleantalk {
|
|
724 |
$msg->all_headers=json_encode($ct_tmp);
|
725 |
}
|
726 |
|
727 |
-
//$msg->remote_addr=$_SERVER['REMOTE_ADDR'];
|
728 |
-
//$msg->sender_info['remote_addr']=$_SERVER['REMOTE_ADDR'];
|
729 |
$si=(array)json_decode($msg->sender_info,true);
|
730 |
|
731 |
-
$si['remote_addr']
|
732 |
-
$msg->x_forwarded_for
|
733 |
-
$msg->x_real_ip
|
734 |
|
735 |
$msg->sender_info=json_encode($si);
|
736 |
if (((isset($this->work_url) && $this->work_url !== '') && ($this->server_changed + $this->server_ttl > time()))
|
@@ -919,44 +924,11 @@ class Cleantalk {
|
|
919 |
* Get user IP behind proxy server
|
920 |
*/
|
921 |
public function ct_session_ip( $data_ip ) {
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
$forwarded_ip = explode(",", $_SERVER['HTTP_X_FORWARDED_FOR']);
|
928 |
-
|
929 |
-
// Looking for first value in the list, it should be sender real IP address
|
930 |
-
if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/", $forwarded_ip[0])) {
|
931 |
-
return $data_ip;
|
932 |
-
}
|
933 |
-
|
934 |
-
$private_src_ip = false;
|
935 |
-
$private_nets = array(
|
936 |
-
'10.0.0.0/8',
|
937 |
-
'127.0.0.0/8',
|
938 |
-
'176.16.0.0/12',
|
939 |
-
'192.168.0.0/16',
|
940 |
-
);
|
941 |
-
|
942 |
-
foreach ($private_nets as $v) {
|
943 |
-
|
944 |
-
// Private IP found
|
945 |
-
if ($private_src_ip) {
|
946 |
-
continue;
|
947 |
-
}
|
948 |
-
|
949 |
-
if ($this->net_match($v, $data_ip)) {
|
950 |
-
$private_src_ip = true;
|
951 |
-
}
|
952 |
-
}
|
953 |
-
if ($private_src_ip) {
|
954 |
-
// Taking first IP from the list HTTP_X_FORWARDED_FOR
|
955 |
-
$data_ip = $forwarded_ip[0];
|
956 |
-
}
|
957 |
-
}
|
958 |
-
|
959 |
-
return $data_ip;*/
|
960 |
return cleantalk_get_real_ip();
|
961 |
}
|
962 |
|
@@ -1232,30 +1204,34 @@ if(!function_exists('apache_request_headers')){
|
|
1232 |
}
|
1233 |
}
|
1234 |
|
1235 |
-
function cleantalk_get_real_ip()
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
$
|
1244 |
-
}
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
$
|
1249 |
-
}
|
1250 |
-
elseif ( array_key_exists( 'HTTP_X_FORWARDED_FOR', $headers ))
|
1251 |
-
{
|
1252 |
-
$the_ip=explode(",", trim($headers['HTTP_X_FORWARDED_FOR']));
|
1253 |
-
$the_ip = trim($the_ip[0]);
|
1254 |
}
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1258 |
}
|
|
|
1259 |
return $the_ip;
|
1260 |
}
|
1261 |
|
575 |
// Removing non UTF8 characters from request, because non UTF8 or malformed characters break json_encode().
|
576 |
//
|
577 |
foreach ($request as $param => $value) {
|
578 |
+
if (!preg_match('//u', $value))
|
579 |
$request->{$param} = 'Nulled. Not UTF8 encoded or malformed.';
|
|
|
580 |
}
|
581 |
|
582 |
return $request;
|
591 |
// Convert to array
|
592 |
$data = (array)json_decode(json_encode($data), true);
|
593 |
|
594 |
+
$original_url = $url;
|
595 |
+
$original_data = $data;
|
596 |
+
|
597 |
//Cleaning from 'null' values
|
598 |
$tmp_data = array();
|
599 |
foreach($data as $key => $value){
|
638 |
}
|
639 |
else if ($this->ssl_on && $this->ssl_path!='') {
|
640 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
641 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
642 |
curl_setopt($ch, CURLOPT_CAINFO, $this->ssl_path);
|
643 |
}
|
644 |
|
645 |
$result = curl_exec($ch);
|
646 |
if (!$result) {
|
647 |
$curl_error = curl_error($ch);
|
648 |
+
// Use SSL next time, if error occurs.
|
649 |
+
if(!$this->ssl_on){
|
650 |
+
$this->ssl_on = true;
|
651 |
+
return $this->sendRequest($original_data, $original_url, $server_timeout);
|
652 |
+
}
|
653 |
}
|
654 |
|
655 |
curl_close($ch);
|
731 |
$msg->all_headers=json_encode($ct_tmp);
|
732 |
}
|
733 |
|
|
|
|
|
734 |
$si=(array)json_decode($msg->sender_info,true);
|
735 |
|
736 |
+
$si['remote_addr'] = $_SERVER['REMOTE_ADDR'];
|
737 |
+
$msg->x_forwarded_for = @$_SERVER['X_FORWARDED_FOR'];
|
738 |
+
$msg->x_real_ip = @$_SERVER['X_REAL_IP'];
|
739 |
|
740 |
$msg->sender_info=json_encode($si);
|
741 |
if (((isset($this->work_url) && $this->work_url !== '') && ($this->server_changed + $this->server_ttl > time()))
|
924 |
* Get user IP behind proxy server
|
925 |
*/
|
926 |
public function ct_session_ip( $data_ip ) {
|
927 |
+
// Return FALSE if FALSE !?
|
928 |
+
// if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/", $data_ip)) {
|
929 |
+
// error_log(__FUNCTION__ . " " . "condition");
|
930 |
+
// return $data_ip;
|
931 |
+
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
932 |
return cleantalk_get_real_ip();
|
933 |
}
|
934 |
|
1204 |
}
|
1205 |
}
|
1206 |
|
1207 |
+
function cleantalk_get_real_ip(){
|
1208 |
+
|
1209 |
+
// Getting headers
|
1210 |
+
$headers = function_exists('apache_request_headers') ? apache_request_headers() : $_SERVER;
|
1211 |
+
|
1212 |
+
// Getting IP for validating
|
1213 |
+
if (array_key_exists( 'X-Forwarded-For', $headers )){
|
1214 |
+
$ip = explode(",", trim($headers['X-Forwarded-For']));
|
1215 |
+
$ip = trim($the_ip[0]);
|
1216 |
+
}elseif(array_key_exists( 'HTTP_X_FORWARDED_FOR', $headers)){
|
1217 |
+
$ip = explode(",", trim($headers['HTTP_X_FORWARDED_FOR']));
|
1218 |
+
$ip = trim($the_ip[0]);
|
1219 |
+
}else{
|
1220 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
|
|
|
|
|
|
|
|
|
|
1221 |
}
|
1222 |
+
|
1223 |
+
// Validating IP
|
1224 |
+
// IPv4
|
1225 |
+
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)){
|
1226 |
+
$the_ip = $ip;
|
1227 |
+
// IPv6
|
1228 |
+
}elseif(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)){
|
1229 |
+
$the_ip = $ip;
|
1230 |
+
// Unknown
|
1231 |
+
}else{
|
1232 |
+
$the_ip = null;
|
1233 |
}
|
1234 |
+
|
1235 |
return $the_ip;
|
1236 |
}
|
1237 |
|
inc/sfw_die_page.html
CHANGED
@@ -4,6 +4,13 @@
|
|
4 |
<head>
|
5 |
<meta charset="utf-8" />
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
<!-- <title></title> -->
|
9 |
|
@@ -45,6 +52,7 @@ function get_current_url() {
|
|
45 |
<div id="js_passed">
|
46 |
<h3>Please click bellow to pass protection,</h3>
|
47 |
<a href="{REQUEST_URI}"><script>get_current_url();</script></a>
|
|
|
48 |
<br /><br /><br />
|
49 |
<p class="js_notice">Or you will be automatically redirected to the requested page after 3 seconds.</p>
|
50 |
</div>
|
4 |
<head>
|
5 |
<meta charset="utf-8" />
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7 |
+
<meta http-equiv="сache-сontrol" content="no-cache">
|
8 |
+
<meta http-equiv="сache-сontrol" content="private">
|
9 |
+
<meta http-equiv="сache-сontrol" content="max-age=0, must-revalidate">
|
10 |
+
<meta http-equiv="сache-сontrol" content="max-age=0, proxy-revalidate">
|
11 |
+
<meta http-equiv="expires" content="0" />
|
12 |
+
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
|
13 |
+
<meta http-equiv="pragma" content="no-cache" />
|
14 |
|
15 |
<!-- <title></title> -->
|
16 |
|
52 |
<div id="js_passed">
|
53 |
<h3>Please click bellow to pass protection,</h3>
|
54 |
<a href="{REQUEST_URI}"><script>get_current_url();</script></a>
|
55 |
+
{GENERATED}
|
56 |
<br /><br /><br />
|
57 |
<p class="js_notice">Or you will be automatically redirected to the requested page after 3 seconds.</p>
|
58 |
</div>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: znaeff, shagimuratov, serge00, sartemd174, amagsumov
|
3 |
Tags: antispam, protection, contact form, comments, spam
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
|
@@ -501,6 +501,22 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
|
|
501 |
1. The Dashboard with a map of most spam active countries per your account.
|
502 |
|
503 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
= 5.65 May 16 2017 =
|
505 |
* Fix for PayPal redirecton.
|
506 |
* Fixed issue with empty query for bulk comments test.
|
@@ -1333,6 +1349,22 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
|
|
1333 |
* First version
|
1334 |
|
1335 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1336 |
= 5.65 May 16 2017 =
|
1337 |
* Fix for PayPal redirecton.
|
1338 |
* Fixed issue with empty query for bulk comments test.
|
2 |
Contributors: znaeff, shagimuratov, serge00, sartemd174, amagsumov
|
3 |
Tags: antispam, protection, contact form, comments, spam
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.8
|
6 |
+
Stable tag: 5.67
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
|
501 |
1. The Dashboard with a map of most spam active countries per your account.
|
502 |
|
503 |
== Changelog ==
|
504 |
+
= 5.67 June 1 2017 =
|
505 |
+
* Integrations: Enfold theme, Convertplug.
|
506 |
+
* Links to check for Emails/IP for spam.
|
507 |
+
* Control comments and feedback about them from public post's page.
|
508 |
+
* Improved connection stability with cloud service.
|
509 |
+
* Spam protection improved.
|
510 |
+
* Other small fixes.
|
511 |
+
|
512 |
+
= 5.66 May 23 2017 =
|
513 |
+
* Spam protection improved.
|
514 |
+
* Major fixes for users and comments spam check.
|
515 |
+
* Added feedback from Wordpress comments list.
|
516 |
+
* Fix for "internal forms check" option.
|
517 |
+
* Fixed issue with caching SpamFireWall die page.
|
518 |
+
* Other small fixes.
|
519 |
+
|
520 |
= 5.65 May 16 2017 =
|
521 |
* Fix for PayPal redirecton.
|
522 |
* Fixed issue with empty query for bulk comments test.
|
1349 |
* First version
|
1350 |
|
1351 |
== Upgrade Notice ==
|
1352 |
+
= 5.67 June 1 2017 =
|
1353 |
+
* Integrations: Enfold theme, Convertplug.
|
1354 |
+
* Links to check for Emails/IP for spam.
|
1355 |
+
* Control comments and feedback about them from public post's page.
|
1356 |
+
* Improved connection stability with cloud service.
|
1357 |
+
* Spam protection improved.
|
1358 |
+
* Other small fixes.
|
1359 |
+
|
1360 |
+
= 5.66 May 23 2017 =
|
1361 |
+
* Spam protection improved.
|
1362 |
+
* Major fixes for users and comments spam check.
|
1363 |
+
* Added feedback from Wordpress comments list.
|
1364 |
+
* Fix for "internal forms check" option.
|
1365 |
+
* Fixed issue with caching SpamFireWall die page.
|
1366 |
+
* Other small fixes.
|
1367 |
+
|
1368 |
= 5.65 May 16 2017 =
|
1369 |
* Fix for PayPal redirecton.
|
1370 |
* Fixed issue with empty query for bulk comments test.
|