Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.52.1

Version Description

November 14 2016 = * Users and comments check: Using new API method. * Quick Contact From: Integration via "Custom Contact Forms" setting. * JavaScript filtration improved. * Translation changes. * Optimized JavaScript code.

Download this release

Release Info

Developer shagimuratov
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 5.52.1
Comparing to
See all releases

Code changes from version 5.51 to 5.52.1

cleantalk.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Spam Protection 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.51
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
- $cleantalk_plugin_version='5.51';
11
- $ct_agent_version = 'wordpress-551';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
@@ -231,14 +231,18 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
231
  }
232
  if (defined( 'DOING_AJAX' ) && DOING_AJAX||isset($_POST['cma-action']))
233
  {
234
- $cleantalk_hooked_actions=Array();
 
235
  require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
236
  require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-ajax.php');
237
- if(isset($_POST['action'])&&!in_array($_POST['action'],$cleantalk_hooked_actions)&&!isset($_COOKIE[LOGGED_IN_COOKIE]))
238
- {
 
 
 
239
  ct_ajax_hook();
240
  }
241
-
242
  //
243
  // Some of plugins to register a users use AJAX context.
244
  //
@@ -248,6 +252,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
248
  }
249
 
250
  add_action('admin_enqueue_scripts', 'ct_enqueue_scripts');
 
251
  if($pagenow=='edit-comments.php')
252
  {
253
  add_action('comment_unapproved_to_approvecomment', 'ct_comment_approved'); // param - comment object
@@ -457,7 +462,6 @@ function ct_add_nocache_script_footer()
457
  print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
458
  print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_internal.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
459
  }
460
- //print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk-info.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
461
  }
462
  }
463
 
@@ -508,7 +512,6 @@ function ct_inject_nocache_script($html)
508
 
509
  if(!is_admin()&&stripos($html,"</body")!==false)
510
  {
511
- //$ct_replace.="\n<script type='text/javascript'>var ajaxurl = '".admin_url('admin-ajax.php')."';\n $ct_info_flag </script>\n";
512
  $ct_replace="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_nocache.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
513
  if($test_external_forms)
514
  {
@@ -516,11 +519,10 @@ function ct_inject_nocache_script($html)
516
  $ct_replace.="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
517
  }
518
  if($test_internal_forms){
519
- print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
520
- print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_internal.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
521
  }
522
 
523
- //$html=str_ireplace("</body",$ct_replace."</body",$html);
524
  $html=substr_replace($html,$ct_replace."</body",strripos($html,"</body"),6);
525
  }
526
  }
3
  Plugin Name: Spam Protection 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.52.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
+ $cleantalk_plugin_version='5.52.1';
11
+ $ct_agent_version = 'wordpress-5521';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
231
  }
232
  if (defined( 'DOING_AJAX' ) && DOING_AJAX||isset($_POST['cma-action']))
233
  {
234
+ $cleantalk_hooked_actions = array();
235
+ $cleantalk_ajax_actions_to_check = array();
236
  require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
237
  require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-ajax.php');
238
+
239
+ if(isset($_POST['action']) && !in_array($_POST['action'],$cleantalk_hooked_actions) && !isset($_COOKIE[LOGGED_IN_COOKIE])){
240
+ ct_ajax_hook();
241
+ }
242
+ if(isset($_POST['action']) && in_array($_POST['action'],$cleantalk_ajax_actions_to_check) && !isset($_COOKIE[LOGGED_IN_COOKIE])){
243
  ct_ajax_hook();
244
  }
245
+
246
  //
247
  // Some of plugins to register a users use AJAX context.
248
  //
252
  }
253
 
254
  add_action('admin_enqueue_scripts', 'ct_enqueue_scripts');
255
+
256
  if($pagenow=='edit-comments.php')
257
  {
258
  add_action('comment_unapproved_to_approvecomment', 'ct_comment_approved'); // param - comment object
462
  print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
463
  print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_internal.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
464
  }
 
465
  }
466
  }
467
 
512
 
513
  if(!is_admin()&&stripos($html,"</body")!==false)
514
  {
 
515
  $ct_replace="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_nocache.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
516
  if($test_external_forms)
517
  {
519
  $ct_replace.="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
520
  }
521
  if($test_internal_forms){
522
+ $ct_replace .= "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
523
+ $ct_replace .= "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_internal.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
524
  }
525
 
 
526
  $html=substr_replace($html,$ct_replace."</body",strripos($html,"</body"),6);
527
  }
528
  }
i18n/cleantalk-ru_RU.mo CHANGED
Binary file
i18n/cleantalk.pot CHANGED
@@ -1,115 +1,724 @@
1
- # Copyright (C) 2012 CleanTalk
2
- # This file is distributed under the same license as the Cleantalk. Spam protection package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Cleantalk. Spam protection \n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/cleantalk\n"
7
- "POT-Creation-Date: 2014-03-12 08:04:56+00:00\n"
 
 
 
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-03-12 08:04:56+00:00\n"
12
- "Last-Translator: Denis Shagimuratov <shagimuratov@cleantalk.org>\n"
13
- "Language-Team: CleanTalk Team <welcome@cleantalk.org>\n"
 
 
 
 
 
 
14
 
15
- msgid "Cleantalk settings"
 
16
  msgstr ""
17
 
18
- msgid "Main settings"
 
19
  msgstr ""
20
 
21
- msgid "Access key"
 
 
22
  msgstr ""
23
 
24
- msgid "Spam protection"
 
25
  msgstr ""
26
 
27
- msgid "Click here to get access key"
 
28
  msgstr ""
29
 
30
- #. Notice if key is empty
31
- msgid "Please enter Access Key in %s settings to enable anti spam protection!"
32
  msgstr ""
33
 
34
- #. Publish options
35
- msgid "Publish relevant comments"
36
  msgstr ""
37
 
38
- #. Publish descrtipion
39
- msgid "Relevant (not spam) comments from new authors will be automatic published at the blog"
40
  msgstr ""
41
 
42
- msgid "Automatically delete spam comments"
 
43
  msgstr ""
44
 
45
- msgid "Delete spam comments older than %d days."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  msgstr ""
47
 
48
- msgid "Anti-spam settings"
 
49
  msgstr ""
50
 
 
 
 
 
 
51
  msgid "Registration forms"
52
  msgstr ""
53
 
 
54
  msgid "Comments form"
55
  msgstr ""
56
 
 
57
  msgid "Contact forms"
58
  msgstr ""
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  msgid "Plugin Homepage at"
61
  msgstr ""
62
 
63
- msgid "Comment approved. Anti-spam by CleanTalk."
 
 
 
 
 
64
  msgstr ""
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  msgid "%s trial period ends, please upgrade to %s!"
67
  msgstr ""
68
 
69
- msgid "Don’t forget to disable CAPTCHA if you have it!"
 
70
  msgstr ""
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  msgid "Registration is approved by %s."
73
  msgstr ""
74
 
 
 
 
 
 
75
  msgid "Attention, please!"
76
  msgstr ""
77
 
78
- msgid "\"Anti-spam by CleanTalk\" plugin error on your site %s:"
 
 
79
  msgstr ""
80
 
81
- msgid "[%s] Anti-spam by CleanTalk error!"
 
 
82
  msgstr ""
83
 
84
- msgid "Use secure (SSL) connection to CleanTalk cloud"
 
85
  msgstr ""
86
 
87
- msgid "Custom contact forms"
 
 
 
 
88
  msgstr ""
89
 
90
- msgid "Anti spam test for any WordPress or themes contacts forms"
 
91
  msgstr ""
92
 
93
- msgid "Find spam comments"
 
 
94
  msgstr ""
95
 
96
- msgid "Total comments %s, checked %s, found %s spam comments."
 
 
97
  msgstr ""
98
 
99
- msgid "Done. All comments tested via blacklists database, please see result bellow."
 
 
100
  msgstr ""
101
 
102
- msgid "Delete selected"
 
 
103
  msgstr ""
104
 
105
- msgid "Check for spam"
 
106
  msgstr ""
107
 
108
- msgid "Anti-spam by CleanTalk"
 
 
 
 
 
 
 
 
109
  msgstr ""
110
 
111
- msgid "Anti-spam by CleanTalk will check all not spam comments against blacklists database and show you senders that have spam activity on other websites. Just click 'Find spam comments' to start."
 
 
112
  msgstr ""
113
 
114
- msgid "Please wait for a while. 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."
115
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
 
2
  msgid ""
3
  msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: Spam Protection by CleanTalk\n"
6
+ "POT-Creation-Date: 2016-11-13 19:09+0500\n"
7
+ "PO-Revision-Date: 2016-11-13 19:09+0500\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.6\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-WPHeader: cleantalk.php\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
19
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
+ #: cleantalk.php:546
24
+ msgid "WordPress spam"
25
  msgstr ""
26
 
27
+ #: cleantalk.php:546
28
+ msgid "blocked by"
29
  msgstr ""
30
 
31
+ #: inc/cleantalk-admin.php:27
32
+ #, php-format
33
+ msgid "has blocked %s spam"
34
  msgstr ""
35
 
36
+ #: inc/cleantalk-admin.php:76
37
+ msgid "Failed from timeout. Going to check comments again."
38
  msgstr ""
39
 
40
+ #: inc/cleantalk-admin.php:77
41
+ msgid "Added 500 comments"
42
  msgstr ""
43
 
44
+ #: inc/cleantalk-admin.php:80
45
+ msgid "Find spam comments"
46
  msgstr ""
47
 
48
+ #: inc/cleantalk-admin.php:92
49
+ msgid "Failed from timeout. Going to check users again."
50
  msgstr ""
51
 
52
+ #: inc/cleantalk-admin.php:93
53
+ msgid "Failed from timeout. Going to run a new attempt to delete spam users."
54
  msgstr ""
55
 
56
+ #: inc/cleantalk-admin.php:94
57
+ msgid "Inserted"
58
  msgstr ""
59
 
60
+ #: inc/cleantalk-admin.php:95
61
+ msgid "users."
62
+ msgstr ""
63
+
64
+ #: inc/cleantalk-admin.php:98
65
+ msgid "Find spam users"
66
+ msgstr ""
67
+
68
+ #: inc/cleantalk-admin.php:117 inc/cleantalk-admin.php:121
69
+ msgid "CleanTalk settings"
70
+ msgstr ""
71
+
72
+ #: inc/cleantalk-admin.php:219
73
+ #, php-format
74
+ msgid "Unable to connect to %s."
75
+ msgstr ""
76
+
77
+ #: inc/cleantalk-admin.php:333
78
+ msgid "Protection is active"
79
  msgstr ""
80
 
81
+ #: inc/cleantalk-admin.php:335
82
+ msgid "Advanced settings"
83
  msgstr ""
84
 
85
+ #: inc/cleantalk-admin.php:339
86
+ msgid "Access key"
87
+ msgstr ""
88
+
89
+ #: inc/cleantalk-admin.php:347 inc/cleantalk-admin.php:673
90
  msgid "Registration forms"
91
  msgstr ""
92
 
93
+ #: inc/cleantalk-admin.php:348
94
  msgid "Comments form"
95
  msgstr ""
96
 
97
+ #: inc/cleantalk-admin.php:349 inc/cleantalk-admin.php:675
98
  msgid "Contact forms"
99
  msgstr ""
100
 
101
+ #: inc/cleantalk-admin.php:350 inc/cleantalk-admin.php:676
102
+ msgid "Custom contact forms"
103
+ msgstr ""
104
+
105
+ #: inc/cleantalk-admin.php:351 inc/cleantalk-admin.php:678
106
+ msgid "WooCommerce checkout form"
107
+ msgstr ""
108
+
109
+ #: inc/cleantalk-admin.php:352
110
+ msgid "Protect external forms"
111
+ msgstr ""
112
+
113
+ #: inc/cleantalk-admin.php:353
114
+ msgid "Protect internal forms"
115
+ msgstr ""
116
+
117
+ #: inc/cleantalk-admin.php:357
118
+ msgid "buddyPress private messages"
119
+ msgstr ""
120
+
121
+ #: inc/cleantalk-admin.php:358
122
+ msgid "Don't check trusted user's comments"
123
+ msgstr ""
124
+
125
+ #: inc/cleantalk-admin.php:359
126
+ msgid "Automatically delete spam comments"
127
+ msgstr ""
128
+
129
+ #: inc/cleantalk-admin.php:360
130
+ msgid "Remove links from approved comments"
131
+ msgstr ""
132
+
133
+ #: inc/cleantalk-admin.php:364
134
+ msgid "Protect logged in Users"
135
+ msgstr ""
136
+
137
+ #: inc/cleantalk-admin.php:365
138
+ msgid "Use AJAX for JavaScript check"
139
+ msgstr ""
140
+
141
+ #: inc/cleantalk-admin.php:366
142
+ msgid "Check all post data"
143
+ msgstr ""
144
+
145
+ #: inc/cleantalk-admin.php:367
146
+ msgid "Set cookies"
147
+ msgstr ""
148
+
149
+ #: inc/cleantalk-admin.php:368
150
+ msgid "Use SSL"
151
+ msgstr ""
152
+
153
+ #: inc/cleantalk-admin.php:372
154
+ msgid "Show statistics in admin bar"
155
+ msgstr ""
156
+
157
+ #: inc/cleantalk-admin.php:373
158
+ msgid "Show All-time counter"
159
+ msgstr ""
160
+
161
+ #: inc/cleantalk-admin.php:374
162
+ msgid "Show 24 hours counter"
163
+ msgstr ""
164
+
165
+ #: inc/cleantalk-admin.php:375
166
+ msgid "SpamFireWall counter"
167
+ msgstr ""
168
+
169
+ #: inc/cleantalk-admin.php:378 inc/cleantalk-admin.php:677
170
+ #: inc/cleantalk-admin.php:1231
171
+ msgid "SpamFireWall"
172
+ msgstr ""
173
+
174
+ #: inc/cleantalk-admin.php:379 inc/cleantalk-admin.php:1041
175
+ msgid "Collect details about browsers"
176
+ msgstr ""
177
+
178
+ #: inc/cleantalk-admin.php:380 inc/cleantalk-admin.php:1205
179
+ msgid "Tell others about CleanTalk"
180
+ msgstr ""
181
+
182
+ #: inc/cleantalk-admin.php:457 inc/cleantalk-admin.php:472
183
+ #: inc/cleantalk-admin.php:487 inc/cleantalk-admin.php:787
184
+ #: inc/cleantalk-admin.php:820 inc/cleantalk-admin.php:836
185
+ #: inc/cleantalk-admin.php:852 inc/cleantalk-admin.php:868
186
+ #: inc/cleantalk-admin.php:884 inc/cleantalk-admin.php:900
187
+ #: inc/cleantalk-admin.php:919 inc/cleantalk-admin.php:944
188
+ #: inc/cleantalk-admin.php:969 inc/cleantalk-admin.php:989
189
+ #: inc/cleantalk-admin.php:1019 inc/cleantalk-admin.php:1076
190
+ #: inc/cleantalk-admin.php:1096 inc/cleantalk-admin.php:1116
191
+ #: inc/cleantalk-admin.php:1136 inc/cleantalk-admin.php:1156
192
+ #: inc/cleantalk-admin.php:1177
193
+ msgid "Yes"
194
+ msgstr ""
195
+
196
+ #: inc/cleantalk-admin.php:459 inc/cleantalk-admin.php:474
197
+ #: inc/cleantalk-admin.php:489 inc/cleantalk-admin.php:789
198
+ #: inc/cleantalk-admin.php:822 inc/cleantalk-admin.php:838
199
+ #: inc/cleantalk-admin.php:854 inc/cleantalk-admin.php:870
200
+ #: inc/cleantalk-admin.php:886 inc/cleantalk-admin.php:902
201
+ #: inc/cleantalk-admin.php:921 inc/cleantalk-admin.php:946
202
+ #: inc/cleantalk-admin.php:971 inc/cleantalk-admin.php:991
203
+ #: inc/cleantalk-admin.php:1021 inc/cleantalk-admin.php:1078
204
+ #: inc/cleantalk-admin.php:1098 inc/cleantalk-admin.php:1118
205
+ #: inc/cleantalk-admin.php:1138 inc/cleantalk-admin.php:1158
206
+ #: inc/cleantalk-admin.php:1179
207
+ msgid "No"
208
+ msgstr ""
209
+
210
+ #: inc/cleantalk-admin.php:460 inc/cleantalk-admin.php:490
211
+ msgid ""
212
+ "Display all-time requests counter in the admin bar. Counter displays number "
213
+ "of requests since plugin installation."
214
+ msgstr ""
215
+
216
+ #: inc/cleantalk-admin.php:475
217
+ msgid ""
218
+ "Display daily requests counter in the admin bar. Counter displays number of "
219
+ "requests of the past 24 hours."
220
+ msgstr ""
221
+
222
+ #: inc/cleantalk-admin.php:541
223
+ msgid "Since"
224
+ msgstr ""
225
+
226
+ #: inc/cleantalk-admin.php:547
227
+ msgid ""
228
+ "All / Allowed / Blocked submissions. The number of submissions is being "
229
+ "counted since CleanTalk plugin installation."
230
+ msgstr ""
231
+
232
+ #: inc/cleantalk-admin.php:547
233
+ msgid "All"
234
+ msgstr ""
235
+
236
+ #: inc/cleantalk-admin.php:555
237
+ msgid ""
238
+ "Allowed / Blocked submissions. The number of submissions for past 24 hours. "
239
+ msgstr ""
240
+
241
+ #: inc/cleantalk-admin.php:555
242
+ msgid "Day"
243
+ msgstr ""
244
+
245
+ #: inc/cleantalk-admin.php:561
246
+ msgid ""
247
+ "All / Blocked events. Access attempts regitred by SpamFireWall counted since "
248
+ "the last plugin activation."
249
+ msgstr ""
250
+
251
+ #: inc/cleantalk-admin.php:566
252
+ msgid ""
253
+ "Allowed / Blocked submissions. The number of submissions is being counted "
254
+ "since "
255
+ msgstr ""
256
+
257
+ #: inc/cleantalk-admin.php:573
258
+ msgid "dashboard"
259
+ msgstr ""
260
+
261
+ #: inc/cleantalk-admin.php:582 inc/cleantalk-admin.php:588
262
+ #: inc/cleantalk-admin.php:1588 inc/cleantalk-admin.php:1592
263
+ #: inc/cleantalk-admin.php:1613 inc/cleantalk-admin.php:1617
264
+ msgid "Settings"
265
+ msgstr ""
266
+
267
+ #: inc/cleantalk-admin.php:598 inc/cleantalk-admin.php:770
268
+ msgid "Check comments for spam"
269
+ msgstr ""
270
+
271
+ #: inc/cleantalk-admin.php:608 inc/cleantalk-admin.php:771
272
+ msgid "Check users for spam"
273
+ msgstr ""
274
+
275
+ #: inc/cleantalk-admin.php:617
276
+ msgid "Reset counter"
277
+ msgstr ""
278
+
279
+ #: inc/cleantalk-admin.php:674
280
+ msgid "Comments forms"
281
+ msgstr ""
282
+
283
+ #: inc/cleantalk-admin.php:686
284
+ msgid ""
285
+ "Testing is failed, check settings. Tech support <a target=_blank "
286
+ "href='mailto:support@cleantalk.org'>support@cleantalk.org</a>"
287
+ msgstr ""
288
+
289
+ #: inc/cleantalk-admin.php:724
290
+ #, php-format
291
+ msgid "has blocked <b>%s</b> spam."
292
+ msgstr ""
293
+
294
+ #: inc/cleantalk-admin.php:733
295
+ msgid "Click here to get anti-spam statistics"
296
+ msgstr ""
297
+
298
+ #: inc/cleantalk-admin.php:741
299
+ msgid "Enter the key"
300
+ msgstr ""
301
+
302
+ #: inc/cleantalk-admin.php:755
303
+ msgid "Get access key manually"
304
+ msgstr ""
305
+
306
+ #: inc/cleantalk-admin.php:756
307
+ msgid "or"
308
+ msgstr ""
309
+
310
+ #: inc/cleantalk-admin.php:757
311
+ msgid "Get access key automatically"
312
+ msgstr ""
313
+
314
+ #: inc/cleantalk-admin.php:761
315
+ #, php-format
316
+ msgid "Admin e-mail (%s) will be used for registration"
317
+ msgstr ""
318
+
319
+ #: inc/cleantalk-admin.php:762
320
+ msgid "License agreement"
321
+ msgstr ""
322
+
323
+ #: inc/cleantalk-admin.php:767
324
+ msgid "Show the access key"
325
+ msgstr ""
326
+
327
+ #: inc/cleantalk-admin.php:790
328
+ msgid "WordPress, JetPack, WooCommerce."
329
+ msgstr ""
330
+
331
+ #: inc/cleantalk-admin.php:795
332
+ msgid "Forms to protect"
333
+ msgstr ""
334
+
335
+ #: inc/cleantalk-admin.php:799
336
+ msgid "Comments and messages"
337
+ msgstr ""
338
+
339
+ #: inc/cleantalk-admin.php:803
340
+ msgid "Data processing"
341
+ msgstr ""
342
+
343
+ #: inc/cleantalk-admin.php:807
344
+ msgid "Admin bar"
345
+ msgstr ""
346
+
347
+ #: inc/cleantalk-admin.php:823
348
+ msgid "Remove links from approved comments. Replace it with \"[Link deleted]\""
349
+ msgstr ""
350
+
351
+ #: inc/cleantalk-admin.php:839
352
+ msgid "WordPress, BuddyPress, bbPress, S2Member, WooCommerce."
353
+ msgstr ""
354
+
355
+ #: inc/cleantalk-admin.php:855
356
+ msgid ""
357
+ "Contact Form 7, Formidable forms, JetPack, Fast Secure Contact Form, "
358
+ "WordPress Landing Pages, Gravity Forms."
359
+ msgstr ""
360
+
361
+ #: inc/cleantalk-admin.php:871
362
+ msgid "Anti spam test for any WordPress themes or contacts forms."
363
+ msgstr ""
364
+
365
+ #: inc/cleantalk-admin.php:887
366
+ msgid "Anti spam test for WooCommerce checkout form."
367
+ msgstr ""
368
+
369
+ #: inc/cleantalk-admin.php:903
370
+ msgid "Check buddyPress private messages."
371
+ msgstr ""
372
+
373
+ #: inc/cleantalk-admin.php:922
374
+ #, php-format
375
+ msgid "Delete spam comments older than %d days."
376
+ msgstr ""
377
+
378
+ #: inc/cleantalk-admin.php:947
379
+ msgid ""
380
+ "Show/hide CleanTalk icon in top level menu in WordPress backend. The number "
381
+ "of submissions is being counted for past 24 hours."
382
+ msgstr ""
383
+
384
+ #: inc/cleantalk-admin.php:972
385
+ msgid ""
386
+ "Check all POST submissions from website visitors. Enable this option if you "
387
+ "have spam misses on website or you don`t have records about missed spam here:"
388
+ msgstr ""
389
+
390
+ #: inc/cleantalk-admin.php:972
391
+ msgid "CleanTalk dashboard"
392
+ msgstr ""
393
+
394
+ #: inc/cleantalk-admin.php:972
395
+ msgid "СAUTION! Option can catch POST requests in WordPress backend"
396
+ msgstr ""
397
+
398
+ #: inc/cleantalk-admin.php:992
399
+ msgid ""
400
+ "Options helps protect WordPress against spam with any caching plugins. Turn "
401
+ "this option on to avoid issues with caching plugins."
402
+ msgstr ""
403
+
404
+ #: inc/cleantalk-admin.php:992
405
+ msgid "Attention! Incompatible with AMP plugins!"
406
+ msgstr ""
407
+
408
+ #: inc/cleantalk-admin.php:1022
409
+ msgid "Dont't check comments for users with above"
410
+ msgstr ""
411
+
412
+ #: inc/cleantalk-admin.php:1022
413
+ msgid "comments."
414
+ msgstr ""
415
+
416
+ #: inc/cleantalk-admin.php:1042
417
+ msgid ""
418
+ "Checking this box you allow plugin store information about screen size and "
419
+ "browser plugins of website visitors. The option in a beta state."
420
+ msgstr ""
421
+
422
+ #: inc/cleantalk-admin.php:1099
423
+ msgid ""
424
+ "Turn this option on to protect forms on your WordPress that send data to "
425
+ "third-part servers (like MailChimp)."
426
+ msgstr ""
427
+
428
+ #: inc/cleantalk-admin.php:1119
429
+ msgid ""
430
+ "This option will enable protection for custom (hand-made) AJAX forms with "
431
+ "PHP scripts handlers on your WordPress."
432
+ msgstr ""
433
+
434
+ #: inc/cleantalk-admin.php:1139
435
+ msgid ""
436
+ "Turn this option off to deny plugin generates any cookies on website front-"
437
+ "end. This option is helpful if you use Varnish. But most of contact forms "
438
+ "will not be protected by CleanTalk if the option is turned off!"
439
+ msgstr ""
440
+
441
+ #: inc/cleantalk-admin.php:1159
442
+ msgid ""
443
+ "Turn this option on to use encrypted (SSL) connection with CleanTalk servers."
444
+ msgstr ""
445
+
446
+ #: inc/cleantalk-admin.php:1180
447
+ msgid ""
448
+ "Turn this option on to check for spam any submissions (comments, contact "
449
+ "forms and etc.) from registered Users."
450
+ msgstr ""
451
+
452
+ #: inc/cleantalk-admin.php:1206
453
+ msgid ""
454
+ "Checking this box places a small link under the comment form that lets "
455
+ "others know what anti-spam tool protects your site."
456
+ msgstr ""
457
+
458
+ #: inc/cleantalk-admin.php:1232
459
+ msgid ""
460
+ "This option allows to filter spam bots before they access website. Also "
461
+ "reduces CPU usage on hosting server and accelerates pages load time."
462
+ msgstr ""
463
+
464
+ #: inc/cleantalk-admin.php:1234
465
+ msgid "Learn more"
466
+ msgstr ""
467
+
468
+ #: inc/cleantalk-admin.php:1350
469
+ msgid "Save Changes"
470
+ msgstr ""
471
+
472
+ #: inc/cleantalk-admin.php:1366
473
  msgid "Plugin Homepage at"
474
  msgstr ""
475
 
476
+ #: inc/cleantalk-admin.php:1367
477
+ msgid "Tech support CleanTalk:"
478
+ msgstr ""
479
+
480
+ #: inc/cleantalk-admin.php:1367
481
+ msgid "CleanTalk tech forum"
482
  msgstr ""
483
 
484
+ #: inc/cleantalk-admin.php:1367
485
+ msgid "Use s@cleantalk.org to test plugin in any WordPress form."
486
+ msgstr ""
487
+
488
+ #: inc/cleantalk-admin.php:1404
489
+ #, php-format
490
+ msgid "Unable to get Access key automatically: %s"
491
+ msgstr ""
492
+
493
+ #: inc/cleantalk-admin.php:1405
494
+ msgid "Get the Access key"
495
+ msgstr ""
496
+
497
+ #: inc/cleantalk-admin.php:1410
498
+ #, php-format
499
+ msgid "Please enter Access Key in %s settings to enable anti spam protection!"
500
+ msgstr ""
501
+
502
+ #: inc/cleantalk-admin.php:1424
503
+ #, php-format
504
  msgid "%s trial period ends, please upgrade to %s!"
505
  msgstr ""
506
 
507
+ #: inc/cleantalk-admin.php:1447
508
+ msgid "RENEW ANTI-SPAM"
509
  msgstr ""
510
 
511
+ #: inc/cleantalk-admin.php:1448
512
+ #, php-format
513
+ msgid "Please renew your anti-spam license for %s."
514
+ msgstr ""
515
+
516
+ #: inc/cleantalk-admin.php:1448
517
+ msgid "next year"
518
+ msgstr ""
519
+
520
+ #: inc/cleantalk-admin.php:1455
521
+ msgid ""
522
+ "Wrong <a href=\"options-general.php?page=cleantalk\"><b style=\"color: "
523
+ "#49C73B;\">Clean</b><b style=\"color: #349ebf;\">Talk</b> access key</"
524
+ "a>! Please check it or ask <a target=\"_blank\" href=\"https://cleantalk.org/"
525
+ "forum/\">support</a>."
526
+ msgstr ""
527
+
528
+ #: inc/cleantalk-admin.php:1595
529
+ msgid "FAQ"
530
+ msgstr ""
531
+
532
+ #: inc/cleantalk-admin.php:1596
533
+ msgid "Support"
534
+ msgstr ""
535
+
536
+ #: inc/cleantalk-comments.php:9 inc/cleantalk-comments.php:239
537
+ #: inc/cleantalk-users.php:8 inc/cleantalk-users.php:185
538
+ msgid "Check for spam"
539
+ msgstr ""
540
+
541
+ #: inc/cleantalk-comments.php:65
542
+ msgid "Author"
543
+ msgstr ""
544
+
545
+ #: inc/cleantalk-comments.php:66
546
+ msgctxt "column name"
547
+ msgid "Comment"
548
+ msgstr ""
549
+
550
+ #: inc/cleantalk-comments.php:67
551
+ msgctxt "column name"
552
+ msgid "In Response To"
553
+ msgstr ""
554
+
555
+ #: inc/cleantalk-comments.php:97
556
+ #, php-format
557
+ msgid "Submitted on <a href=\"%1$s\">%2$s at %3$s</a>"
558
+ msgstr ""
559
+
560
+ #: inc/cleantalk-comments.php:99
561
+ msgid "Y/m/d"
562
+ msgstr ""
563
+
564
+ #: inc/cleantalk-comments.php:126
565
+ msgid "View Post"
566
+ msgstr ""
567
+
568
+ #: inc/cleantalk-comments.php:172
569
+ msgid "Delete all comments from the list"
570
+ msgstr ""
571
+
572
+ #: inc/cleantalk-comments.php:173 inc/cleantalk-users.php:174
573
+ msgid "Delete selected"
574
+ msgstr ""
575
+
576
+ #: inc/cleantalk-comments.php:224
577
+ msgid ""
578
+ "Please wait! CleanTalk is checking all approved and pending comments via "
579
+ "blacklist database at cleantalk.org. You will have option to delete found "
580
+ "spam comments after plugin finish."
581
+ msgstr ""
582
+
583
+ #: inc/cleantalk-comments.php:227
584
+ msgid ""
585
+ "Please wait for a while. CleanTalk is deleting spam comments. Comments left: "
586
+ msgstr ""
587
+
588
+ #: inc/cleantalk-comments.php:242
589
+ msgid ""
590
+ "The plugin will check all comments against blacklists database and show you "
591
+ "senders that have spam activity on other websites."
592
+ msgstr ""
593
+
594
+ #: inc/cleantalk-comments.php:412
595
+ #, php-format
596
+ msgid "Total comments %s, checked %s, found %s spam comments."
597
+ msgstr ""
598
+
599
+ #: inc/cleantalk-comments.php:415
600
+ msgid "Please do backup of WordPress database before delete any comments!"
601
+ msgstr ""
602
+
603
+ #: inc/cleantalk-public.php:1057 inc/cleantalk-public.php:1114
604
+ #: inc/cleantalk-public.php:1132
605
+ msgid "Spam protection"
606
+ msgstr ""
607
+
608
+ #: inc/cleantalk-public.php:1329
609
+ #, php-format
610
  msgid "Registration is approved by %s."
611
  msgstr ""
612
 
613
+ #: inc/cleantalk-public.php:2017
614
+ msgid "Comment approved. Anti-spam by CleanTalk."
615
+ msgstr ""
616
+
617
+ #: inc/cleantalk-public.php:2641
618
  msgid "Attention, please!"
619
  msgstr ""
620
 
621
+ #: inc/cleantalk-public.php:2642
622
+ #, php-format
623
+ msgid "\"%s\" plugin error on your site %s:"
624
  msgstr ""
625
 
626
+ #: inc/cleantalk-public.php:2644
627
+ #, php-format
628
+ msgid "[%s] %s error!"
629
  msgstr ""
630
 
631
+ #: inc/cleantalk-users.php:38
632
+ msgid "Please wait for a while. CleanTalk is deleting spam users. Users left: "
633
  msgstr ""
634
 
635
+ #: inc/cleantalk-users.php:49
636
+ msgid ""
637
+ "Please wait for a while. CleanTalk is checking all users via blacklist "
638
+ "database at cleantalk.org. You will have option to delete found spam users "
639
+ "after plugin finish."
640
  msgstr ""
641
 
642
+ #: inc/cleantalk-users.php:79
643
+ msgid "Username"
644
  msgstr ""
645
 
646
+ #: inc/cleantalk-users.php:80
647
+ msgctxt "column name"
648
+ msgid "Name"
649
  msgstr ""
650
 
651
+ #: inc/cleantalk-users.php:81
652
+ msgctxt "column name"
653
+ msgid "E-mail"
654
  msgstr ""
655
 
656
+ #: inc/cleantalk-users.php:82
657
+ msgctxt "column name"
658
+ msgid "Role"
659
  msgstr ""
660
 
661
+ #: inc/cleantalk-users.php:83
662
+ msgctxt "column name"
663
+ msgid "Posts"
664
  msgstr ""
665
 
666
+ #: inc/cleantalk-users.php:173
667
+ msgid "Delete all users from list"
668
  msgstr ""
669
 
670
+ #: inc/cleantalk-users.php:188
671
+ msgid ""
672
+ "The plugin will check all users against blacklists database and show you "
673
+ "senders that have spam activity on other websites. Just click 'Find spam "
674
+ "users' to start."
675
+ msgstr ""
676
+
677
+ #: inc/cleantalk-users.php:206
678
+ msgid "Stop deletion"
679
  msgstr ""
680
 
681
+ #: inc/cleantalk-users.php:363
682
+ #, php-format
683
+ msgid "Total users %s, checked %s, found %s spam users"
684
  msgstr ""
685
 
686
+ #: inc/cleantalk-users.php:366
687
+ msgid "Please do backup of WordPress database before delete any accounts!"
688
+ msgstr ""
689
+
690
+ #: inc/cleantalk-widget.php:13
691
+ msgid "CleanTalk Widget"
692
+ msgstr ""
693
+
694
+ #: inc/cleantalk-widget.php:16
695
+ msgid "CleanTalk widget"
696
+ msgstr ""
697
+
698
+ #: inc/cleantalk-widget.php:61
699
+ msgid "Spam blocked"
700
+ msgstr ""
701
+
702
+ #: inc/cleantalk-widget.php:66
703
+ msgid "Title:"
704
+ msgstr ""
705
+
706
+ #. Plugin Name of the plugin/theme
707
+ msgid "Spam Protection by CleanTalk"
708
+ msgstr ""
709
+
710
+ #. Plugin URI of the plugin/theme
711
+ #. Author URI of the plugin/theme
712
+ msgid "http://cleantalk.org"
713
+ msgstr ""
714
+
715
+ #. Description of the plugin/theme
716
+ msgid ""
717
+ "Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment "
718
+ "spam, no registration spam, no contact spam, protects any WordPress forms. "
719
+ "Formerly Anti-Spam by CleanTalk."
720
+ msgstr ""
721
+
722
+ #. Author of the plugin/theme
723
+ msgid "СleanTalk <welcome@cleantalk.org>"
724
+ msgstr ""
inc/cleantalk-admin.js CHANGED
@@ -6,7 +6,7 @@ jQuery(document).ready(function(){
6
  var n = d.getTimezoneOffset();
7
  var data = {
8
  'action': 'ajax_get_timezone',
9
- 'security': ajax_nonce,
10
  'offset': n
11
  };
12
  jQuery.ajax({
6
  var n = d.getTimezoneOffset();
7
  var data = {
8
  'action': 'ajax_get_timezone',
9
+ 'security': ctSettingsPage.ct_ajax_nonce,
10
  'offset': n
11
  };
12
  jQuery.ajax({
inc/cleantalk-admin.php CHANGED
@@ -61,8 +61,55 @@ add_action( 'wp_ajax_ajax_get_timezone', 'ct_ajax_get_timezone' );
61
  * @param string $hook URL of hooked page
62
  */
63
  function ct_enqueue_scripts($hook) {
64
- if ($hook == 'edit-comments.php')
65
- wp_enqueue_script('ct_reload_script', plugins_url('/cleantalk-rel.js', __FILE__));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  /**
@@ -332,9 +379,9 @@ function ct_admin_init()
332
  add_settings_field('cleantalk_sfw_counter', "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".__('SpamFireWall counter', 'cleantalk'), 'ct_input_sfw_counter', 'cleantalk', 'cleantalk_settings_anti_spam');
333
 
334
 
335
- add_settings_field('cleantalk_spam_firewall', __('', 'cleantalk'), 'ct_input_spam_firewall', 'cleantalk', 'cleantalk_settings_banner');
336
  add_settings_field('cleantalk_collect_details', __('Collect details about browsers', 'cleantalk'), 'ct_input_collect_details', 'cleantalk', 'cleantalk_settings_anti_spam');
337
- add_settings_field('cleantalk_show_link', __('', 'cleantalk'), 'ct_input_show_link', 'cleantalk', 'cleantalk_settings_banner');
338
  }
339
  }
340
 
@@ -495,13 +542,13 @@ function ct_add_admin_menu( $wp_admin_bar ) {
495
  //Compile user's counter string
496
  $user_counter=Array('accepted'=>$ct_data['user_counter']['accepted'], 'blocked'=>$ct_data['user_counter']['blocked'], 'all'=>$ct_data['user_counter']['accepted'] + $ct_data['user_counter']['blocked'], 'since'=>$ct_data['user_counter']['since']);
497
  //Previous version $user_counter_str='<span style="color: white;">Since '.$user_counter['since'].': ' .$user_counter['all']*/. '</span> / <span style="color: green;">' .$user_counter['accepted']. '</span> / <span style="color: red;">' .$user_counter['blocked']. '</span>';
498
- $user_counter_str='<span style="color: white;">Since '.$user_counter['since'].': </span><span style="color: green;">' .$user_counter['accepted']. '</span> / <span style="color: red;">' .$user_counter['blocked']. '</span>';
499
 
500
  $all_time_counter_str='';
501
  //Don't compile if all time counter disabled
502
  if(isset($ct_options['all_time_counter']) && $ct_options['all_time_counter']=='1'){
503
  $all_time_counter=Array('accepted'=>$ct_data['all_time_counter']['accepted'], 'blocked'=>$ct_data['all_time_counter']['blocked'], 'all'=>$ct_data['all_time_counter']['accepted'] + $ct_data['all_time_counter']['blocked']);
504
- $all_time_counter_str='<span style="color: white;" title="'.__('All / Allowed / Blocked submissions. The number of submissions is being counted since CleanTalk plugin installation.', 'cleantalk').'"><span style="color: white;"> | All: ' .$all_time_counter['all']. '</span> / <span style="color: green;">' .$all_time_counter['accepted']. '</span> / <span style="color: red;">' .$all_time_counter['blocked']. '</span></span>';
505
  }
506
 
507
  $daily_counter_str='';
@@ -509,7 +556,7 @@ function ct_add_admin_menu( $wp_admin_bar ) {
509
  if(isset($ct_options['daily_counter']) && $ct_options['daily_counter']=='1'){
510
  $daily_counter=Array('accepted'=>array_sum($ct_data['array_accepted']), 'blocked'=>array_sum($ct_data['array_blocked']), 'all'=>array_sum($ct_data['array_accepted']) + array_sum($ct_data['array_blocked']));
511
  //Previous version $daily_counter_str='<span style="color: white;" title="'.__('All / Allowed / Blocked submissions. The number of submissions for past 24 hours. ', 'cleantalk').'"><span style="color: white;"> | Day: ' .$daily_counter['all']. '</span> / <span style="color: green;">' .$daily_counter['accepted']. '</span> / <span style="color: red;">' .$daily_counter['blocked']. '</span></span>';
512
- $daily_counter_str='<span style="color: white;" title="'.__('Allowed / Blocked submissions. The number of submissions for past 24 hours. ', 'cleantalk').'"><span style="color: white;"> | Day: </span><span style="color: green;">' .$daily_counter['accepted']. '</span> / <span style="color: red;">' .$daily_counter['blocked']. '</span></span>';
513
  }
514
  $sfw_counter_str='';
515
  //Don't compile if SFW counter disabled
@@ -704,7 +751,7 @@ function ct_input_apikey() {
704
  $is_wpmu=true;
705
  }
706
 
707
- echo "<script src='".plugins_url( 'cleantalk-admin.js', __FILE__ )."'></script>\n";
708
  if (ct_valid_key($value) === false && !$is_wpmu) {
709
  echo "<script>var cleantalk_good_key=false;</script>";
710
  if (function_exists('curl_init') && function_exists('json_decode')) {
@@ -825,7 +872,7 @@ function ct_input_general_contact_forms_test() {
825
  echo "<input type='radio' id='cleantalk_general_contact_forms_test1' name='cleantalk_settings[general_contact_forms_test]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_general_contact_forms_test1'> " . __('Yes') . "</label>";
826
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
827
  echo "<input type='radio' id='cleantalk_general_contact_forms_test0' name='cleantalk_settings[general_contact_forms_test]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_general_contact_forms_test0'> " . __('No') . "</label>";
828
- admin_addDescriptionsFields(__('Anti spam test for any WordPress or themes contacts forms.', 'cleantalk'));
829
  }
830
 
831
  /**
@@ -926,7 +973,7 @@ function ct_input_general_postdata_test() {
926
  echo "<input type='radio' id='cleantalk_general_postdata_test1' name='cleantalk_settings[general_postdata_test]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_general_postdata_test1'> " . __('Yes') . "</label>";
927
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
928
  echo "<input type='radio' id='cleantalk_general_postdata_test0' name='cleantalk_settings[general_postdata_test]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_general_postdata_test0'> " . __('No') . "</label>";
929
- @admin_addDescriptionsFields(sprintf(__('Check all POST submissions from website visitors. Enable this option if you have spam misses on website or you don`t have records about missed spam in <a href="https://cleantalk.org/my/?user_token='.@$ct_data['user_token'].'&utm_source=wp-backend&utm_medium=admin-bar" target="_blank">CleanTalk dashboard</a>.<br />СAUTION! Option can catch POST requests in WordPress backend', 'cleantalk'), $ct_options['general_postdata_test']));
930
  }
931
 
932
  function ct_input_use_ajax() {
@@ -976,7 +1023,7 @@ function ct_input_check_comments_number() {
976
  echo "<input type='radio' id='cleantalk_check_comments_number1' name='cleantalk_settings[check_comments_number]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_check_comments_number1'> " . __('Yes') . "</label>";
977
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
978
  echo "<input type='radio' id='cleantalk_check_comments_number0' name='cleantalk_settings[check_comments_number]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_check_comments_number0'> " . __('No') . "</label>";
979
- @admin_addDescriptionsFields(sprintf(__("Dont't check comments for users with above $comments_check_number comments.", 'cleantalk'), $ct_options['check_comments_number']));
980
  }
981
 
982
  function ct_input_collect_details() {
@@ -995,7 +1042,7 @@ function ct_input_collect_details() {
995
  }
996
 
997
  echo "<div id='cleantalk_anchor2' style='display:none'></div><input type=hidden name='cleantalk_settings[collect_details]' value='0' />";
998
- echo "<input type='checkbox' id='collect_details1' name='cleantalk_settings[collect_details]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='collect_details1'> " . __('Collect details about browsers') . "</label>";
999
  @admin_addDescriptionsFields(sprintf(__("Checking this box you allow plugin store information about screen size and browser plugins of website visitors. The option in a beta state.", 'cleantalk'), $ct_options['spam_firewall']));
1000
  echo "<script>
1001
  jQuery(document).ready(function(){
@@ -1159,7 +1206,7 @@ function ct_input_show_link() {
1159
  echo "<input type='radio' id='cleantalk_show_link0' name='cleantalk_settings[show_link]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_show_link0'> " . __('No') . "</label>";*/
1160
 
1161
  echo "<div id='cleantalk_anchor' style='display:none'></div><input type=hidden name='cleantalk_settings[show_link]' value='0' />";
1162
- echo "<input type='checkbox' id='cleantalk_show_link1' name='cleantalk_settings[show_link]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_show_link1'> " . __('Tell others about CleanTalk') . "</label>";
1163
  @admin_addDescriptionsFields(sprintf(__("Checking this box places a small link under the comment form that lets others know what anti-spam tool protects your site.", 'cleantalk'), $ct_options['show_link']));
1164
  echo "<script>
1165
  jQuery(document).ready(function(){
@@ -1188,7 +1235,7 @@ function ct_input_spam_firewall() {
1188
  echo "<input type='checkbox' id='cleantalk_spam_firewall1' name='cleantalk_settings[spam_firewall]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_spam_firewall1'> " . __('SpamFireWall') . "</label>";
1189
  @admin_addDescriptionsFields(sprintf(__("This option allows to filter spam bots before they access website. Also reduces CPU usage on hosting server and accelerates pages load time.", 'cleantalk'), $ct_options['spam_firewall']) .
1190
  " " .
1191
- '<a href="https://cleantalk.org/cleantalk-spam-firewall" style="font-size: 10pt; color: #666 !important" target="_blank">' . __('Learn more') . '</a>.'
1192
  );
1193
  echo "<script>
1194
  jQuery(document).ready(function(){
61
  * @param string $hook URL of hooked page
62
  */
63
  function ct_enqueue_scripts($hook) {
64
+ global $cleantalk_plugin_version;
65
+
66
+ if ($hook == 'edit-comments.php'){
67
+ //wp_enqueue_script('ct_reload_script', plugins_url('/cleantalk-rel.js', __FILE__), array(), $cleantalk_plugin_version);
68
+ }
69
+ if( $hook == 'comments_page_ct_check_spam' || $hook == 'edit-comments.php'){
70
+
71
+ $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
72
+
73
+ wp_enqueue_script('ct_comments_checkspam', plugins_url('/cleantalk-spam-protect/inc/cleantalk-comments-checkspam.js'), array(), $cleantalk_plugin_version);
74
+ wp_enqueue_script('ct_comments_editscreen', plugins_url('/cleantalk-spam-protect/inc/cleantalk-comments-editscreen.js'), array(), $cleantalk_plugin_version);
75
+
76
+ wp_localize_script( 'jquery', 'ctCommentsCheck', array(
77
+ 'ct_ajax_nonce' => $ajax_nonce,
78
+ 'ct_timeout_confirm' => __('Failed from timeout. Going to check comments again.', 'cleantalk'),
79
+ 'ct_comments_added' => __('Added 500 comments', 'cleantalk')
80
+ ));
81
+ wp_localize_script( 'jquery', 'ctCommentsScreen', array(
82
+ 'spambutton_text' => __("Find spam comments", 'cleantalk')
83
+ ));
84
+ }
85
+ if( $hook == 'users_page_ct_check_users' || $hook == 'users.php'){
86
+
87
+ $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
88
+
89
+ wp_enqueue_script('ct_users_checkspam', plugins_url('/cleantalk-spam-protect/inc/cleantalk-users-checkspam.js'), array(), $cleantalk_plugin_version);
90
+ wp_enqueue_script('ct_users_editscreen', plugins_url('/cleantalk-spam-protect/inc/cleantalk-users-editscreen.js'), array(), $cleantalk_plugin_version);
91
+
92
+ wp_localize_script( 'jquery', 'ctUsersCheck', array(
93
+ 'ct_ajax_nonce' => $ajax_nonce,
94
+ 'ct_timeout' => __('Failed from timeout. Going to check users again.', 'cleantalk'),
95
+ 'ct_timeout_delete' => __('Failed from timeout. Going to run a new attempt to delete spam users.', 'cleantalk'),
96
+ 'ct_inserted' => __('Inserted', 'cleantalk'),
97
+ 'ct_iusers' => __('users.', 'cleantalk'),
98
+ ));
99
+ wp_localize_script( 'jquery', 'ctUsersScreen', array(
100
+ 'spambutton_users_text' => __("Find spam users", 'cleantalk'),
101
+ ));
102
+ }
103
+ if( $hook == 'settings_page_cleantalk' ){
104
+
105
+ $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
106
+
107
+ wp_enqueue_script('ct_users_editscreen', plugins_url('/cleantalk-spam-protect/inc/cleantalk-admin.js'), array(), $cleantalk_plugin_version);
108
+
109
+ wp_localize_script( 'jquery', 'ctSettingsPage', array(
110
+ 'ct_ajax_nonce' => $ajax_nonce
111
+ ));
112
+ }
113
  }
114
 
115
  /**
379
  add_settings_field('cleantalk_sfw_counter', "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".__('SpamFireWall counter', 'cleantalk'), 'ct_input_sfw_counter', 'cleantalk', 'cleantalk_settings_anti_spam');
380
 
381
 
382
+ add_settings_field('cleantalk_spam_firewall', __('SpamFireWall', 'cleantalk'), 'ct_input_spam_firewall', 'cleantalk', 'cleantalk_settings_banner');
383
  add_settings_field('cleantalk_collect_details', __('Collect details about browsers', 'cleantalk'), 'ct_input_collect_details', 'cleantalk', 'cleantalk_settings_anti_spam');
384
+ add_settings_field('cleantalk_show_link', __('Tell others about CleanTalk', 'cleantalk'), 'ct_input_show_link', 'cleantalk', 'cleantalk_settings_banner');
385
  }
386
  }
387
 
542
  //Compile user's counter string
543
  $user_counter=Array('accepted'=>$ct_data['user_counter']['accepted'], 'blocked'=>$ct_data['user_counter']['blocked'], 'all'=>$ct_data['user_counter']['accepted'] + $ct_data['user_counter']['blocked'], 'since'=>$ct_data['user_counter']['since']);
544
  //Previous version $user_counter_str='<span style="color: white;">Since '.$user_counter['since'].': ' .$user_counter['all']*/. '</span> / <span style="color: green;">' .$user_counter['accepted']. '</span> / <span style="color: red;">' .$user_counter['blocked']. '</span>';
545
+ $user_counter_str='<span style="color: white;">' . __('Since', 'cleantalk') . '&nbsp;' . $user_counter['since'].': </span><span style="color: green;">' .$user_counter['accepted']. '</span> / <span style="color: red;">' .$user_counter['blocked']. '</span>';
546
 
547
  $all_time_counter_str='';
548
  //Don't compile if all time counter disabled
549
  if(isset($ct_options['all_time_counter']) && $ct_options['all_time_counter']=='1'){
550
  $all_time_counter=Array('accepted'=>$ct_data['all_time_counter']['accepted'], 'blocked'=>$ct_data['all_time_counter']['blocked'], 'all'=>$ct_data['all_time_counter']['accepted'] + $ct_data['all_time_counter']['blocked']);
551
+ $all_time_counter_str='<span style="color: white;" title="'.__('All / Allowed / Blocked submissions. The number of submissions is being counted since CleanTalk plugin installation.', 'cleantalk').'"><span style="color: white;"> | ' . __('All', 'cleantalk') . ': ' .$all_time_counter['all']. '</span> / <span style="color: green;">' .$all_time_counter['accepted']. '</span> / <span style="color: red;">' .$all_time_counter['blocked']. '</span></span>';
552
  }
553
 
554
  $daily_counter_str='';
556
  if(isset($ct_options['daily_counter']) && $ct_options['daily_counter']=='1'){
557
  $daily_counter=Array('accepted'=>array_sum($ct_data['array_accepted']), 'blocked'=>array_sum($ct_data['array_blocked']), 'all'=>array_sum($ct_data['array_accepted']) + array_sum($ct_data['array_blocked']));
558
  //Previous version $daily_counter_str='<span style="color: white;" title="'.__('All / Allowed / Blocked submissions. The number of submissions for past 24 hours. ', 'cleantalk').'"><span style="color: white;"> | Day: ' .$daily_counter['all']. '</span> / <span style="color: green;">' .$daily_counter['accepted']. '</span> / <span style="color: red;">' .$daily_counter['blocked']. '</span></span>';
559
+ $daily_counter_str='<span style="color: white;" title="'.__('Allowed / Blocked submissions. The number of submissions for past 24 hours. ', 'cleantalk').'"><span style="color: white;"> | ' . __('Day', 'cleantalk') . ': </span><span style="color: green;">' .$daily_counter['accepted']. '</span> / <span style="color: red;">' .$daily_counter['blocked']. '</span></span>';
560
  }
561
  $sfw_counter_str='';
562
  //Don't compile if SFW counter disabled
751
  $is_wpmu=true;
752
  }
753
 
754
+ //echo "<script src='".plugins_url( 'cleantalk-admin.js', __FILE__ )."?ver=".$cleantalk_plugin_version."'></script>\n";
755
  if (ct_valid_key($value) === false && !$is_wpmu) {
756
  echo "<script>var cleantalk_good_key=false;</script>";
757
  if (function_exists('curl_init') && function_exists('json_decode')) {
872
  echo "<input type='radio' id='cleantalk_general_contact_forms_test1' name='cleantalk_settings[general_contact_forms_test]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_general_contact_forms_test1'> " . __('Yes') . "</label>";
873
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
874
  echo "<input type='radio' id='cleantalk_general_contact_forms_test0' name='cleantalk_settings[general_contact_forms_test]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_general_contact_forms_test0'> " . __('No') . "</label>";
875
+ admin_addDescriptionsFields(__('Anti spam test for any WordPress themes or contacts forms.', 'cleantalk'));
876
  }
877
 
878
  /**
973
  echo "<input type='radio' id='cleantalk_general_postdata_test1' name='cleantalk_settings[general_postdata_test]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_general_postdata_test1'> " . __('Yes') . "</label>";
974
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
975
  echo "<input type='radio' id='cleantalk_general_postdata_test0' name='cleantalk_settings[general_postdata_test]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_general_postdata_test0'> " . __('No') . "</label>";
976
+ @admin_addDescriptionsFields(sprintf(__('Check all POST submissions from website visitors. Enable this option if you have spam misses on website or you don`t have records about missed spam here:', 'cleantalk') . '&nbsp;' . '<a href="https://cleantalk.org/my/?user_token='.@$ct_data['user_token'].'&utm_source=wp-backend&utm_medium=admin-bar" target="_blank">' . __('CleanTalk dashboard', 'cleantalk') . '</a>.<br />' . __('СAUTION! Option can catch POST requests in WordPress backend', 'cleantalk'), $ct_options['general_postdata_test']));
977
  }
978
 
979
  function ct_input_use_ajax() {
1023
  echo "<input type='radio' id='cleantalk_check_comments_number1' name='cleantalk_settings[check_comments_number]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_check_comments_number1'> " . __('Yes') . "</label>";
1024
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
1025
  echo "<input type='radio' id='cleantalk_check_comments_number0' name='cleantalk_settings[check_comments_number]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_check_comments_number0'> " . __('No') . "</label>";
1026
+ @admin_addDescriptionsFields(sprintf(__("Dont't check comments for users with above", 'cleantalk') . $comments_check_number . __("comments.", 'cleantalk'), $ct_options['check_comments_number']));
1027
  }
1028
 
1029
  function ct_input_collect_details() {
1042
  }
1043
 
1044
  echo "<div id='cleantalk_anchor2' style='display:none'></div><input type=hidden name='cleantalk_settings[collect_details]' value='0' />";
1045
+ echo "<input type='checkbox' id='collect_details1' name='cleantalk_settings[collect_details]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='collect_details1'> " . __('Collect details about browsers', 'cleantalk') . "</label>";
1046
  @admin_addDescriptionsFields(sprintf(__("Checking this box you allow plugin store information about screen size and browser plugins of website visitors. The option in a beta state.", 'cleantalk'), $ct_options['spam_firewall']));
1047
  echo "<script>
1048
  jQuery(document).ready(function(){
1206
  echo "<input type='radio' id='cleantalk_show_link0' name='cleantalk_settings[show_link]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_show_link0'> " . __('No') . "</label>";*/
1207
 
1208
  echo "<div id='cleantalk_anchor' style='display:none'></div><input type=hidden name='cleantalk_settings[show_link]' value='0' />";
1209
+ echo "<input type='checkbox' id='cleantalk_show_link1' name='cleantalk_settings[show_link]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_show_link1'> " . __('Tell others about CleanTalk', 'cleantalk') . "</label>";
1210
  @admin_addDescriptionsFields(sprintf(__("Checking this box places a small link under the comment form that lets others know what anti-spam tool protects your site.", 'cleantalk'), $ct_options['show_link']));
1211
  echo "<script>
1212
  jQuery(document).ready(function(){
1235
  echo "<input type='checkbox' id='cleantalk_spam_firewall1' name='cleantalk_settings[spam_firewall]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_spam_firewall1'> " . __('SpamFireWall') . "</label>";
1236
  @admin_addDescriptionsFields(sprintf(__("This option allows to filter spam bots before they access website. Also reduces CPU usage on hosting server and accelerates pages load time.", 'cleantalk'), $ct_options['spam_firewall']) .
1237
  " " .
1238
+ '<a href="https://cleantalk.org/cleantalk-spam-firewall" style="font-size: 10pt; color: #666 !important" target="_blank">' . __('Learn more', 'cleantalk') . '</a>.'
1239
  );
1240
  echo "<script>
1241
  jQuery(document).ready(function(){
inc/cleantalk-ajax.php CHANGED
@@ -5,6 +5,12 @@ global $cleantalk_hooked_actions;
5
  AJAX functions
6
  */
7
 
 
 
 
 
 
 
8
  /*hooks for AJAX Login & Register email validation*/
9
  add_action( 'wp_ajax_nopriv_validate_email', 'ct_validate_email_ajaxlogin',1 );
10
  add_action( 'wp_ajax_validate_email', 'ct_validate_email_ajaxlogin',1 );
@@ -518,6 +524,23 @@ function ct_ajax_hook($message_obj = false)
518
  print json_encode($result);
519
  die();
520
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  else
522
  {
523
  print $ct_result->comment;
5
  AJAX functions
6
  */
7
 
8
+ //$cleantalk_ajax_actions_to_check - array for POST 'actions' we should check.
9
+
10
+ $cleantalk_ajax_actions_to_check[] = 'qcf_validate_form'; //Quick Contact Form
11
+
12
+ //cleantalk_hooked_actions[] - array for POST 'actions' which were direct hooked.
13
+
14
  /*hooks for AJAX Login & Register email validation*/
15
  add_action( 'wp_ajax_nopriv_validate_email', 'ct_validate_email_ajaxlogin',1 );
16
  add_action( 'wp_ajax_validate_email', 'ct_validate_email_ajaxlogin',1 );
524
  print json_encode($result);
525
  die();
526
  }
527
+ // Quick Contact Form
528
+ elseif($_POST['action'] == 'qcf_validate_form')
529
+ {
530
+ $result = Array(
531
+ blurb => "<h1>".$ct_result->comment."</h1>",
532
+ display => "Oops, got a few problems here",
533
+ errors => array(
534
+ 0 => array(
535
+ error => 'error',
536
+ name => 'name'
537
+ ),
538
+ ),
539
+ success => 'false',
540
+ );
541
+ print json_encode($result);
542
+ die();
543
+ }
544
  else
545
  {
546
  print $ct_result->comment;
inc/cleantalk-comments-checkspam.js CHANGED
@@ -1,4 +1,5 @@
1
  var working = false;
 
2
 
3
  String.prototype.format = String.prototype.f = function ()
4
  {
@@ -82,7 +83,7 @@ function ct_send_comments()
82
  },
83
  error: function(jqXHR, textStatus, errorThrown) {
84
  if(textStatus === 'timeout') {
85
- if(confirm('Failed from timeout. Going to check comments again.')) {
86
  ct_send_comments();
87
  } else {
88
  }
@@ -124,7 +125,7 @@ function ct_insert_comments()
124
  success: function(msg){
125
  if(msg=='ok')
126
  {
127
- alert('Added 500 comments');
128
  }
129
  }
130
  });
@@ -180,93 +181,97 @@ function ct_delete_checked()
180
  }
181
  });
182
  }
183
- jQuery("#ct_check_spam_button").click(function(){
184
- jQuery('#ct_working_message').show();
185
- jQuery('#ct_check_spam_button').hide();
186
- jQuery('#ct_info_message').hide();
187
- jQuery('#ct_check_comments_table').hide();
188
- jQuery('#ct_delete_all').hide();
189
- jQuery('#ct_delete_checked').hide();
190
- jQuery('#ct_preloader').show();
191
- jQuery('#ct_search_info').hide();
192
 
193
- working=true;
194
- ct_show_info();
195
- ct_clear_comments();
196
- });
 
 
 
 
 
197
 
198
- jQuery("#ct_insert_comments").click(function(){
199
- ct_insert_comments();
200
- });
201
- jQuery("#ct_delete_all").click(function(){
202
- if (!confirm('Delete all spam comments?')) {
203
- return false;
204
- }
205
 
206
- jQuery('#ct_checking_status').hide();
207
- jQuery('#ct_tools_buttons').hide();
208
- jQuery('#ct_search_info').hide();
209
- jQuery('#ct_bottom_tools').hide();
210
- jQuery('#ct_check_comments_table').hide();
211
- jQuery('#ct_deleting_message').show();
212
- jQuery("html, body").animate({ scrollTop: 0 }, "slow");
213
- ct_delete_all();
214
- });
215
- jQuery("#ct_delete_checked").click(function(){
216
- ct_delete_checked();
217
- });
218
- jQuery(".cleantalk_comment").mouseover(function(){
219
- id = jQuery(this).attr("data-id");
220
- jQuery("#cleantalk_button_set_"+id).show();
221
- });
222
- jQuery(".cleantalk_comment").mouseout(function(){
223
- id = jQuery(this).attr("data-id");
224
- jQuery("#cleantalk_button_set_"+id).hide();
225
- });
226
- jQuery(".cleantalk_delete_button").click(function(){
227
- id = jQuery(this).attr("data-id");
228
- ids=Array();
229
- ids[0]=id;
230
- var data = {
231
- 'action': 'ajax_delete_checked',
232
- 'security': ajax_nonce,
233
- 'ids':ids
234
- };
235
- jQuery.ajax({
236
- type: "POST",
237
- url: ajaxurl,
238
- data: data,
239
- success: function(msg){
240
- close_animate=false;
241
- jQuery("#comment-"+id).hide();
242
- jQuery("#comment-"+id).remove();
243
- close_animate=true;
244
  }
 
 
 
 
 
 
 
 
 
245
  });
246
- });
247
- jQuery(".cleantalk_delete_button").click(function(){
248
- id = jQuery(this).attr("data-id");
249
- animate_comment(0.3, id);
250
- });
251
- jQuery(".cleantalk_delete_from_list_button").click(function(){
252
- ct_id = jQuery(this).attr("data-id");
253
- var data = {
254
- 'action': 'ajax_ct_delete_from_list',
255
- 'security': ajax_nonce,
256
- 'id': ct_id
257
- };
258
- jQuery.ajax({
259
- type: "POST",
260
- url: ajaxurl,
261
- data: data,
262
- success: function(msg){
263
- jQuery("#comment-"+ct_id).fadeOut('slow', function(){
264
- jQuery("#comment-"+ct_id).remove();
265
- });
266
- },
267
  });
268
- });
269
- jQuery(document).ready(function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  working=true;
271
  ct_show_info();
272
  working=false;
1
  var working = false;
2
+ var ajax_nonce = ctCommentsCheck.ct_ajax_nonce;
3
 
4
  String.prototype.format = String.prototype.f = function ()
5
  {
83
  },
84
  error: function(jqXHR, textStatus, errorThrown) {
85
  if(textStatus === 'timeout') {
86
+ if(confirm(ctCommentsCheck.ct_timeout_confirm)) {
87
  ct_send_comments();
88
  } else {
89
  }
125
  success: function(msg){
126
  if(msg=='ok')
127
  {
128
+ alert(ctCommentsCheck.ct_comments_added);
129
  }
130
  }
131
  });
181
  }
182
  });
183
  }
184
+
185
+
186
+ jQuery(document).ready(function(){
 
 
 
 
 
 
187
 
188
+ jQuery("#ct_check_spam_button").click(function(){
189
+ jQuery('#ct_working_message').show();
190
+ jQuery('#ct_check_spam_button').hide();
191
+ jQuery('#ct_info_message').hide();
192
+ jQuery('#ct_check_comments_table').hide();
193
+ jQuery('#ct_delete_all').hide();
194
+ jQuery('#ct_delete_checked').hide();
195
+ jQuery('#ct_preloader').show();
196
+ jQuery('#ct_search_info').hide();
197
 
198
+ working=true;
199
+ ct_show_info();
200
+ ct_clear_comments();
201
+ });
 
 
 
202
 
203
+ jQuery("#ct_insert_comments").click(function(){
204
+ ct_insert_comments();
205
+ });
206
+ jQuery("#ct_delete_all").click(function(){
207
+ if (!confirm('Delete all spam comments?')) {
208
+ return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
210
+
211
+ jQuery('#ct_checking_status').hide();
212
+ jQuery('#ct_tools_buttons').hide();
213
+ jQuery('#ct_search_info').hide();
214
+ jQuery('#ct_bottom_tools').hide();
215
+ jQuery('#ct_check_comments_table').hide();
216
+ jQuery('#ct_deleting_message').show();
217
+ jQuery("html, body").animate({ scrollTop: 0 }, "slow");
218
+ ct_delete_all();
219
  });
220
+ jQuery("#ct_delete_checked").click(function(){
221
+ ct_delete_checked();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  });
223
+ jQuery(".cleantalk_comment").mouseover(function(){
224
+ id = jQuery(this).attr("data-id");
225
+ jQuery("#cleantalk_button_set_"+id).show();
226
+ });
227
+ jQuery(".cleantalk_comment").mouseout(function(){
228
+ id = jQuery(this).attr("data-id");
229
+ jQuery("#cleantalk_button_set_"+id).hide();
230
+ });
231
+ jQuery(".cleantalk_delete_button").click(function(){
232
+ id = jQuery(this).attr("data-id");
233
+ ids=Array();
234
+ ids[0]=id;
235
+ var data = {
236
+ 'action': 'ajax_delete_checked',
237
+ 'security': ajax_nonce,
238
+ 'ids':ids
239
+ };
240
+ jQuery.ajax({
241
+ type: "POST",
242
+ url: ajaxurl,
243
+ data: data,
244
+ success: function(msg){
245
+ close_animate=false;
246
+ jQuery("#comment-"+id).hide();
247
+ jQuery("#comment-"+id).remove();
248
+ close_animate=true;
249
+ }
250
+ });
251
+ });
252
+ jQuery(".cleantalk_delete_button").click(function(){
253
+ id = jQuery(this).attr("data-id");
254
+ animate_comment(0.3, id);
255
+ });
256
+ jQuery(".cleantalk_delete_from_list_button").click(function(){
257
+ ct_id = jQuery(this).attr("data-id");
258
+ var data = {
259
+ 'action': 'ajax_ct_delete_from_list',
260
+ 'security': ajax_nonce,
261
+ 'id': ct_id
262
+ };
263
+ jQuery.ajax({
264
+ type: "POST",
265
+ url: ajaxurl,
266
+ data: data,
267
+ success: function(msg){
268
+ jQuery("#comment-"+ct_id).fadeOut('slow', function(){
269
+ jQuery("#comment-"+ct_id).remove();
270
+ });
271
+ },
272
+ });
273
+ });
274
+
275
  working=true;
276
  ct_show_info();
277
  working=false;
inc/cleantalk-comments-editscreen.js CHANGED
@@ -1,17 +1,3 @@
1
- jQuery('#post-query-submit').after('<a href="edit-comments.php?page=ct_check_spam" class="button">'+spambutton_text+'</a>');
2
- jQuery("#ct_check_spam_button").click(function(){
3
- var data = {
4
- 'action': 'ajax_check_comments',
5
- security: ajax_nonce
6
- };
7
-
8
- jQuery.ajax({
9
- type: "POST",
10
- url: ajaxurl,
11
- data: data,
12
- success: function(msg){
13
- alert(msg);
14
- }
15
- });
16
-
17
  });
1
+ jQuery(document).ready(function(){
2
+ jQuery('#post-query-submit').after('<a href="edit-comments.php?page=ct_check_spam" class="button">'+ctCommentsScreen.spambutton_text+'</a>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  });
inc/cleantalk-comments.php CHANGED
@@ -153,11 +153,11 @@ function ct_show_checkspam_page()
153
  {
154
  if($i==$page)
155
  {
156
- print "<a href='edit-comments.php?page=ct_check_spam&spam_page=$i'><b>$i</b></a> ";
157
  }
158
  else
159
  {
160
- print "<a href='edit-comments.php?page=ct_check_spam&spam_page=$i'>$i</a> ";
161
  }
162
  }
163
  ?>
@@ -255,27 +255,7 @@ function ct_show_checkspam_page()
255
  add_action('admin_print_footer_scripts','ct_add_checkspam_button');
256
  function ct_add_checkspam_button()
257
  {
258
- $screen = get_current_screen();
259
- $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
260
- ?>
261
- <script>
262
- var ajax_nonce='<?php echo $ajax_nonce; ?>';
263
- var spambutton_text='<?php _e("Find spam comments", 'cleantalk'); ?>';
264
- </script>
265
- <?php
266
- if(isset($screen) && count($screen)){
267
- if( $screen->id == 'edit-comments' ){
268
- ?>
269
- <script src="<?php print plugins_url( 'cleantalk-comments-editscreen.js', __FILE__ ); ?>"></script>
270
- <?php
271
- }
272
- if($screen->id == 'comments_page_ct_check_spam')
273
- {
274
- ?>
275
- <script src="<?php print plugins_url( 'cleantalk-comments-checkspam.js', __FILE__ ); ?>"></script>
276
- <?php
277
- }
278
- }
279
  }
280
 
281
 
@@ -321,7 +301,7 @@ function ct_ajax_check_comments()
321
  $data=implode(',',$data);
322
 
323
  $request=Array();
324
- $request['method_name'] = 'spam_check';
325
  $request['auth_key'] = $ct_options['apikey'];
326
  $request['data'] = $data;
327
  $url='https://api.cleantalk.org';
@@ -359,10 +339,13 @@ function ct_ajax_check_comments()
359
  $mark_spam_email = true;
360
  }
361
 
362
- // Do not use the spam records becaus it was a spammer far time ago.
 
363
  if (time() - $ip_update_time > 86400 * $ct_ip_penalty_days) {
364
  $mark_spam_ip = false;
365
  }
 
 
366
  if ($mark_spam_ip || $mark_spam_email) {
367
  add_comment_meta($u[$i]->comment_ID,'ct_marked_as_spam','1',true);
368
  }
153
  {
154
  if($i==$page)
155
  {
156
+ print "<a href='edit-comments.php?page=ct_check_spam&spam_page=$i&ct_worked=1'><b>$i</b></a> ";
157
  }
158
  else
159
  {
160
+ print "<a href='edit-comments.php?page=ct_check_spam&spam_page=$i&ct_worked=1'>$i</a> ";
161
  }
162
  }
163
  ?>
255
  add_action('admin_print_footer_scripts','ct_add_checkspam_button');
256
  function ct_add_checkspam_button()
257
  {
258
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  }
260
 
261
 
301
  $data=implode(',',$data);
302
 
303
  $request=Array();
304
+ $request['method_name'] = 'spam_check_cms';
305
  $request['auth_key'] = $ct_options['apikey'];
306
  $request['data'] = $data;
307
  $url='https://api.cleantalk.org';
339
  $mark_spam_email = true;
340
  }
341
 
342
+ /*
343
+ // Do not use the spam records becaus it was a spammer far time ago.
344
  if (time() - $ip_update_time > 86400 * $ct_ip_penalty_days) {
345
  $mark_spam_ip = false;
346
  }
347
+ //*/
348
+
349
  if ($mark_spam_ip || $mark_spam_email) {
350
  add_comment_meta($u[$i]->comment_ID,'ct_marked_as_spam','1',true);
351
  }
inc/cleantalk-common.php CHANGED
@@ -464,7 +464,7 @@ function ct_def_options() {
464
  return array(
465
  'spam_firewall' => '0',
466
  'server' => 'http://moderate.cleantalk.org',
467
- 'apikey' => __('', 'cleantalk'),
468
  'autoPubRevelantMess' => '0',
469
  //Forms for protection
470
  'registrations_test' => '1',
464
  return array(
465
  'spam_firewall' => '0',
466
  'server' => 'http://moderate.cleantalk.org',
467
+ 'apikey' => '',
468
  'autoPubRevelantMess' => '0',
469
  //Forms for protection
470
  'registrations_test' => '1',
inc/cleantalk-public.php CHANGED
@@ -663,6 +663,59 @@ setTimeout(function(){
663
  }
664
  }
665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  /**
667
  * Is enable for user group
668
  * @return boolean
@@ -1247,7 +1300,7 @@ function ct_register_form() {
1247
  }
1248
 
1249
  ct_add_hidden_fields(true, $ct_checkjs_register_form, false);
1250
-
1251
  ct_setup_page_timer();
1252
 
1253
  return null;
@@ -1482,6 +1535,21 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1482
  $sender_info['cookie_checkjs_passed'] = $checkjs;
1483
  }
1484
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1485
  $sender_info = json_encode($sender_info);
1486
  if ($sender_info === false) {
1487
  $sender_info= '';
663
  }
664
  }
665
 
666
+ /**
667
+ * Adds mouse tracking via JavaScript
668
+ * @param bool $random_key switch on generation random key for every page load
669
+ */
670
+ function ct_add_mouse_tracking($return_string = false){
671
+
672
+ $js_script = '<script type="text/javascript">
673
+ function ctSetCookie(c_name, value, def_value) {
674
+ document.cookie = c_name + "=" + escape(value) + "; path=/";
675
+ }
676
+ setTimeout(function(){
677
+ ctSetCookie("ct_timezone", d.getTimezoneOffset()/60, "0");
678
+ },1000);
679
+ //Stop observing function
680
+ function ctMouseStopData(){
681
+ window.removeEventListener("mousemove", func);
682
+ clearInterval(ctMouseReadInterval);
683
+ clearInterval(ctMouseWriteDataInterval);
684
+ }
685
+ var d = new Date(),
686
+ ctTimeMs = new Date().getTime(),
687
+ ctMouseEventTimerFlag = true, //Reading interval flag
688
+ ctMouseData = "[",
689
+ ctMouseDataCounter = 0;
690
+ //Reading interval
691
+ var ctMouseReadInterval = setInterval(function(){
692
+ ctMouseEventTimerFlag = true;
693
+ }, 300);
694
+ //Writting interval
695
+ var ctMouseWriteDataInterval = setInterval(function(){
696
+ var ctMouseDataToSend = ctMouseData.slice(0,-1).concat("]");
697
+ ctSetCookie("ct_pointer_data", ctMouseDataToSend, "0");
698
+ }, 3000);
699
+ //Logging mouse position each 300 ms
700
+ var func = function output(event){
701
+ if(ctMouseEventTimerFlag == true){
702
+ var mouseDate = new Date();
703
+ ctMouseData += "[" + event.pageY + "," + event.pageX + "," + (mouseDate.getTime() - ctTimeMs) + "],";
704
+ ctMouseDataCounter++;
705
+ ctMouseEventTimerFlag = false;
706
+ if(ctMouseDataCounter >= 100)
707
+ ctMouseStopData();
708
+ }
709
+ }
710
+ window.addEventListener("mousemove", func);
711
+ </script>';
712
+
713
+ if($return_string)
714
+ return $js_script;
715
+ else
716
+ echo $js_script;
717
+ }
718
+
719
  /**
720
  * Is enable for user group
721
  * @return boolean
1300
  }
1301
 
1302
  ct_add_hidden_fields(true, $ct_checkjs_register_form, false);
1303
+ ct_add_mouse_tracking(false);
1304
  ct_setup_page_timer();
1305
 
1306
  return null;
1535
  $sender_info['cookie_checkjs_passed'] = $checkjs;
1536
  }
1537
 
1538
+ // Pointer data
1539
+ if(isset($_COOKIE['ct_pointer_data']))
1540
+ $pointer_data = json_decode ($_COOKIE['ct_pointer_data']);
1541
+ else
1542
+ $pointer_data = 0;
1543
+
1544
+ // Timezone from JS
1545
+ if(isset($_COOKIE['ct_timezone']))
1546
+ $js_timezone = $_COOKIE['ct_timezone'];
1547
+ else
1548
+ $js_timezone = 0;
1549
+
1550
+ $sender_info['mouse_cursor_positions'] = $pointer_data;
1551
+ $sender_info['js_timezone'] = $js_timezone;
1552
+
1553
  $sender_info = json_encode($sender_info);
1554
  if ($sender_info === false) {
1555
  $sender_info= '';
inc/cleantalk-users-checkspam.js CHANGED
@@ -1,4 +1,5 @@
1
  var working=false;
 
2
 
3
  String.prototype.format = String.prototype.f = function ()
4
  {
@@ -77,12 +78,13 @@ function ct_send_users()
77
  else
78
  {
79
  working=false;
80
- alert(msg);
 
81
  }
82
  },
83
  error: function(jqXHR, textStatus, errorThrown) {
84
  if(textStatus === 'timeout') {
85
- alert('Failed from timeout. Going to check users again.');
86
  ct_send_users();
87
  }
88
  },
@@ -121,7 +123,7 @@ function ct_insert_users()
121
  url: ajaxurl,
122
  data: data,
123
  success: function(msg){
124
- alert('Inserted ' + msg + ' users.');
125
  }
126
  });
127
  }
@@ -149,7 +151,7 @@ function ct_delete_all_users()
149
  },
150
  error: function(jqXHR, textStatus, errorThrown) {
151
  if(textStatus === 'timeout') {
152
- alert('Failed from timeout. Going to run a new attempt to delete spam users.');
153
  ct_delete_all_users();
154
  }
155
  },
@@ -185,94 +187,95 @@ function ct_delete_checked_users()
185
  return false;
186
  }
187
 
188
- jQuery(".cleantalk_delete_user_button").click(function(){
189
- id = jQuery(this).attr("data-id");
190
- ids=Array();
191
- ids[0]=id;
192
- var data = {
193
- 'action': 'ajax_delete_checked_users',
194
- 'security': ajax_nonce,
195
- 'ids':ids
196
- };
197
- jQuery.ajax({
198
- type: "POST",
199
- url: ajaxurl,
200
- data: data,
201
- success: function(msg){
202
- close_animate=false;
203
- jQuery("#comment-"+id).hide();
204
- jQuery("#comment-"+id).remove();
205
- close_animate=true;
206
- },
207
- timeout: 180000
 
 
 
 
 
 
 
208
  });
209
- });
210
- jQuery(".cleantalk_delete_user_button").click(function(){
211
- id = jQuery(this).attr("data-id");
212
- animate_comment(0.3, id);
213
- });
214
 
215
- jQuery("#ct_check_users_button").click(function(){
216
- jQuery('#ct_working_message').show();
217
- jQuery('#ct_check_users_button').hide();
218
- jQuery('#ct_info_message').hide();
219
- working=true;
220
- ct_clear_users();
221
- });
222
- jQuery("#ct_check_users_button").click(function(){
223
 
224
- // jQuery('#ct_checking_users_status').html('');
225
- jQuery('#ct_check_users_table').hide();
226
- jQuery('#ct_delete_all_users').hide();
227
- jQuery('#ct_delete_checked_users').hide();
228
- jQuery('#ct_preloader').show();
229
- working=true;
230
- ct_show_users_info();
231
- });
232
- jQuery("#ct_insert_users").click(function(){
233
- ct_insert_users();
234
- });
235
 
236
- jQuery("#ct_stop_deletion").click(function(){
237
- //window.location.reload();
238
- window.location.href='users.php?page=ct_check_users&ct_worked=1';
239
- });
240
- jQuery("#ct_delete_all_users").click(function(){
241
- if (!confirm('Delete all spam users?')) {
242
- return false;
243
- }
244
 
245
- jQuery('#ct_checking_users_status').hide();
246
- jQuery('#ct_check_users_table').hide();
247
- jQuery('#ct_tools_buttons').hide();
248
- jQuery('#ct_info_message').hide();
249
- jQuery('#ct_ajax_info_users').hide();
250
- jQuery('#ct_check_users_table').hide();
251
- jQuery('#ct_check_users_button').hide();
252
- jQuery('#ct_search_info').hide();
253
- jQuery('#ct_deleting_message').show();
254
- jQuery('#ct_preloader').show();
255
- jQuery('#ct_stop_deletion').show();
256
- jQuery("html, body").animate({ scrollTop: 0 }, "slow");
257
- ct_delete_all_users();
258
- });
259
- jQuery("#ct_delete_checked_users").click(function(){
260
- if (!confirm('Delete selected users?')) {
261
- return false;
262
- }
263
 
264
- ct_delete_checked_users();
265
- });
266
- jQuery(".cleantalk_user").mouseover(function(){
267
- id = jQuery(this).attr("data-id");
268
- jQuery("#cleantalk_delete_user_"+id).show();
269
- });
270
- jQuery(".cleantalk_user").mouseout(function(){
271
- id = jQuery(this).attr("data-id");
272
- jQuery("#cleantalk_delete_user_"+id).hide();
273
- });
274
 
275
- jQuery(document).ready(function(){
276
  working=true;
277
  ct_show_users_info();
278
  working=false;
1
  var working=false;
2
+ var ajax_nonce = ctUsersCheck.ct_ajax_nonce;
3
 
4
  String.prototype.format = String.prototype.f = function ()
5
  {
78
  else
79
  {
80
  working=false;
81
+ alert('Server response: ' + msg);
82
+ location.href='users.php?page=ct_check_users&ct_worked=1';
83
  }
84
  },
85
  error: function(jqXHR, textStatus, errorThrown) {
86
  if(textStatus === 'timeout') {
87
+ alert(ctUsersCheck.ct_timeout);
88
  ct_send_users();
89
  }
90
  },
123
  url: ajaxurl,
124
  data: data,
125
  success: function(msg){
126
+ alert(ctUsersCheck.ct_inserted + ' ' + msg + ' ' + ctUsersCheck.ct_iusers);
127
  }
128
  });
129
  }
151
  },
152
  error: function(jqXHR, textStatus, errorThrown) {
153
  if(textStatus === 'timeout') {
154
+ alert(ctUsersCheck.ct_timeout_delete);
155
  ct_delete_all_users();
156
  }
157
  },
187
  return false;
188
  }
189
 
190
+ jQuery(document).ready(function(){
191
+
192
+ jQuery(".cleantalk_delete_user_button").click(function(){
193
+ id = jQuery(this).attr("data-id");
194
+ ids=Array();
195
+ ids[0]=id;
196
+ var data = {
197
+ 'action': 'ajax_delete_checked_users',
198
+ 'security': ajax_nonce,
199
+ 'ids':ids
200
+ };
201
+ jQuery.ajax({
202
+ type: "POST",
203
+ url: ajaxurl,
204
+ data: data,
205
+ success: function(msg){
206
+ close_animate=false;
207
+ jQuery("#comment-"+id).hide();
208
+ jQuery("#comment-"+id).remove();
209
+ close_animate=true;
210
+ },
211
+ timeout: 180000
212
+ });
213
+ });
214
+ jQuery(".cleantalk_delete_user_button").click(function(){
215
+ id = jQuery(this).attr("data-id");
216
+ animate_comment(0.3, id);
217
  });
 
 
 
 
 
218
 
219
+ jQuery("#ct_check_users_button").click(function(){
220
+ jQuery('#ct_working_message').show();
221
+ jQuery('#ct_check_users_button').hide();
222
+ jQuery('#ct_info_message').hide();
223
+ working=true;
224
+ ct_clear_users();
225
+ });
226
+ jQuery("#ct_check_users_button").click(function(){
227
 
228
+ // jQuery('#ct_checking_users_status').html('');
229
+ jQuery('#ct_check_users_table').hide();
230
+ jQuery('#ct_delete_all_users').hide();
231
+ jQuery('#ct_delete_checked_users').hide();
232
+ jQuery('#ct_preloader').show();
233
+ working=true;
234
+ ct_show_users_info();
235
+ });
236
+ jQuery("#ct_insert_users").click(function(){
237
+ ct_insert_users();
238
+ });
239
 
240
+ jQuery("#ct_stop_deletion").click(function(){
241
+ //window.location.reload();
242
+ window.location.href='users.php?page=ct_check_users&ct_worked=1';
243
+ });
244
+ jQuery("#ct_delete_all_users").click(function(){
245
+ if (!confirm('Delete all spam users?')) {
246
+ return false;
247
+ }
248
 
249
+ jQuery('#ct_checking_users_status').hide();
250
+ jQuery('#ct_check_users_table').hide();
251
+ jQuery('#ct_tools_buttons').hide();
252
+ jQuery('#ct_info_message').hide();
253
+ jQuery('#ct_ajax_info_users').hide();
254
+ jQuery('#ct_check_users_table').hide();
255
+ jQuery('#ct_check_users_button').hide();
256
+ jQuery('#ct_search_info').hide();
257
+ jQuery('#ct_deleting_message').show();
258
+ jQuery('#ct_preloader').show();
259
+ jQuery('#ct_stop_deletion').show();
260
+ jQuery("html, body").animate({ scrollTop: 0 }, "slow");
261
+ ct_delete_all_users();
262
+ });
263
+ jQuery("#ct_delete_checked_users").click(function(){
264
+ if (!confirm('Delete selected users?')) {
265
+ return false;
266
+ }
267
 
268
+ ct_delete_checked_users();
269
+ });
270
+ jQuery(".cleantalk_user").mouseover(function(){
271
+ id = jQuery(this).attr("data-id");
272
+ jQuery("#cleantalk_delete_user_"+id).show();
273
+ });
274
+ jQuery(".cleantalk_user").mouseout(function(){
275
+ id = jQuery(this).attr("data-id");
276
+ jQuery("#cleantalk_delete_user_"+id).hide();
277
+ });
278
 
 
279
  working=true;
280
  ct_show_users_info();
281
  working=false;
inc/cleantalk-users-editscreen.js CHANGED
@@ -1,17 +1,3 @@
1
- jQuery('#changeit').after(' <a href="users.php?page=ct_check_users" class="button" style="margin-top:1px;">'+spambutton_users_text+'</a>');
2
- jQuery("#ct_check_users_button").click(function(){
3
- var data = {
4
- 'action': 'ajax_check_users',
5
- security: ajax_nonce
6
- };
7
-
8
- jQuery.ajax({
9
- type: "POST",
10
- url: ajaxurl,
11
- data: data,
12
- success: function(msg){
13
- alert(msg);
14
- }
15
- });
16
-
17
  });
1
+ jQuery(document).ready(function(){
2
+ jQuery('#changeit').after(' <a href="users.php?page=ct_check_users" class="button" style="margin-top:1px;">'+ctUsersScreen.spambutton_users_text+'</a>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  });
inc/cleantalk-users.php CHANGED
@@ -154,11 +154,11 @@ $cnt_spam1=$r[0]['cnt'];
154
  {
155
  if($i==$page)
156
  {
157
- print "<a href='users.php?page=ct_check_users&spam_page=$i'><b>$i</b></a> ";
158
  }
159
  else
160
  {
161
- print "<a href='users.php?page=ct_check_users&spam_page=$i'>$i</a> ";
162
  }
163
  }
164
  ?>
@@ -213,27 +213,6 @@ function ct_add_users_button()
213
  {
214
  global $cleantalk_plugin_version;
215
 
216
- $screen = get_current_screen();
217
- $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
218
- ?>
219
- <script>
220
- var ajax_nonce='<?php echo $ajax_nonce; ?>';
221
- var spambutton_users_text='<?php _e("Find spam users", 'cleantalk'); ?>';
222
- </script>
223
- <?php
224
- if(isset($screen) && count($screen)){
225
- if( $screen->id == 'users' ){
226
- ?>
227
- <script src="<?php print plugins_url( 'cleantalk-users-editscreen.js?v=' . $cleantalk_plugin_version, __FILE__ ); ?>"></script>
228
- <?php
229
- }
230
- if($screen->id == 'users_page_ct_check_users')
231
- {
232
- ?>
233
- <script src="<?php print plugins_url( 'cleantalk-users-checkspam.js?v=' . $cleantalk_plugin_version, __FILE__ ); ?>"></script>
234
- <?php
235
- }
236
- }
237
  }
238
 
239
 
@@ -285,10 +264,14 @@ function ct_ajax_check_users()
285
  $data[]=$u[$i]->data->user_email;
286
  }
287
  }
 
 
 
 
288
  $data=implode(',',$data);
289
 
290
  $request=Array();
291
- $request['method_name'] = 'spam_check';
292
  $request['auth_key'] = $ct_options['apikey'];
293
  $request['data'] = $data;
294
  $url='https://api.cleantalk.org';
@@ -340,10 +323,12 @@ function ct_ajax_check_users()
340
  {
341
  $mark_spam_email = true;
342
  }
343
- // Do not use the spam records becaus it was a spammer far time ago.
 
344
  if (time() - $ip_update_time > 86400 * $ct_ip_penalty_days) {
345
  $mark_spam_ip = false;
346
  }
 
347
  if ($mark_spam_ip || $mark_spam_email) {
348
  update_user_meta($u[$i]->ID,'ct_marked_as_spam','1',true);
349
  }
154
  {
155
  if($i==$page)
156
  {
157
+ print "<a href='users.php?page=ct_check_users&spam_page=$i&ct_worked=1'><b>$i</b></a> ";
158
  }
159
  else
160
  {
161
+ print "<a href='users.php?page=ct_check_users&spam_page=$i&ct_worked=1'>$i</a> ";
162
  }
163
  }
164
  ?>
213
  {
214
  global $cleantalk_plugin_version;
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
 
218
 
264
  $data[]=$u[$i]->data->user_email;
265
  }
266
  }
267
+ if(count($data) == 0){
268
+ print 0;
269
+ die();
270
+ }
271
  $data=implode(',',$data);
272
 
273
  $request=Array();
274
+ $request['method_name'] = 'spam_check_cms';
275
  $request['auth_key'] = $ct_options['apikey'];
276
  $request['data'] = $data;
277
  $url='https://api.cleantalk.org';
323
  {
324
  $mark_spam_email = true;
325
  }
326
+ /*
327
+ // Do not use the spam records becaus it was a spammer far time ago.
328
  if (time() - $ip_update_time > 86400 * $ct_ip_penalty_days) {
329
  $mark_spam_ip = false;
330
  }
331
+ //*/
332
  if ($mark_spam_ip || $mark_spam_email) {
333
  update_user_meta($u[$i]->ID,'ct_marked_as_spam','1',true);
334
  }
inc/cleantalk.class.php CHANGED
@@ -713,7 +713,16 @@ class Cleantalk {
713
  */
714
  private function httpRequest($msg) {
715
  $result = false;
716
- $msg->all_headers=json_encode(apache_request_headers());
 
 
 
 
 
 
 
 
 
717
  //$msg->remote_addr=$_SERVER['REMOTE_ADDR'];
718
  //$msg->sender_info['remote_addr']=$_SERVER['REMOTE_ADDR'];
719
  $si=(array)json_decode($msg->sender_info,true);
713
  */
714
  private function httpRequest($msg) {
715
  $result = false;
716
+
717
+ $ct_tmp = apache_request_headers();
718
+ $ct_tmp['Cookie'] = preg_replace(array(
719
+ '/\s{0,1}ct_checkjs=[a-z0-9]*[;|$]{0,1}/',
720
+ '/\s{0,1}ct_timezone=.{0,1}\d{1,2}[;|$]/',
721
+ '/\s{0,1}ct_pointer_data=.*5D[;|$]{0,1}/',
722
+ '/;{0,1}\s{0,3}$/'
723
+ ), '', $ct_tmp['Cookie']);
724
+ $msg->all_headers=json_encode($ct_tmp);
725
+
726
  //$msg->remote_addr=$_SERVER['REMOTE_ADDR'];
727
  //$msg->sender_info['remote_addr']=$_SERVER['REMOTE_ADDR'];
728
  $si=(array)json_decode($msg->sender_info,true);
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Spam Protection by CleanTalk (no Captcha Anti-Spam) ===
2
- Contributors: znaeff, shagimuratov, serge00
3
  Tags: spam, anti-spam, antispam, anti spam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spammers, spammy, woocommerce, wordpress spam, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, plugin, contact, recaptcha, google captcha, google recaptcha, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, widget, review, firewall, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, anti-spam plugin, varnish, amp, spam free, userpro,honeypot,puzzle,quiz,survey,poll,security
4
  Requires at least: 3.0
5
  Tested up to: 4.6.1
6
- Stable tag: 5.51
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -484,6 +484,13 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
484
  1. The Dashboard with a map of most spam active countries per your account.
485
 
486
  == Changelog ==
 
 
 
 
 
 
 
487
  = 5.51 November 2 2016 =
488
  * Added protection for internal forms
489
  * Immediate spam check for comments and users from WP dashboard
@@ -1187,6 +1194,13 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
1187
 
1188
  == Upgrade Notice ==
1189
  == Changelog ==
 
 
 
 
 
 
 
1190
  = 5.51 November 2 2016 =
1191
  * Added protection for internal forms
1192
  * Immediate spam check for comments and users from WP dashboard
1
  === Spam Protection by CleanTalk (no Captcha Anti-Spam) ===
2
+ Contributors: znaeff, shagimuratov, serge00, sartemd174
3
  Tags: spam, anti-spam, antispam, anti spam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spammers, spammy, woocommerce, wordpress spam, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, plugin, contact, recaptcha, google captcha, google recaptcha, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, widget, review, firewall, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, anti-spam plugin, varnish, amp, spam free, userpro,honeypot,puzzle,quiz,survey,poll,security
4
  Requires at least: 3.0
5
  Tested up to: 4.6.1
6
+ Stable tag: 5.52.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
484
  1. The Dashboard with a map of most spam active countries per your account.
485
 
486
  == Changelog ==
487
+ = 5.52.1 November 14 2016 =
488
+ * Users and comments check: Using new API method.
489
+ * Quick Contact From: Integration via "Custom Contact Forms" setting.
490
+ * JavaScript filtration improved.
491
+ * Translation changes.
492
+ * Optimized JavaScript code.
493
+
494
  = 5.51 November 2 2016 =
495
  * Added protection for internal forms
496
  * Immediate spam check for comments and users from WP dashboard
1194
 
1195
  == Upgrade Notice ==
1196
  == Changelog ==
1197
+ = 5.52.1 November 14 2016 =
1198
+ * Users and comments check: Using new API method.
1199
+ * Quick Contact From: Integration via "Custom Contact Forms" setting.
1200
+ * JavaScript filtration improved.
1201
+ * Translation changes.
1202
+ * Optimized JavaScript code.
1203
+
1204
  = 5.51 November 2 2016 =
1205
  * Added protection for internal forms
1206
  * Immediate spam check for comments and users from WP dashboard