Version Description
2015-07-16 = * New feature: anti-spam protection for forms, that uses external services * Protection improvement: plugin filter spam bots registrations, even connect to our servers failed.
Download this release
Release Info
Developer | shagimuratov |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.15 |
Comparing to | |
See all releases |
Code changes from version 5.14 to 5.15
- cleantalk-admin.php +26 -6
- cleantalk-ajax.php +139 -484
- cleantalk-comments.php +2 -2
- cleantalk-common.php +5 -4
- cleantalk-public.php +64 -7
- cleantalk.class.php +9 -4
- cleantalk.php +41 -8
- cleantalk_external.js +34 -0
- i18n/cleantalk-en_US.mo +0 -0
- readme.txt +39 -42
cleantalk-admin.php
CHANGED
@@ -5,7 +5,7 @@ $ct_plugin_basename = 'cleantalk-spam-protect/cleantalk.php';
|
|
5 |
if(isset($_GET['close_notice']))
|
6 |
{
|
7 |
global $ct_data, $pagenow;
|
8 |
-
|
9 |
$ct_data['next_notice_show']=time()+86400;
|
10 |
update_option('cleantalk_data', $ct_data);
|
11 |
$_SERVER["QUERY_STRING"]=str_replace("close_notice=1","",$_SERVER["QUERY_STRING"]);
|
@@ -38,8 +38,9 @@ function ct_add_stats_js()
|
|
38 |
|
39 |
function ct_ajax_get_timezone()
|
40 |
{
|
|
|
41 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
42 |
-
|
43 |
if(isset($_POST['offset']))
|
44 |
{
|
45 |
$ct_data['timezone'] = intval($_POST['offset']);
|
@@ -72,8 +73,8 @@ function ct_admin_add_page() {
|
|
72 |
function ct_admin_init() {
|
73 |
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;
|
74 |
|
75 |
-
|
76 |
-
|
77 |
|
78 |
$current_version=@trim($ct_data['current_version']);
|
79 |
if($current_version!=$cleantalk_plugin_version)
|
@@ -211,6 +212,7 @@ function ct_admin_init() {
|
|
211 |
add_settings_field('cleantalk_general_postdata_test', __('Check all post data', 'cleantalk'), 'ct_input_general_postdata_test', 'cleantalk', 'cleantalk_settings_anti_spam');
|
212 |
add_settings_field('cleantalk_show_adminbar', __('Show statistics in admin bar', 'cleantalk'), 'ct_input_show_adminbar', 'cleantalk', 'cleantalk_settings_anti_spam');
|
213 |
add_settings_field('cleantalk_use_ajax', __('Use AJAX for JavaScript check', 'cleantalk'), 'ct_input_use_ajax', 'cleantalk', 'cleantalk_settings_anti_spam');
|
|
|
214 |
}
|
215 |
|
216 |
/**
|
@@ -244,7 +246,7 @@ function ct_add_admin_menu( $wp_admin_bar ) {
|
|
244 |
|
245 |
if ( current_user_can('activate_plugins')&&$value==1 )
|
246 |
{
|
247 |
-
|
248 |
$args = array(
|
249 |
'id' => 'ct_parent_node',
|
250 |
'title' => '<img src="' . plugin_dir_url(__FILE__) . 'inc/images/logo_small1.png" alt="" height="" style="margin-top:9px;" /><a href="#" class="ab-item alignright" title="allowed / blocked" alt="allowed / blocked"><span class="ab-label" id="ct_stats"></span></a>'
|
@@ -504,6 +506,24 @@ function ct_input_use_ajax() {
|
|
504 |
@admin_addDescriptionsFields(sprintf(__('', 'cleantalk'), $ct_options['use_ajax']));
|
505 |
}
|
506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
/**
|
508 |
* Admin callback function - Plugin parameters validator
|
509 |
*/
|
@@ -556,7 +576,7 @@ input[type=submit] {padding: 10px; background: #3399FF; color: #fff; border:0 no
|
|
556 |
function admin_notice_message(){
|
557 |
global $show_ct_notice_trial, $show_ct_notice_renew, $show_ct_notice_online, $show_ct_notice_autokey, $ct_notice_autokey_value, $ct_plugin_name, $ct_options, $ct_data;
|
558 |
|
559 |
-
|
560 |
|
561 |
$user_token = '';
|
562 |
if (isset($ct_data['user_token']) && $ct_data['user_token'] != '') {
|
5 |
if(isset($_GET['close_notice']))
|
6 |
{
|
7 |
global $ct_data, $pagenow;
|
8 |
+
//$ct_data=ct_get_data();
|
9 |
$ct_data['next_notice_show']=time()+86400;
|
10 |
update_option('cleantalk_data', $ct_data);
|
11 |
$_SERVER["QUERY_STRING"]=str_replace("close_notice=1","",$_SERVER["QUERY_STRING"]);
|
38 |
|
39 |
function ct_ajax_get_timezone()
|
40 |
{
|
41 |
+
global $ct_data;
|
42 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
43 |
+
//$ct_data = ct_get_data();
|
44 |
if(isset($_POST['offset']))
|
45 |
{
|
46 |
$ct_data['timezone'] = intval($_POST['offset']);
|
73 |
function ct_admin_init() {
|
74 |
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;
|
75 |
|
76 |
+
//$ct_options = ct_get_options();
|
77 |
+
//$ct_data = ct_get_data();
|
78 |
|
79 |
$current_version=@trim($ct_data['current_version']);
|
80 |
if($current_version!=$cleantalk_plugin_version)
|
212 |
add_settings_field('cleantalk_general_postdata_test', __('Check all post data', 'cleantalk'), 'ct_input_general_postdata_test', 'cleantalk', 'cleantalk_settings_anti_spam');
|
213 |
add_settings_field('cleantalk_show_adminbar', __('Show statistics in admin bar', 'cleantalk'), 'ct_input_show_adminbar', 'cleantalk', 'cleantalk_settings_anti_spam');
|
214 |
add_settings_field('cleantalk_use_ajax', __('Use AJAX for JavaScript check', 'cleantalk'), 'ct_input_use_ajax', 'cleantalk', 'cleantalk_settings_anti_spam');
|
215 |
+
add_settings_field('cleantalk_check_external', __('Protect external forms', 'cleantalk'), 'ct_input_check_external', 'cleantalk', 'cleantalk_settings_anti_spam');
|
216 |
}
|
217 |
|
218 |
/**
|
246 |
|
247 |
if ( current_user_can('activate_plugins')&&$value==1 )
|
248 |
{
|
249 |
+
//$ct_data=ct_get_data();
|
250 |
$args = array(
|
251 |
'id' => 'ct_parent_node',
|
252 |
'title' => '<img src="' . plugin_dir_url(__FILE__) . 'inc/images/logo_small1.png" alt="" height="" style="margin-top:9px;" /><a href="#" class="ab-item alignright" title="allowed / blocked" alt="allowed / blocked"><span class="ab-label" id="ct_stats"></span></a>'
|
506 |
@admin_addDescriptionsFields(sprintf(__('', 'cleantalk'), $ct_options['use_ajax']));
|
507 |
}
|
508 |
|
509 |
+
function ct_input_check_external() {
|
510 |
+
global $ct_options, $ct_data;
|
511 |
+
|
512 |
+
if(isset($ct_options['check_external']))
|
513 |
+
{
|
514 |
+
$value = @intval($ct_options['check_external']);
|
515 |
+
}
|
516 |
+
else
|
517 |
+
{
|
518 |
+
$value=0;
|
519 |
+
}
|
520 |
+
echo "<input type='radio' id='cleantalk_check_external1' name='cleantalk_settings[check_external]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_check_external1'> " . __('Yes') . "</label>";
|
521 |
+
echo ' ';
|
522 |
+
echo "<input type='radio' id='cleantalk_check_external0' name='cleantalk_settings[check_external]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_check_external0'> " . __('No') . "</label>";
|
523 |
+
@admin_addDescriptionsFields(sprintf(__('', 'cleantalk'), $ct_options['check_external']));
|
524 |
+
}
|
525 |
+
|
526 |
+
|
527 |
/**
|
528 |
* Admin callback function - Plugin parameters validator
|
529 |
*/
|
576 |
function admin_notice_message(){
|
577 |
global $show_ct_notice_trial, $show_ct_notice_renew, $show_ct_notice_online, $show_ct_notice_autokey, $ct_notice_autokey_value, $ct_plugin_name, $ct_options, $ct_data;
|
578 |
|
579 |
+
//$ct_data=ct_get_data();
|
580 |
|
581 |
$user_token = '';
|
582 |
if (isset($ct_data['user_token']) && $ct_data['user_token'] != '') {
|
cleantalk-ajax.php
CHANGED
@@ -12,52 +12,74 @@ add_action( 'wp_ajax_validate_email', 'ct_validate_email_ajaxlogin',1 );
|
|
12 |
add_action( 'user_register', 'ct_user_register_ajaxlogin',1 );
|
13 |
|
14 |
/*hooks for WPUF pro */
|
15 |
-
add_action( 'wp_ajax_nopriv_wpuf_submit_register', 'ct_wpuf_submit_register',1 );
|
16 |
-
add_action( 'wp_ajax_wpuf_submit_register', 'ct_wpuf_submit_register',1 );
|
|
|
|
|
17 |
|
18 |
/*hooks for MyMail */
|
19 |
-
add_action( 'wp_ajax_nopriv_mymail_form_submit', 'ct_mymail_form_submit',1 );
|
20 |
-
add_action( 'wp_ajax_mymail_form_submit', 'ct_mymail_form_submit',1 );
|
|
|
|
|
21 |
|
22 |
/*hooks for MailPoet */
|
23 |
-
add_action( 'wp_ajax_nopriv_wysija_ajax', 'ct_wysija_ajax',1 );
|
24 |
-
add_action( 'wp_ajax_wysija_ajax', 'ct_wysija_ajax',1 );
|
|
|
|
|
25 |
|
26 |
/*hooks for cs_registration_validation */
|
27 |
-
add_action( 'wp_ajax_nopriv_cs_registration_validation', 'ct_cs_registration_validation',1 );
|
28 |
-
add_action( 'wp_ajax_cs_registration_validation', 'ct_cs_registration_validation',1 );
|
29 |
-
|
30 |
-
|
31 |
-
add_action( 'wp_ajax_nopriv_cs_registration_validation', 'ct_cs_registration_validation',1 );
|
32 |
-
add_action( 'wp_ajax_cs_registration_validation', 'ct_cs_registration_validation',1 );
|
33 |
|
34 |
/*hooks for send_message and request_appointment */
|
35 |
-
add_action( 'wp_ajax_nopriv_send_message', 'ct_sm_ra',1 );
|
36 |
-
add_action( 'wp_ajax_send_message', 'ct_sm_ra',1 );
|
37 |
-
add_action( 'wp_ajax_nopriv_request_appointment', 'ct_sm_ra',1 );
|
38 |
-
add_action( 'wp_ajax_request_appointment', 'ct_sm_ra',1 );
|
|
|
|
|
|
|
|
|
39 |
|
40 |
/*hooks for zn_do_login */
|
41 |
-
add_action( 'wp_ajax_nopriv_zn_do_login', 'ct_zn_do_login',1 );
|
42 |
-
add_action( 'wp_ajax_zn_do_login', 'ct_zn_do_login',1 );
|
|
|
|
|
43 |
|
44 |
/*hooks for zn_do_login */
|
45 |
-
add_action( 'wp_ajax_nopriv_cscf-submitform', 'ct_cscf_submitform',1 );
|
46 |
-
add_action( 'wp_ajax_cscf-submitform', 'ct_cscf_submitform',1 );
|
|
|
|
|
47 |
|
48 |
/*hooks for stats */
|
49 |
add_action( 'wp_ajax_nopriv_ajax_get_stats', 'ct_get_stats',1 );
|
50 |
add_action( 'wp_ajax_ajax_get_stats', 'ct_get_stats',1 );
|
51 |
|
52 |
/*hooks for visual form builder */
|
53 |
-
add_action( 'wp_ajax_nopriv_vfb_submit', 'ct_vfb_submit',1 );
|
54 |
-
add_action( 'wp_ajax_vfb_submit', 'ct_vfb_submit',1 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
function ct_get_stats()
|
57 |
{
|
58 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
59 |
global $ct_data;
|
60 |
-
|
61 |
$t=time();
|
62 |
|
63 |
if(!isset($ct_data['stat_accepted']))
|
@@ -89,8 +111,8 @@ function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
|
|
89 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
90 |
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
91 |
|
92 |
-
|
93 |
-
|
94 |
|
95 |
$email = is_null( $email ) ? $email : $_POST['email'];
|
96 |
$email=sanitize_email($email);
|
@@ -103,7 +125,7 @@ function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
|
|
103 |
if(class_exists('AjaxLogin')&&isset($_POST['action'])&&$_POST['action']=='validate_email')
|
104 |
{
|
105 |
|
106 |
-
|
107 |
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
108 |
$submit_time = submit_time_test();
|
109 |
$sender_info = get_sender_info();
|
@@ -184,8 +206,8 @@ function ct_user_register_ajaxlogin($user_id)
|
|
184 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
185 |
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
186 |
|
187 |
-
|
188 |
-
|
189 |
|
190 |
if(class_exists('AjaxLogin')&&isset($_POST['action'])&&$_POST['action']=='register_submit')
|
191 |
{
|
@@ -246,403 +268,48 @@ function ct_user_register_ajaxlogin($user_id)
|
|
246 |
return $user_id;
|
247 |
}
|
248 |
|
249 |
-
function
|
250 |
-
{
|
251 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
252 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
253 |
-
|
254 |
-
$ct_data=ct_get_data();
|
255 |
-
|
256 |
-
$ct_options=ct_get_options();
|
257 |
-
|
258 |
-
$sender_email = null;
|
259 |
-
$message = '';
|
260 |
-
|
261 |
-
foreach ($_POST as $key => $value)
|
262 |
-
{
|
263 |
-
if ($sender_email === null && preg_match("/^\S+@\S+\.\S+$/", $value))
|
264 |
-
{
|
265 |
-
$sender_email = $value;
|
266 |
-
}
|
267 |
-
else
|
268 |
-
{
|
269 |
-
$message.="$value\n";
|
270 |
-
}
|
271 |
-
}
|
272 |
-
|
273 |
-
if($sender_email!=null)
|
274 |
-
{
|
275 |
-
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
276 |
-
$submit_time = submit_time_test();
|
277 |
-
$sender_info = get_sender_info();
|
278 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
279 |
-
|
280 |
-
$sender_info = json_encode($sender_info);
|
281 |
-
if ($sender_info === false)
|
282 |
-
{
|
283 |
-
$sender_info= '';
|
284 |
-
}
|
285 |
-
|
286 |
-
$ct_base_call_result = ct_base_call(array(
|
287 |
-
'message' => $message,
|
288 |
-
'example' => null,
|
289 |
-
'sender_email' => $sender_email,
|
290 |
-
'sender_nickname' => null,
|
291 |
-
'sender_info' => $sender_info,
|
292 |
-
'post_info'=>null,
|
293 |
-
'checkjs' => $checkjs));
|
294 |
-
|
295 |
-
$ct = $ct_base_call_result['ct'];
|
296 |
-
$ct_result = $ct_base_call_result['ct_result'];
|
297 |
-
if ($ct_result->allow == 0)
|
298 |
-
{
|
299 |
-
$result=Array('success'=>false,'error'=>$ct_result->comment);
|
300 |
-
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
301 |
-
print json_encode($result);
|
302 |
-
die();
|
303 |
-
}
|
304 |
-
}
|
305 |
-
}
|
306 |
-
|
307 |
-
function ct_mymail_form_submit()
|
308 |
-
{
|
309 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
310 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
311 |
-
|
312 |
-
$ct_data=ct_get_data();
|
313 |
-
|
314 |
-
$ct_options=ct_get_options();
|
315 |
-
|
316 |
-
$sender_email = null;
|
317 |
-
$message = '';
|
318 |
-
|
319 |
-
ct_get_fields($sender_email,$message,$_POST);
|
320 |
-
|
321 |
-
if($sender_email!=null)
|
322 |
-
{
|
323 |
-
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
324 |
-
$submit_time = submit_time_test();
|
325 |
-
$sender_info = get_sender_info();
|
326 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
327 |
-
|
328 |
-
$sender_info = json_encode($sender_info);
|
329 |
-
if ($sender_info === false)
|
330 |
-
{
|
331 |
-
$sender_info= '';
|
332 |
-
}
|
333 |
-
|
334 |
-
$ct_base_call_result = ct_base_call(array(
|
335 |
-
'message' => $message,
|
336 |
-
'example' => null,
|
337 |
-
'sender_email' => $sender_email,
|
338 |
-
'sender_nickname' => null,
|
339 |
-
'sender_info' => $sender_info,
|
340 |
-
'post_info'=>null,
|
341 |
-
'checkjs' => $checkjs));
|
342 |
-
|
343 |
-
$ct = $ct_base_call_result['ct'];
|
344 |
-
$ct_result = $ct_base_call_result['ct_result'];
|
345 |
-
if ($ct_result->allow == 0)
|
346 |
-
{
|
347 |
-
$result=Array('success'=>false,'html'=>$ct_result->comment);
|
348 |
-
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
349 |
-
print json_encode($result);
|
350 |
-
die();
|
351 |
-
}
|
352 |
-
}
|
353 |
-
}
|
354 |
-
|
355 |
-
function ct_wysija_ajax()
|
356 |
-
{
|
357 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
358 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
359 |
-
|
360 |
-
$ct_data=ct_get_data();
|
361 |
-
|
362 |
-
$ct_options=ct_get_options();
|
363 |
-
|
364 |
-
$sender_email = null;
|
365 |
-
$message = '';
|
366 |
-
|
367 |
-
ct_get_fields($sender_email,$message,$_POST);
|
368 |
-
|
369 |
-
|
370 |
-
if($sender_email!=null&&isset($_GET['callback']))
|
371 |
-
{
|
372 |
-
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
373 |
-
$submit_time = submit_time_test();
|
374 |
-
$sender_info = get_sender_info();
|
375 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
376 |
-
|
377 |
-
$sender_info = json_encode($sender_info);
|
378 |
-
if ($sender_info === false)
|
379 |
-
{
|
380 |
-
$sender_info= '';
|
381 |
-
}
|
382 |
-
|
383 |
-
$ct_base_call_result = ct_base_call(array(
|
384 |
-
'message' => $message,
|
385 |
-
'example' => null,
|
386 |
-
'sender_email' => $sender_email,
|
387 |
-
'sender_nickname' => null,
|
388 |
-
'sender_info' => $sender_info,
|
389 |
-
'post_info'=>null,
|
390 |
-
'checkjs' => $checkjs));
|
391 |
-
|
392 |
-
$ct = $ct_base_call_result['ct'];
|
393 |
-
$ct_result = $ct_base_call_result['ct_result'];
|
394 |
-
if ($ct_result->allow == 0)
|
395 |
-
{
|
396 |
-
$result=Array('result'=>false,'msgs'=>Array('updated'=>Array($ct_result->comment)));
|
397 |
-
//@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
398 |
-
print $_GET['callback'].'('.json_encode($result).');';
|
399 |
-
die();
|
400 |
-
}
|
401 |
-
}
|
402 |
-
}
|
403 |
-
|
404 |
-
function ct_cs_registration_validation()
|
405 |
{
|
406 |
-
|
407 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
408 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
409 |
-
|
410 |
-
$ct_data=ct_get_data();
|
411 |
-
|
412 |
-
$ct_options=ct_get_options();
|
413 |
-
|
414 |
-
$sender_email = null;
|
415 |
-
$message = '';
|
416 |
-
|
417 |
-
ct_get_fields($sender_email,$message,$_POST);
|
418 |
-
|
419 |
-
if($sender_email!=null)
|
420 |
{
|
421 |
-
|
422 |
-
$submit_time = submit_time_test();
|
423 |
-
$sender_info = get_sender_info();
|
424 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
425 |
-
|
426 |
-
$sender_info = json_encode($sender_info);
|
427 |
-
if ($sender_info === false)
|
428 |
-
{
|
429 |
-
$sender_info = '';
|
430 |
-
}
|
431 |
-
if(isset($_POST['user_login']))
|
432 |
{
|
433 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
}
|
435 |
else
|
436 |
{
|
437 |
-
$
|
438 |
-
}
|
439 |
-
require_once('cleantalk.class.php');
|
440 |
-
|
441 |
-
$config = get_option('cleantalk_server');
|
442 |
-
$ct = new Cleantalk();
|
443 |
-
$ct->work_url = $config['ct_work_url'];
|
444 |
-
$ct->server_url = $ct_options['server'];
|
445 |
-
|
446 |
-
$ct->server_ttl = $config['ct_server_ttl'];
|
447 |
-
$ct->server_changed = $config['ct_server_changed'];
|
448 |
-
$ct->ssl_on = $ct_options['ssl_on'];
|
449 |
-
|
450 |
-
|
451 |
-
$ct_request = new CleantalkRequest();
|
452 |
-
$ct_request->auth_key = $ct_options['apikey'];
|
453 |
-
$ct_request->sender_email = $sender_email;
|
454 |
-
$ct_request->sender_ip = $_SERVER['REMOTE_ADDR'];
|
455 |
-
$ct_request->sender_nickname = $nickname;
|
456 |
-
$ct_request->agent = $ct_agent_version;
|
457 |
-
$ct_request->sender_info = $sender_info;
|
458 |
-
$ct_request->js_on = $checkjs;
|
459 |
-
$ct_request->submit_time = $submit_time;
|
460 |
-
|
461 |
-
$ct_result = $ct->isAllowUser($ct_request);
|
462 |
-
|
463 |
-
if ($ct_result->allow == 0)
|
464 |
-
{
|
465 |
-
$result=Array("type"=>"error","message"=>$ct_result->comment);
|
466 |
-
print json_encode($result);
|
467 |
-
die();
|
468 |
-
}
|
469 |
-
}
|
470 |
-
}
|
471 |
-
|
472 |
-
function ct_sm_ra()
|
473 |
-
{
|
474 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
475 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
476 |
-
|
477 |
-
$ct_data=ct_get_data();
|
478 |
-
|
479 |
-
$ct_options=ct_get_options();
|
480 |
-
|
481 |
-
$sender_email = null;
|
482 |
-
$message = '';
|
483 |
-
|
484 |
-
if(isset($_POST['target']))
|
485 |
-
{
|
486 |
-
$tmp=$_POST['target'];
|
487 |
-
$_POST['target']=1;
|
488 |
-
}
|
489 |
-
|
490 |
-
ct_get_fields($sender_email,$message,$_POST);
|
491 |
-
|
492 |
-
if(isset($_POST['target']))
|
493 |
-
{
|
494 |
-
$_POST['target']=$tmp;
|
495 |
-
}
|
496 |
-
|
497 |
-
|
498 |
-
if($sender_email!=null)
|
499 |
-
{
|
500 |
-
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
501 |
-
$submit_time = submit_time_test();
|
502 |
-
$sender_info = get_sender_info();
|
503 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
504 |
-
|
505 |
-
$sender_info = json_encode($sender_info);
|
506 |
-
if ($sender_info === false)
|
507 |
-
{
|
508 |
-
$sender_info= '';
|
509 |
-
}
|
510 |
-
|
511 |
-
$ct_base_call_result = ct_base_call(array(
|
512 |
-
'message' => $message,
|
513 |
-
'example' => null,
|
514 |
-
'sender_email' => $sender_email,
|
515 |
-
'sender_nickname' => null,
|
516 |
-
'sender_info' => $sender_info,
|
517 |
-
'post_info'=>null,
|
518 |
-
'checkjs' => $checkjs));
|
519 |
-
|
520 |
-
$ct = $ct_base_call_result['ct'];
|
521 |
-
$ct_result = $ct_base_call_result['ct_result'];
|
522 |
-
if ($ct_result->allow == 0)
|
523 |
-
{
|
524 |
-
print $ct_result->comment;
|
525 |
-
die();
|
526 |
}
|
527 |
}
|
528 |
}
|
529 |
|
530 |
-
function
|
531 |
{
|
532 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
533 |
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
534 |
|
535 |
-
|
536 |
-
|
537 |
-
$ct_options=ct_get_options();
|
538 |
|
539 |
$sender_email = null;
|
540 |
$message = '';
|
541 |
-
|
542 |
-
ct_get_fields($sender_email,$message,$_POST);
|
543 |
|
544 |
-
|
545 |
-
if($sender_email!=null&&$_POST['zn_form_action']=='register')
|
546 |
{
|
547 |
-
$
|
548 |
-
$submit_time = submit_time_test();
|
549 |
-
$sender_info = get_sender_info();
|
550 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
551 |
-
|
552 |
-
$sender_info = json_encode($sender_info);
|
553 |
-
if ($sender_info === false)
|
554 |
-
{
|
555 |
-
$sender_info= '';
|
556 |
-
}
|
557 |
-
|
558 |
-
$ct_base_call_result = ct_base_call(array(
|
559 |
-
'message' => $message,
|
560 |
-
'example' => null,
|
561 |
-
'sender_email' => $sender_email,
|
562 |
-
'sender_nickname' => null,
|
563 |
-
'sender_info' => $sender_info,
|
564 |
-
'post_info'=>null,
|
565 |
-
'checkjs' => $checkjs));
|
566 |
-
|
567 |
-
$ct = $ct_base_call_result['ct'];
|
568 |
-
$ct_result = $ct_base_call_result['ct_result'];
|
569 |
-
if ($ct_result->allow == 0)
|
570 |
-
{
|
571 |
-
print '<div id="login_error">'.$ct_result->comment.'</div>';
|
572 |
-
die();
|
573 |
-
}
|
574 |
}
|
575 |
-
|
576 |
-
|
577 |
-
function ct_vfb_submit()
|
578 |
-
{
|
579 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
580 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
581 |
-
|
582 |
-
$ct_data=ct_get_data();
|
583 |
-
|
584 |
-
$ct_options=ct_get_options();
|
585 |
-
|
586 |
-
$sender_email = null;
|
587 |
-
$message = '';
|
588 |
-
|
589 |
-
foreach ($_POST as $key => $value)
|
590 |
-
{
|
591 |
-
if ($sender_email === null && preg_match("/^\S+@\S+\.\S+$/", $value))
|
592 |
-
{
|
593 |
-
$sender_email = $value;
|
594 |
-
}
|
595 |
-
else
|
596 |
-
{
|
597 |
-
$message.="$value\n";
|
598 |
-
}
|
599 |
-
}
|
600 |
-
|
601 |
-
if($sender_email!=null)
|
602 |
{
|
603 |
-
$
|
604 |
-
$submit_time = submit_time_test();
|
605 |
-
$sender_info = get_sender_info();
|
606 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
607 |
-
|
608 |
-
$sender_info = json_encode($sender_info);
|
609 |
-
if ($sender_info === false)
|
610 |
-
{
|
611 |
-
$sender_info= '';
|
612 |
-
}
|
613 |
-
|
614 |
-
$ct_base_call_result = ct_base_call(array(
|
615 |
-
'message' => $message,
|
616 |
-
'example' => null,
|
617 |
-
'sender_email' => $sender_email,
|
618 |
-
'sender_nickname' => null,
|
619 |
-
'sender_info' => $sender_info,
|
620 |
-
'post_info'=>null,
|
621 |
-
'checkjs' => $checkjs));
|
622 |
-
|
623 |
-
$ct = $ct_base_call_result['ct'];
|
624 |
-
$ct_result = $ct_base_call_result['ct_result'];
|
625 |
-
if ($ct_result->allow == 0)
|
626 |
-
{
|
627 |
-
$result=Array('result'=>false,'message'=>$ct_result->comment);
|
628 |
-
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
629 |
-
print json_encode($result);
|
630 |
-
die();
|
631 |
-
}
|
632 |
}
|
633 |
-
}
|
634 |
-
|
635 |
-
function ct_cscf_submitform()
|
636 |
-
{
|
637 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
638 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
639 |
-
|
640 |
-
$ct_data=ct_get_data();
|
641 |
-
|
642 |
-
$ct_options=ct_get_options();
|
643 |
-
|
644 |
-
$sender_email = null;
|
645 |
-
$message = '';
|
646 |
|
647 |
if(isset($_POST['cscf']['confirm-email']))
|
648 |
{
|
@@ -650,70 +317,22 @@ function ct_cscf_submitform()
|
|
650 |
$_POST['cscf']['confirm-email']=1;
|
651 |
}
|
652 |
|
653 |
-
|
654 |
-
|
655 |
-
if(isset($_POST['cscf']['confirm-email']))
|
656 |
{
|
657 |
-
$_POST['
|
|
|
658 |
}
|
659 |
|
|
|
660 |
|
661 |
-
if($sender_email!=null)
|
662 |
-
{
|
663 |
-
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
664 |
-
$submit_time = submit_time_test();
|
665 |
-
$sender_info = get_sender_info();
|
666 |
-
$sender_info['post_checkjs_passed']=$checkjs;
|
667 |
-
|
668 |
-
$sender_info = json_encode($sender_info);
|
669 |
-
if ($sender_info === false)
|
670 |
-
{
|
671 |
-
$sender_info= '';
|
672 |
-
}
|
673 |
-
|
674 |
-
$ct_base_call_result = ct_base_call(array(
|
675 |
-
'message' => $message,
|
676 |
-
'example' => null,
|
677 |
-
'sender_email' => $sender_email,
|
678 |
-
'sender_nickname' => null,
|
679 |
-
'sender_info' => $sender_info,
|
680 |
-
'post_info'=>null,
|
681 |
-
'checkjs' => $checkjs));
|
682 |
-
|
683 |
-
$ct = $ct_base_call_result['ct'];
|
684 |
-
$ct_result = $ct_base_call_result['ct_result'];
|
685 |
-
if ($ct_result->allow == 0)
|
686 |
-
{
|
687 |
-
$result=Array('sent'=>true,'valid'=>false,'errorlist'=>Array('name'=>$ct_result->comment));
|
688 |
-
print json_encode($result);
|
689 |
-
die();
|
690 |
-
}
|
691 |
-
}
|
692 |
-
}
|
693 |
-
|
694 |
-
function ct_theme_submit()
|
695 |
-
{
|
696 |
-
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
697 |
-
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
698 |
-
|
699 |
-
$ct_data=ct_get_data();
|
700 |
-
|
701 |
-
$ct_options=ct_get_options();
|
702 |
-
|
703 |
-
$sender_email = null;
|
704 |
-
$message = '';
|
705 |
-
|
706 |
if(isset($_POST['cscf']['confirm-email']))
|
707 |
{
|
708 |
-
$
|
709 |
-
$_POST['cscf']['confirm-email']=1;
|
710 |
}
|
711 |
|
712 |
-
|
713 |
-
|
714 |
-
if(isset($_POST['cscf']['confirm-email']))
|
715 |
{
|
716 |
-
$_POST['
|
717 |
}
|
718 |
|
719 |
|
@@ -734,7 +353,7 @@ function ct_theme_submit()
|
|
734 |
'message' => $message,
|
735 |
'example' => null,
|
736 |
'sender_email' => $sender_email,
|
737 |
-
'sender_nickname' =>
|
738 |
'sender_info' => $sender_info,
|
739 |
'post_info'=>null,
|
740 |
'checkjs' => $checkjs));
|
@@ -743,31 +362,67 @@ function ct_theme_submit()
|
|
743 |
$ct_result = $ct_base_call_result['ct_result'];
|
744 |
if ($ct_result->allow == 0)
|
745 |
{
|
746 |
-
$
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
{
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
}
|
772 |
}
|
773 |
}
|
12 |
add_action( 'user_register', 'ct_user_register_ajaxlogin',1 );
|
13 |
|
14 |
/*hooks for WPUF pro */
|
15 |
+
//add_action( 'wp_ajax_nopriv_wpuf_submit_register', 'ct_wpuf_submit_register',1 );
|
16 |
+
//add_action( 'wp_ajax_wpuf_submit_register', 'ct_wpuf_submit_register',1 );
|
17 |
+
add_action( 'wp_ajax_nopriv_wpuf_submit_register', 'ct_ajax_hook',1 );
|
18 |
+
add_action( 'wp_ajax_wpuf_submit_register', 'ct_ajax_hook',1 );
|
19 |
|
20 |
/*hooks for MyMail */
|
21 |
+
//add_action( 'wp_ajax_nopriv_mymail_form_submit', 'ct_mymail_form_submit',1 );
|
22 |
+
//add_action( 'wp_ajax_mymail_form_submit', 'ct_mymail_form_submit',1 );
|
23 |
+
add_action( 'wp_ajax_nopriv_mymail_form_submit', 'ct_ajax_hook',1 );
|
24 |
+
add_action( 'wp_ajax_mymail_form_submit', 'ct_ajax_hook',1 );
|
25 |
|
26 |
/*hooks for MailPoet */
|
27 |
+
//add_action( 'wp_ajax_nopriv_wysija_ajax', 'ct_wysija_ajax',1 );
|
28 |
+
//add_action( 'wp_ajax_wysija_ajax', 'ct_wysija_ajax',1 );
|
29 |
+
add_action( 'wp_ajax_nopriv_wysija_ajax', 'ct_ajax_hook',1 );
|
30 |
+
add_action( 'wp_ajax_wysija_ajax', 'ct_ajax_hook',1 );
|
31 |
|
32 |
/*hooks for cs_registration_validation */
|
33 |
+
//add_action( 'wp_ajax_nopriv_cs_registration_validation', 'ct_cs_registration_validation',1 );
|
34 |
+
//add_action( 'wp_ajax_cs_registration_validation', 'ct_cs_registration_validation',1 );
|
35 |
+
add_action( 'wp_ajax_nopriv_cs_registration_validation', 'ct_ajax_hook',1 );
|
36 |
+
add_action( 'wp_ajax_cs_registration_validation', 'ct_ajax_hook',1 );
|
|
|
|
|
37 |
|
38 |
/*hooks for send_message and request_appointment */
|
39 |
+
//add_action( 'wp_ajax_nopriv_send_message', 'ct_sm_ra',1 );
|
40 |
+
//add_action( 'wp_ajax_send_message', 'ct_sm_ra',1 );
|
41 |
+
//add_action( 'wp_ajax_nopriv_request_appointment', 'ct_sm_ra',1 );
|
42 |
+
//add_action( 'wp_ajax_request_appointment', 'ct_sm_ra',1 );
|
43 |
+
add_action( 'wp_ajax_nopriv_send_message', 'ct_ajax_hook',1 );
|
44 |
+
add_action( 'wp_ajax_send_message', 'ct_ajax_hook',1 );
|
45 |
+
add_action( 'wp_ajax_nopriv_request_appointment', 'ct_ajax_hook',1 );
|
46 |
+
add_action( 'wp_ajax_request_appointment', 'ct_ajax_hook',1 );
|
47 |
|
48 |
/*hooks for zn_do_login */
|
49 |
+
//add_action( 'wp_ajax_nopriv_zn_do_login', 'ct_zn_do_login',1 );
|
50 |
+
//add_action( 'wp_ajax_zn_do_login', 'ct_zn_do_login',1 );
|
51 |
+
add_action( 'wp_ajax_nopriv_zn_do_login', 'ct_ajax_hook',1 );
|
52 |
+
add_action( 'wp_ajax_zn_do_login', 'ct_ajax_hook',1 );
|
53 |
|
54 |
/*hooks for zn_do_login */
|
55 |
+
//add_action( 'wp_ajax_nopriv_cscf-submitform', 'ct_cscf_submitform',1 );
|
56 |
+
//add_action( 'wp_ajax_cscf-submitform', 'ct_cscf_submitform',1 );
|
57 |
+
add_action( 'wp_ajax_nopriv_cscf-submitform', 'ct_ajax_hook',1 );
|
58 |
+
add_action( 'wp_ajax_cscf-submitform', 'ct_ajax_hook',1 );
|
59 |
|
60 |
/*hooks for stats */
|
61 |
add_action( 'wp_ajax_nopriv_ajax_get_stats', 'ct_get_stats',1 );
|
62 |
add_action( 'wp_ajax_ajax_get_stats', 'ct_get_stats',1 );
|
63 |
|
64 |
/*hooks for visual form builder */
|
65 |
+
//add_action( 'wp_ajax_nopriv_vfb_submit', 'ct_vfb_submit',1 );
|
66 |
+
//add_action( 'wp_ajax_vfb_submit', 'ct_vfb_submit',1 );
|
67 |
+
add_action( 'wp_ajax_nopriv_vfb_submit', 'ct_ajax_hook',1 );
|
68 |
+
add_action( 'wp_ajax_vfb_submit', 'ct_ajax_hook',1 );
|
69 |
+
|
70 |
+
/*hooks for woocommerce_checkout*/
|
71 |
+
add_action( 'wp_ajax_nopriv_woocommerce_checkout', 'ct_ajax_hook',1 );
|
72 |
+
add_action( 'wp_ajax_woocommerce_checkout', 'ct_ajax_hook',1 );
|
73 |
+
|
74 |
+
/*hooks for frm_action*/
|
75 |
+
add_action( 'wp_ajax_nopriv_frm_entries_create', 'ct_ajax_hook',1 );
|
76 |
+
add_action( 'wp_ajax_frm_entries_create', 'ct_ajax_hook',1 );
|
77 |
|
78 |
function ct_get_stats()
|
79 |
{
|
80 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
81 |
global $ct_data;
|
82 |
+
//$ct_data=ct_get_data();
|
83 |
$t=time();
|
84 |
|
85 |
if(!isset($ct_data['stat_accepted']))
|
111 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
112 |
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
113 |
|
114 |
+
//$ct_options=ct_get_options();
|
115 |
+
//$ct_data=ct_get_data();
|
116 |
|
117 |
$email = is_null( $email ) ? $email : $_POST['email'];
|
118 |
$email=sanitize_email($email);
|
125 |
if(class_exists('AjaxLogin')&&isset($_POST['action'])&&$_POST['action']=='validate_email')
|
126 |
{
|
127 |
|
128 |
+
//$ct_options=ct_get_options();
|
129 |
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
130 |
$submit_time = submit_time_test();
|
131 |
$sender_info = get_sender_info();
|
206 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
207 |
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
208 |
|
209 |
+
//$ct_options=ct_get_options();
|
210 |
+
//$ct_data=ct_get_data();
|
211 |
|
212 |
if(class_exists('AjaxLogin')&&isset($_POST['action'])&&$_POST['action']=='register_submit')
|
213 |
{
|
268 |
return $user_id;
|
269 |
}
|
270 |
|
271 |
+
function ct_get_fields(&$email,&$message,$arr)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
{
|
273 |
+
foreach($arr as $key=>$value)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
{
|
275 |
+
if(!is_array($value))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
{
|
277 |
+
if ($email === null && preg_match("/^\S+@\S+\.\S+$/", $value))
|
278 |
+
{
|
279 |
+
$email = $value;
|
280 |
+
}
|
281 |
+
else
|
282 |
+
{
|
283 |
+
$message.="$value\n";
|
284 |
+
}
|
285 |
}
|
286 |
else
|
287 |
{
|
288 |
+
ct_get_fields($email,$message,$value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
}
|
291 |
}
|
292 |
|
293 |
+
function ct_ajax_hook()
|
294 |
{
|
295 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
|
296 |
global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
|
297 |
|
298 |
+
//$ct_data=ct_get_data();
|
299 |
+
//$ct_options=ct_get_options();
|
|
|
300 |
|
301 |
$sender_email = null;
|
302 |
$message = '';
|
303 |
+
$nickname=null;
|
|
|
304 |
|
305 |
+
if(isset($_POST['user_login']))
|
|
|
306 |
{
|
307 |
+
$nickname=$_POST['user_login'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
}
|
309 |
+
else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
{
|
311 |
+
$nickname='';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
|
314 |
if(isset($_POST['cscf']['confirm-email']))
|
315 |
{
|
317 |
$_POST['cscf']['confirm-email']=1;
|
318 |
}
|
319 |
|
320 |
+
if(($_POST['action']=='request_appointment'||$_POST['action']=='send_message')&&isset($_POST['target']))
|
|
|
|
|
321 |
{
|
322 |
+
$tmp=$_POST['target'];
|
323 |
+
$_POST['target']=1;
|
324 |
}
|
325 |
|
326 |
+
ct_get_fields($sender_email,$message,$_POST);
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
if(isset($_POST['cscf']['confirm-email']))
|
329 |
{
|
330 |
+
$_POST['cscf']['confirm-email']=$tmp;
|
|
|
331 |
}
|
332 |
|
333 |
+
if(($_POST['action']=='request_appointment'||$_POST['action']=='send_message')&&isset($_POST['target']))
|
|
|
|
|
334 |
{
|
335 |
+
$_POST['target']=$tmp;
|
336 |
}
|
337 |
|
338 |
|
353 |
'message' => $message,
|
354 |
'example' => null,
|
355 |
'sender_email' => $sender_email,
|
356 |
+
'sender_nickname' => $nickname,
|
357 |
'sender_info' => $sender_info,
|
358 |
'post_info'=>null,
|
359 |
'checkjs' => $checkjs));
|
362 |
$ct_result = $ct_base_call_result['ct_result'];
|
363 |
if ($ct_result->allow == 0)
|
364 |
{
|
365 |
+
if($_POST['action']=='wpuf_submit_register')
|
366 |
+
{
|
367 |
+
$result=Array('success'=>false,'error'=>$ct_result->comment);
|
368 |
+
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
369 |
+
print json_encode($result);
|
370 |
+
die();
|
371 |
+
}
|
372 |
+
else if($_POST['action']=='mymail_form_submit')
|
373 |
+
{
|
374 |
+
$result=Array('success'=>false,'html'=>$ct_result->comment);
|
375 |
+
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
376 |
+
print json_encode($result);
|
377 |
+
die();
|
378 |
+
}
|
379 |
+
else if($_POST['action']=='wysija_ajax')
|
380 |
+
{
|
381 |
+
$result=Array('result'=>false,'msgs'=>Array('updated'=>Array($ct_result->comment)));
|
382 |
+
//@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
383 |
+
print $_GET['callback'].'('.json_encode($result).');';
|
384 |
+
die();
|
385 |
+
}
|
386 |
+
else if($_POST['action']=='cs_registration_validation')
|
387 |
+
{
|
388 |
+
$result=Array("type"=>"error","message"=>$ct_result->comment);
|
389 |
+
print json_encode($result);
|
390 |
+
die();
|
391 |
+
}
|
392 |
+
else if($_POST['action']=='request_appointment'||$_POST['action']=='send_message')
|
393 |
+
{
|
394 |
+
print $ct_result->comment;
|
395 |
+
die();
|
396 |
+
}
|
397 |
+
else if($_POST['action']=='zn_do_login')
|
398 |
+
{
|
399 |
+
print '<div id="login_error">'.$ct_result->comment.'</div>';
|
400 |
+
die();
|
401 |
+
}
|
402 |
+
else if($_POST['action']=='vfb_submit')
|
403 |
+
{
|
404 |
+
$result=Array('result'=>false,'message'=>$ct_result->comment);
|
405 |
+
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
|
406 |
+
print json_encode($result);
|
407 |
+
die();
|
408 |
+
}
|
409 |
+
else if($_POST['action']=='cscf-submitform')
|
410 |
+
{
|
411 |
+
$result=Array('sent'=>true,'valid'=>false,'errorlist'=>Array('name'=>$ct_result->comment));
|
412 |
+
print json_encode($result);
|
413 |
+
die();
|
414 |
+
}
|
415 |
+
else if($_POST['action']=='woocommerce_checkout')
|
416 |
+
{
|
417 |
+
print $ct_result->comment;
|
418 |
+
die();
|
419 |
+
}
|
420 |
+
else if($_POST['action']=='frm_entries_create')
|
421 |
+
{
|
422 |
+
$result=Array('112'=>$ct_result->comment);
|
423 |
+
print json_encode($result);
|
424 |
+
die();
|
425 |
+
}
|
426 |
}
|
427 |
}
|
428 |
}
|
cleantalk-comments.php
CHANGED
@@ -228,8 +228,8 @@ add_action( 'wp_ajax_ajax_check_comments', 'ct_ajax_check_comments' );
|
|
228 |
function ct_ajax_check_comments()
|
229 |
{
|
230 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
231 |
-
|
232 |
-
|
233 |
|
234 |
$args_unchecked = array(
|
235 |
'meta_query' => array(
|
228 |
function ct_ajax_check_comments()
|
229 |
{
|
230 |
check_ajax_referer( 'ct_secret_nonce', 'security' );
|
231 |
+
global $ct_options;
|
232 |
+
//$ct_options = ct_get_options();
|
233 |
|
234 |
$args_unchecked = array(
|
235 |
'meta_query' => array(
|
cleantalk-common.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$ct_agent_version = 'wordpress-
|
4 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
5 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
6 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
@@ -247,7 +247,7 @@ function get_sender_info() {
|
|
247 |
}
|
248 |
}
|
249 |
|
250 |
-
|
251 |
'apikey' => $ct_options['apikey'],
|
252 |
'registrations_test' => $ct_options['registrations_test'],
|
253 |
'comments_test' => $ct_options['comments_test'],
|
@@ -257,7 +257,7 @@ function get_sender_info() {
|
|
257 |
'autoPubRevelantMess' => $ct_options['autoPubRevelantMess'],
|
258 |
'spam_store_days' => $ct_options['spam_store_days'],
|
259 |
'ssl_on' => $ct_options['ssl_on'],
|
260 |
-
)
|
261 |
$options2server=$ct_options;
|
262 |
|
263 |
return $sender_info = array(
|
@@ -271,6 +271,7 @@ function get_sender_info() {
|
|
271 |
'checkjs_data_post' => $checkjs_data_post,
|
272 |
'checkjs_data_cookies' => $checkjs_data_cookies,
|
273 |
'ct_options' => json_encode($options2server),
|
|
|
274 |
);
|
275 |
}
|
276 |
|
@@ -306,7 +307,7 @@ function ct_cookies_test ($test = false) {
|
|
306 |
*/
|
307 |
function ct_get_checkjs_value($random_key = false) {
|
308 |
global $ct_options, $ct_data;
|
309 |
-
|
310 |
|
311 |
if ($random_key) {
|
312 |
$keys = $ct_data['js_keys'];
|
1 |
<?php
|
2 |
|
3 |
+
$ct_agent_version = 'wordpress-515';
|
4 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
5 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
6 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
247 |
}
|
248 |
}
|
249 |
|
250 |
+
/*$options2server = array( // Options for sending to server for support information
|
251 |
'apikey' => $ct_options['apikey'],
|
252 |
'registrations_test' => $ct_options['registrations_test'],
|
253 |
'comments_test' => $ct_options['comments_test'],
|
257 |
'autoPubRevelantMess' => $ct_options['autoPubRevelantMess'],
|
258 |
'spam_store_days' => $ct_options['spam_store_days'],
|
259 |
'ssl_on' => $ct_options['ssl_on'],
|
260 |
+
);*/
|
261 |
$options2server=$ct_options;
|
262 |
|
263 |
return $sender_info = array(
|
271 |
'checkjs_data_post' => $checkjs_data_post,
|
272 |
'checkjs_data_cookies' => $checkjs_data_cookies,
|
273 |
'ct_options' => json_encode($options2server),
|
274 |
+
'fields_number' => sizeof($_POST),
|
275 |
);
|
276 |
}
|
277 |
|
307 |
*/
|
308 |
function ct_get_checkjs_value($random_key = false) {
|
309 |
global $ct_options, $ct_data;
|
310 |
+
//$ct_data=ct_get_data();
|
311 |
|
312 |
if ($random_key) {
|
313 |
$keys = $ct_data['js_keys'];
|
cleantalk-public.php
CHANGED
@@ -5,11 +5,12 @@
|
|
5 |
* @return mixed[] Array of options
|
6 |
*/
|
7 |
function ct_init() {
|
8 |
-
global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label, $ct_formtime_label, $ct_direct_post, $ct_options, $ct_data, $ct_check_post_result
|
9 |
|
10 |
-
|
11 |
|
12 |
ct_init_session();
|
|
|
13 |
|
14 |
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
15 |
if (is_array($_SESSION) && !array_key_exists($ct_formtime_label, $_SESSION) && session_id() != '') {
|
@@ -19,6 +20,20 @@ function ct_init() {
|
|
19 |
$_SESSION[$ct_formtime_label] = time();
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
if(isset($ct_options['general_postdata_test']))
|
23 |
{
|
24 |
$ct_general_postdata_test = @intval($ct_options['general_postdata_test']);
|
@@ -31,6 +46,13 @@ function ct_init() {
|
|
31 |
if (isset($ct_options['general_contact_forms_test']) && $ct_options['general_contact_forms_test'] == 1)
|
32 |
{
|
33 |
add_action('CMA_custom_post_type_nav','ct_contact_form_validate_postdata',1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
if($ct_general_postdata_test==1)
|
@@ -202,7 +224,7 @@ function ct_footer_add_cookie() {
|
|
202 |
*/
|
203 |
function ct_add_hidden_fields($random_key = false, $field_name = 'ct_checkjs', $return_string = false, $cookie_check = false) {
|
204 |
global $ct_checkjs_def, $ct_plugin_name, $ct_options;
|
205 |
-
|
206 |
if(isset($ct_options['use_ajax']))
|
207 |
{
|
208 |
$use_ajax = @intval($ct_options['use_ajax']);
|
@@ -584,7 +606,7 @@ function ct_die_extended($comment_body) {
|
|
584 |
function js_test($field_name = 'ct_checkjs', $data = null, $random_key = false) {
|
585 |
global $ct_options, $ct_data;
|
586 |
|
587 |
-
|
588 |
|
589 |
$checkjs = null;
|
590 |
$js_post_value = null;
|
@@ -915,6 +937,10 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
|
|
915 |
ct_send_error_notice($ct_result->comment);
|
916 |
return $errors;
|
917 |
}
|
|
|
|
|
|
|
|
|
918 |
|
919 |
if ($ct_result->inactive != 0) {
|
920 |
ct_send_error_notice($ct_result->comment);
|
@@ -1458,7 +1484,8 @@ function ct_contact_form_validate () {
|
|
1458 |
(isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword'||
|
1459 |
strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false ||
|
1460 |
strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!==false ||
|
1461 |
-
strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false
|
|
|
1462 |
)
|
1463 |
) {
|
1464 |
return null;
|
@@ -1538,7 +1565,8 @@ function ct_contact_form_validate_postdata () {
|
|
1538 |
(isset($pagenow) && $pagenow == 'wp-cron.php' ||
|
1539 |
strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false) ||
|
1540 |
strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!==false ||
|
1541 |
-
strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false
|
|
|
1542 |
) {
|
1543 |
return null;
|
1544 |
}
|
@@ -1625,4 +1653,33 @@ function ct_send_error_notice ($comment = '') {
|
|
1625 |
return null;
|
1626 |
}
|
1627 |
|
1628 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* @return mixed[] Array of options
|
6 |
*/
|
7 |
function ct_init() {
|
8 |
+
global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label, $ct_formtime_label, $ct_direct_post, $ct_options, $ct_data, $ct_check_post_result, $test_external_forms;;
|
9 |
|
10 |
+
//$ct_options = ct_get_options();
|
11 |
|
12 |
ct_init_session();
|
13 |
+
|
14 |
|
15 |
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
16 |
if (is_array($_SESSION) && !array_key_exists($ct_formtime_label, $_SESSION) && session_id() != '') {
|
20 |
$_SESSION[$ct_formtime_label] = time();
|
21 |
}
|
22 |
|
23 |
+
if($test_external_forms && $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['cleantalk_hidden_method']) && isset($_POST['cleantalk_hidden_action']))
|
24 |
+
{
|
25 |
+
$action=$_POST['cleantalk_hidden_action'];
|
26 |
+
$method=$_POST['cleantalk_hidden_method'];
|
27 |
+
unset($_POST['cleantalk_hidden_action']);
|
28 |
+
unset($_POST['cleantalk_hidden_method']);
|
29 |
+
ct_contact_form_validate();
|
30 |
+
print "<html><body><form method='$method' action='$action'>";
|
31 |
+
ct_print_form($_POST,'');
|
32 |
+
print "</form></body></html>";
|
33 |
+
print "<script>document.forms[0].submit();</script>";
|
34 |
+
die();
|
35 |
+
}
|
36 |
+
|
37 |
if(isset($ct_options['general_postdata_test']))
|
38 |
{
|
39 |
$ct_general_postdata_test = @intval($ct_options['general_postdata_test']);
|
46 |
if (isset($ct_options['general_contact_forms_test']) && $ct_options['general_contact_forms_test'] == 1)
|
47 |
{
|
48 |
add_action('CMA_custom_post_type_nav','ct_contact_form_validate_postdata',1);
|
49 |
+
/*if(isset($_GET['ait-action'])&&$_GET['ait-action']=='register')
|
50 |
+
{
|
51 |
+
$tmp=$_POST['redirect_to'];
|
52 |
+
unset($_POST['redirect_to']);
|
53 |
+
ct_contact_form_validate();
|
54 |
+
$_POST['redirect_to']=$tmp;
|
55 |
+
}*/
|
56 |
}
|
57 |
|
58 |
if($ct_general_postdata_test==1)
|
224 |
*/
|
225 |
function ct_add_hidden_fields($random_key = false, $field_name = 'ct_checkjs', $return_string = false, $cookie_check = false) {
|
226 |
global $ct_checkjs_def, $ct_plugin_name, $ct_options;
|
227 |
+
//$ct_options=ct_get_options();
|
228 |
if(isset($ct_options['use_ajax']))
|
229 |
{
|
230 |
$use_ajax = @intval($ct_options['use_ajax']);
|
606 |
function js_test($field_name = 'ct_checkjs', $data = null, $random_key = false) {
|
607 |
global $ct_options, $ct_data;
|
608 |
|
609 |
+
//$ct_data=ct_get_data();
|
610 |
|
611 |
$checkjs = null;
|
612 |
$js_post_value = null;
|
937 |
ct_send_error_notice($ct_result->comment);
|
938 |
return $errors;
|
939 |
}
|
940 |
+
if ($ct_result->errno != 0 && $checkjs==0)
|
941 |
+
{
|
942 |
+
$ct_result->allow=0;
|
943 |
+
}
|
944 |
|
945 |
if ($ct_result->inactive != 0) {
|
946 |
ct_send_error_notice($ct_result->comment);
|
1484 |
(isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword'||
|
1485 |
strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false ||
|
1486 |
strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!==false ||
|
1487 |
+
strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false||
|
1488 |
+
strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false
|
1489 |
)
|
1490 |
) {
|
1491 |
return null;
|
1565 |
(isset($pagenow) && $pagenow == 'wp-cron.php' ||
|
1566 |
strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false) ||
|
1567 |
strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!==false ||
|
1568 |
+
strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false ||
|
1569 |
+
strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false
|
1570 |
) {
|
1571 |
return null;
|
1572 |
}
|
1653 |
return null;
|
1654 |
}
|
1655 |
|
1656 |
+
function ct_print_form($arr,$k)
|
1657 |
+
{
|
1658 |
+
foreach($arr as $key=>$value)
|
1659 |
+
{
|
1660 |
+
if(!is_array($value))
|
1661 |
+
{
|
1662 |
+
if($k=='')
|
1663 |
+
{
|
1664 |
+
print '<textarea name="'.$key.'">'.htmlspecialchars($value).'</textarea>';
|
1665 |
+
}
|
1666 |
+
else
|
1667 |
+
{
|
1668 |
+
print '<textarea name="'.$k.'['.$key.']">'.htmlspecialchars($value).'</textarea>';
|
1669 |
+
}
|
1670 |
+
}
|
1671 |
+
else
|
1672 |
+
{
|
1673 |
+
if($k=='')
|
1674 |
+
{
|
1675 |
+
ct_print_form($value,$key);
|
1676 |
+
}
|
1677 |
+
else
|
1678 |
+
{
|
1679 |
+
ct_print_form($value,$k.'['.$key.']');
|
1680 |
+
}
|
1681 |
+
}
|
1682 |
+
}
|
1683 |
+
}
|
1684 |
+
|
1685 |
+
?>
|
cleantalk.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Cleantalk base class
|
4 |
*
|
5 |
-
* @version 2.0
|
6 |
* @package Cleantalk
|
7 |
* @subpackage Base
|
8 |
* @author Cleantalk team (welcome@cleantalk.org)
|
@@ -1055,6 +1055,7 @@ function sendRawRequest($url,$data,$isJSON=false,$timeout=3)
|
|
1055 |
{
|
1056 |
$data= json_encode($data);
|
1057 |
}
|
|
|
1058 |
if (function_exists('curl_init') && function_exists('json_decode'))
|
1059 |
{
|
1060 |
|
@@ -1072,10 +1073,14 @@ function sendRawRequest($url,$data,$isJSON=false,$timeout=3)
|
|
1072 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
1073 |
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
1074 |
|
1075 |
-
$result = curl_exec($ch);
|
1076 |
-
|
|
|
|
|
|
|
|
|
1077 |
}
|
1078 |
-
|
1079 |
{
|
1080 |
$opts = array(
|
1081 |
'http'=>array(
|
2 |
/**
|
3 |
* Cleantalk base class
|
4 |
*
|
5 |
+
* @version 2.0.0
|
6 |
* @package Cleantalk
|
7 |
* @subpackage Base
|
8 |
* @author Cleantalk team (welcome@cleantalk.org)
|
1055 |
{
|
1056 |
$data= json_encode($data);
|
1057 |
}
|
1058 |
+
$curl_exec=false;
|
1059 |
if (function_exists('curl_init') && function_exists('json_decode'))
|
1060 |
{
|
1061 |
|
1073 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
1074 |
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
1075 |
|
1076 |
+
$result = @curl_exec($ch);
|
1077 |
+
if($result!==false)
|
1078 |
+
{
|
1079 |
+
$curl_exec=true;
|
1080 |
+
}
|
1081 |
+
@curl_close($ch);
|
1082 |
}
|
1083 |
+
if(!$curl_exec)
|
1084 |
{
|
1085 |
$opts = array(
|
1086 |
'http'=>array(
|
cleantalk.php
CHANGED
@@ -3,17 +3,37 @@
|
|
3 |
Plugin Name: Anti-spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, captcha less, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
|
6 |
-
Version: 5.
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
-
$cleantalk_plugin_version='5.
|
11 |
$cleantalk_executed=false;
|
12 |
|
13 |
if(!defined('CLEANTALK_PLUGIN_DIR')){
|
14 |
define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
|
|
|
|
15 |
|
16 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-common.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
// Activation/deactivation functions must be in main plugin file.
|
19 |
// http://codex.wordpress.org/Function_Reference/register_activation_hook
|
@@ -29,7 +49,6 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
29 |
// After plugin loaded - to load locale as described in manual
|
30 |
add_action( 'plugins_loaded', 'ct_plugin_loaded' );
|
31 |
|
32 |
-
$ct_options=ct_get_options();
|
33 |
if(isset($ct_options['use_ajax']))
|
34 |
{
|
35 |
$use_ajax = @intval($ct_options['use_ajax']);
|
@@ -44,11 +63,10 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
44 |
add_action('wp_loaded', 'ct_add_nocache_script', 1);
|
45 |
add_action('wp_footer', 'ct_add_nocache_script_footer', 1);
|
46 |
add_action('wp_head', 'ct_add_nocache_script_header', 1);
|
|
|
|
|
47 |
}
|
48 |
|
49 |
-
add_action( 'wp_ajax_nopriv_ct_get_cookie', 'ct_get_cookie',1 );
|
50 |
-
add_action( 'wp_ajax_ct_get_cookie', 'ct_get_cookie',1 );
|
51 |
-
|
52 |
|
53 |
if (is_admin())
|
54 |
{
|
@@ -176,7 +194,13 @@ function ct_add_nocache_script()
|
|
176 |
|
177 |
function ct_add_nocache_script_footer()
|
178 |
{
|
|
|
179 |
print "<script type='text/javascript' src='".plugins_url( '/cleantalk_nocache.js' , __FILE__ )."?random=".rand()."'></script>\n";
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
181 |
|
182 |
function ct_add_nocache_script_header()
|
@@ -186,10 +210,17 @@ function ct_add_nocache_script_header()
|
|
186 |
|
187 |
function ct_inject_nocache_script($html)
|
188 |
{
|
|
|
189 |
if(!is_admin()&&stripos($html,"</body")!==false)
|
190 |
{
|
191 |
//$ct_replace.="\n<script type='text/javascript'>var ajaxurl = '".admin_url('admin-ajax.php')."';</script>\n";
|
192 |
$ct_replace="<script type='text/javascript' src='".plugins_url( '/cleantalk_nocache.js' , __FILE__ )."?random=".rand()."'></script>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
//$html=str_ireplace("</body",$ct_replace."</body",$html);
|
194 |
$html=substr_replace($html,$ct_replace."</body",strripos($html,"</body"),6);
|
195 |
}
|
@@ -200,7 +231,9 @@ function ct_inject_nocache_script($html)
|
|
200 |
}
|
201 |
return $html;
|
202 |
}
|
203 |
-
|
204 |
-
|
|
|
|
|
205 |
|
206 |
?>
|
3 |
Plugin Name: Anti-spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, captcha less, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
|
6 |
+
Version: 5.15
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
+
$cleantalk_plugin_version='5.15';
|
11 |
$cleantalk_executed=false;
|
12 |
|
13 |
if(!defined('CLEANTALK_PLUGIN_DIR')){
|
14 |
define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
15 |
+
global $ct_options, $ct_data;
|
16 |
+
|
17 |
|
18 |
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-common.php');
|
19 |
+
$ct_options=ct_get_options();
|
20 |
+
$ct_data=ct_get_data();
|
21 |
+
|
22 |
+
if(isset($ct_options['check_external']))
|
23 |
+
{
|
24 |
+
if(@intval($ct_options['check_external'])==1)
|
25 |
+
{
|
26 |
+
$test_external_forms=true;
|
27 |
+
}
|
28 |
+
else
|
29 |
+
{
|
30 |
+
$test_external_forms=false;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
else
|
34 |
+
{
|
35 |
+
$test_external_forms=false;
|
36 |
+
}
|
37 |
|
38 |
// Activation/deactivation functions must be in main plugin file.
|
39 |
// http://codex.wordpress.org/Function_Reference/register_activation_hook
|
49 |
// After plugin loaded - to load locale as described in manual
|
50 |
add_action( 'plugins_loaded', 'ct_plugin_loaded' );
|
51 |
|
|
|
52 |
if(isset($ct_options['use_ajax']))
|
53 |
{
|
54 |
$use_ajax = @intval($ct_options['use_ajax']);
|
63 |
add_action('wp_loaded', 'ct_add_nocache_script', 1);
|
64 |
add_action('wp_footer', 'ct_add_nocache_script_footer', 1);
|
65 |
add_action('wp_head', 'ct_add_nocache_script_header', 1);
|
66 |
+
add_action( 'wp_ajax_nopriv_ct_get_cookie', 'ct_get_cookie',1 );
|
67 |
+
add_action( 'wp_ajax_ct_get_cookie', 'ct_get_cookie',1 );
|
68 |
}
|
69 |
|
|
|
|
|
|
|
70 |
|
71 |
if (is_admin())
|
72 |
{
|
194 |
|
195 |
function ct_add_nocache_script_footer()
|
196 |
{
|
197 |
+
global $test_external_forms;
|
198 |
print "<script type='text/javascript' src='".plugins_url( '/cleantalk_nocache.js' , __FILE__ )."?random=".rand()."'></script>\n";
|
199 |
+
if($test_external_forms)
|
200 |
+
{
|
201 |
+
print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
202 |
+
print "<script type='text/javascript' src='".plugins_url( '/cleantalk_external.js' , __FILE__ )."?random=".rand()."'></script>\n";
|
203 |
+
}
|
204 |
}
|
205 |
|
206 |
function ct_add_nocache_script_header()
|
210 |
|
211 |
function ct_inject_nocache_script($html)
|
212 |
{
|
213 |
+
global $test_external_forms;
|
214 |
if(!is_admin()&&stripos($html,"</body")!==false)
|
215 |
{
|
216 |
//$ct_replace.="\n<script type='text/javascript'>var ajaxurl = '".admin_url('admin-ajax.php')."';</script>\n";
|
217 |
$ct_replace="<script type='text/javascript' src='".plugins_url( '/cleantalk_nocache.js' , __FILE__ )."?random=".rand()."'></script>\n";
|
218 |
+
if($test_external_forms)
|
219 |
+
{
|
220 |
+
$ct_replace.="\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
221 |
+
$ct_replace.="<script type='text/javascript' src='".plugins_url( '/cleantalk_external.js' , __FILE__ )."?random=".rand()."'></script>\n";
|
222 |
+
}
|
223 |
+
|
224 |
//$html=str_ireplace("</body",$ct_replace."</body",$html);
|
225 |
$html=substr_replace($html,$ct_replace."</body",strripos($html,"</body"),6);
|
226 |
}
|
231 |
}
|
232 |
return $html;
|
233 |
}
|
234 |
+
if(is_admin())
|
235 |
+
{
|
236 |
+
require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-comments.php');
|
237 |
+
}
|
238 |
|
239 |
?>
|
cleantalk_external.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(ct_external_executed==undefined)
|
2 |
+
{
|
3 |
+
var ct_external_executed=true;
|
4 |
+
for(i=0;i<document.forms.length;i++)
|
5 |
+
{
|
6 |
+
if(typeof(document.forms[i].action)=='string')
|
7 |
+
{
|
8 |
+
action=document.forms[i].action;
|
9 |
+
if(action.indexOf('http://')!=-1||action.indexOf('https://')!=-1)
|
10 |
+
{
|
11 |
+
tmp=action.split('//');
|
12 |
+
tmp=tmp[1].split('/');
|
13 |
+
host=tmp[0].toLowerCase();
|
14 |
+
if(host!=location.hostname.toLowerCase())
|
15 |
+
{
|
16 |
+
var ct_action = document.createElement("input");
|
17 |
+
ct_action.name='cleantalk_hidden_action';
|
18 |
+
ct_action.value=action;
|
19 |
+
ct_action.type='hidden';
|
20 |
+
document.forms[i].appendChild(ct_action);
|
21 |
+
|
22 |
+
var ct_method = document.createElement("input");
|
23 |
+
ct_method.name='cleantalk_hidden_method';
|
24 |
+
ct_method.value=document.forms[i].method;
|
25 |
+
ct_method.type='hidden';
|
26 |
+
document.forms[i].method='POST';
|
27 |
+
document.forms[i].appendChild(ct_method);
|
28 |
+
|
29 |
+
document.forms[i].action=ct_blog_home;
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
i18n/cleantalk-en_US.mo
ADDED
Binary file
|
readme.txt
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
=== Anti-spam
|
2 |
Contributors: znaeff, shagimuratov, vlad-cleantalk
|
3 |
-
Tags: akismet, anti-spam, antispam, bbpress spam, buddypress spam, captcha antispam, cf7 spam, comments spam, contact form spam, form, Formidable spam, jetpack spam, math, registration spam, s2member spam, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam, booking spam, order spam, subscriptions spam, comments, gravity spam, gravity forms spam, widget, widget spam, registration, plugin, antispam plugin, anti-spam plugin, ninja, cache
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.3
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
|
11 |
-
Max power, all-in-one, premium anti-spam. No comments
|
12 |
|
13 |
== Description ==
|
14 |
No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
|
@@ -31,7 +31,7 @@ No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam b
|
|
31 |
* WordPress Landing Pages.
|
32 |
* Any WordPress form (option 'Custom contact forms').
|
33 |
|
34 |
-
=
|
35 |
* W3 Total Cache, Quick Cache, WP Fastest Cache, Hyper Cache, WP Super cache
|
36 |
|
37 |
= Check existing comments for spam =
|
@@ -41,7 +41,7 @@ With the help of anti-spam CleanTalk you can check existing comments, to find a
|
|
41 |
Spam is one of the most irritating factors. Spam become every year more and conventional anti-spam can no longer handle all the spam bots. CleanTalk prevents spam and automatically blocks it. You'll be surprised of effective protection against spam.
|
42 |
|
43 |
= Anti-spam plugin info =
|
44 |
-
CleanTalk is an anti-spam protection **
|
45 |
|
46 |
CleanTalk is a transparent anti-spam protection, we provide detailed statistics of all entering comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see anti-spam statistics wherever.
|
47 |
|
@@ -62,16 +62,33 @@ CleanTalk is premium anti-spam service for WordPress, please look at the <a href
|
|
62 |
* No captcha, puzzles, etc.
|
63 |
* Free mobile app to control anti-spam function at your website.
|
64 |
|
65 |
-
= How to protect sites from spam bots without CAPTCHA? =
|
66 |
-
The most popular method is CAPTCHA - the annoying picture with curved and sloping symbols, which are offered to the visitor to fill in. It is supposed that spam bots won't discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if one wants to speak out, he has to fill in these symbols time after time, making mistakes and starting once again.
|
67 |
-
Sometimes CAPTCHA reminds doodle 2x year old child. For users with vision problems captcha is just an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to bring it up to 95% reject further attempts.
|
68 |
-
At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts Concerning the Need for CAPTCHA?
|
69 |
-
|
70 |
= Additional features =
|
71 |
* Online, daily and weekly anti-spam reports traffic VS spam.
|
72 |
* Apps for iPhone, Android to control anti-spam service, comments, signups, contacts. With traffic and spam statistics for last 7 days.
|
73 |
* Anti-spam apps for most popular CMS on cleantalk.org.
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
= We recommend =
|
76 |
Audience engagement plugin <a href="http://wordpress.org/plugins/feedweb/">Feedweb</a>
|
77 |
|
@@ -83,14 +100,17 @@ Audience engagement plugin <a href="http://wordpress.org/plugins/feedweb/">Feedw
|
|
83 |
== Installation ==
|
84 |
1. Download, install and activate Anti-spam by CleanTalk.
|
85 |
1. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
|
86 |
-
1. Enter Access key on the plugin settings
|
|
|
|
|
|
|
87 |
1. Do dummy spam comment (registration or contact message) with email **stop_email@example.com**.
|
88 |
|
89 |
You should see notice,
|
90 |
|
91 |
-
*** Forbidden. Sender blacklisted.
|
92 |
|
93 |
-
The setup is done!
|
94 |
|
95 |
== Frequently Asked Questions ==
|
96 |
|
@@ -148,33 +168,9 @@ Anti-spam by CleanTalk doesn't use static HTML code into templates, so all anti-
|
|
148 |
= Does the plugin protects against spam bots at forms with third-party services? =
|
149 |
If your contact or subscribe form sends data to third-party servers (like mailchimp.com and etc.) the plugin will not protect your form against spam bots. Because the plugin protects only forms which are sends data directly to your WordPress website.
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
= Troubleshooting Guide =
|
154 |
-
<a href="http://wordpress.org/support/plugin/cleantalk-spam-protect">Anti-spam by CleanTalk support forum</a> | <a href="http://wordpress.org/plugins/cleantalk-spam-protect/faq/">Plugin FAQ</a>
|
155 |
-
|
156 |
-
If you're having trouble getting things to work after installing the plugin, here are a few things to check:
|
157 |
|
158 |
-
1. If you haven't yet, please upgrade plugin to the latest version.
|
159 |
-
1. If you have error '*** Forbidden. Enable JavaScript. Anti-spam service cleantalk.org. ***' please check JavaScript support in your browser and do JavaScript test at this page <a href="http://cleantalk.org/checkout-javascript-support">Check out JavaScript support</a>.
|
160 |
-
1. If you have spam comments, signups or contacts please check the Access key at plugin settings. The key should be same as you can find in service <a href="https://cleantalk.org/my/">Dashboard</a>.
|
161 |
-
|
162 |
-
= CAPTCHA =
|
163 |
-
The annoying picture with curved and sloping symbols, which are offered to the visitor to fill in. It is supposed that spam bots won’t discern these symbols, but a visitor will. CAPTCHA provokes great irritation, but if one wants to speak out, he has to fill in these symbols time after time, making mistakes and starting once again. At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource from visitors. Spam bots can automatically recognize Captcha.
|
164 |
-
Spam bots can not pass through the anti-spam CleanTalk, complex invisible checks can immediately detect spam bots.
|
165 |
-
|
166 |
-
= Requirements =
|
167 |
-
WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enabled 'allow_url_fopen' setting. <a href="http://cleantalk.org/register?platform=wordpress">Sign up</a> to get an Access key.
|
168 |
-
|
169 |
-
= Translations =
|
170 |
-
* Danish (da_DK)
|
171 |
-
* French (fr_FR) - thanks to Gilles Santacreu <a href="http://net-ik.net">http://net-ik.net</a>
|
172 |
-
* German (de_DE)
|
173 |
-
* Italian (it_IT)
|
174 |
-
* Polish (pl_PL)
|
175 |
-
* Portuguese (pt_PT)
|
176 |
-
* Spanish (es_ES) - thanks to Andrew Kurtis and <a href="http://www.webhostinghub.com/index-c.html">WebHostingHub</a>
|
177 |
-
* Russian (ru_RU)
|
178 |
|
179 |
== Screenshots ==
|
180 |
1. Anti-spam plugin settings.
|
@@ -184,8 +180,9 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
|
|
184 |
1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
|
185 |
|
186 |
== Changelog ==
|
187 |
-
= 5.15 2015-07-
|
188 |
* New feature: anti-spam protection for forms, that uses external services
|
|
|
189 |
|
190 |
= 5.14 2015-07-03 =
|
191 |
* Added anti-spam protection for some themes and plugins
|
@@ -593,7 +590,7 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
|
|
593 |
* First version
|
594 |
|
595 |
== Upgrade Notice ==
|
596 |
-
= 5.15 2015-07-
|
597 |
* New feature: anti-spam protection for forms, that uses external services
|
598 |
|
599 |
= 5.14 2015-07-03 =
|
1 |
+
=== Anti-spam (no comments spam, no registrations spam) ===
|
2 |
Contributors: znaeff, shagimuratov, vlad-cleantalk
|
3 |
+
Tags: akismet, anti-spam, antispam, bbpress spam, buddypress spam, captcha antispam, cf7 spam, comments spam, contact form spam, form, Formidable spam, jetpack spam, math, registration spam, s2member spam, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam, booking spam, order spam, subscriptions spam, comments, gravity spam, gravity forms spam, widget, widget spam, registration, plugin, antispam plugin, anti-spam plugin, ninja, cache
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.3
|
6 |
+
Stable tag: 5.15
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
|
11 |
+
Max power, all-in-one, premium anti-spam. No comments spam, no registrations spam, no contact spam, protects any forms. Just install and forget spam.
|
12 |
|
13 |
== Description ==
|
14 |
No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
|
31 |
* WordPress Landing Pages.
|
32 |
* Any WordPress form (option 'Custom contact forms').
|
33 |
|
34 |
+
= Supports WordPress cache plugins =
|
35 |
* W3 Total Cache, Quick Cache, WP Fastest Cache, Hyper Cache, WP Super cache
|
36 |
|
37 |
= Check existing comments for spam =
|
41 |
Spam is one of the most irritating factors. Spam become every year more and conventional anti-spam can no longer handle all the spam bots. CleanTalk prevents spam and automatically blocks it. You'll be surprised of effective protection against spam.
|
42 |
|
43 |
= Anti-spam plugin info =
|
44 |
+
CleanTalk is an anti-spam protection **7 in 1 for WordPress** that protects login, comments, contact and WooCommerce forms all at once. You don't need to install separate anti-spam plugins for each form. This allows your blog to work faster and save resources. After installation **you will forget about spam**, CleanTalk plugin will do all the work. You won't have to deal with spam, CleanTalk will do this for you automatically.
|
45 |
|
46 |
CleanTalk is a transparent anti-spam protection, we provide detailed statistics of all entering comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see anti-spam statistics wherever.
|
47 |
|
62 |
* No captcha, puzzles, etc.
|
63 |
* Free mobile app to control anti-spam function at your website.
|
64 |
|
|
|
|
|
|
|
|
|
|
|
65 |
= Additional features =
|
66 |
* Online, daily and weekly anti-spam reports traffic VS spam.
|
67 |
* Apps for iPhone, Android to control anti-spam service, comments, signups, contacts. With traffic and spam statistics for last 7 days.
|
68 |
* Anti-spam apps for most popular CMS on cleantalk.org.
|
69 |
|
70 |
+
= Troubleshooting Guide =
|
71 |
+
<a href="http://wordpress.org/support/plugin/cleantalk-spam-protect">Anti-spam by CleanTalk support forum</a> | <a href="http://wordpress.org/plugins/cleantalk-spam-protect/faq/">Plugin FAQ</a>
|
72 |
+
|
73 |
+
If you're having trouble getting things to work after installing the plugin, here are a few things to check:
|
74 |
+
|
75 |
+
1. If you haven't yet, please upgrade plugin to the latest version.
|
76 |
+
1. If you have error '*** Forbidden. Enable JavaScript. Anti-spam service cleantalk.org. ***' please check JavaScript support in your browser and do JavaScript test at this page <a href="http://cleantalk.org/checkout-javascript-support">Check out JavaScript support</a>.
|
77 |
+
1. If you have spam comments, signups or contacts please check the Access key in plugin settings. The key should be same as you can find in service <a href="https://cleantalk.org/my/">Dashboard</a>.
|
78 |
+
|
79 |
+
= Requirements =
|
80 |
+
WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enabled 'allow_url_fopen' setting.
|
81 |
+
|
82 |
+
= Translations =
|
83 |
+
* Danish (da_DK)
|
84 |
+
* French (fr_FR) - thanks to Gilles Santacreu <a href="http://net-ik.net">http://net-ik.net</a>
|
85 |
+
* German (de_DE)
|
86 |
+
* Italian (it_IT)
|
87 |
+
* Polish (pl_PL)
|
88 |
+
* Portuguese (pt_PT)
|
89 |
+
* Spanish (es_ES) - thanks to Andrew Kurtis and <a href="http://www.webhostinghub.com/index-c.html">WebHostingHub</a>
|
90 |
+
* Russian (ru_RU)
|
91 |
+
|
92 |
= We recommend =
|
93 |
Audience engagement plugin <a href="http://wordpress.org/plugins/feedweb/">Feedweb</a>
|
94 |
|
100 |
== Installation ==
|
101 |
1. Download, install and activate Anti-spam by CleanTalk.
|
102 |
1. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
|
103 |
+
1. Enter Access key on the plugin settings,
|
104 |
+
|
105 |
+
WordPress console -> Settings -> Anti-spam by CleanTalk
|
106 |
+
|
107 |
1. Do dummy spam comment (registration or contact message) with email **stop_email@example.com**.
|
108 |
|
109 |
You should see notice,
|
110 |
|
111 |
+
*** Forbidden. Sender blacklisted. ***
|
112 |
|
113 |
+
The setup is done! Use dashboard to control anti-spam plugin at <a href="https://cleantalk.org/my" target="_blank">cleantalk.org</a> or use <a href="https://play.google.com/store/apps/details?id=org.cleantalk.app">Android</a>, <a href="https://itunes.apple.com/us/app/cleantalk/id825479913?mt=8">iPhone</a> anti-spam app.
|
114 |
|
115 |
== Frequently Asked Questions ==
|
116 |
|
168 |
= Does the plugin protects against spam bots at forms with third-party services? =
|
169 |
If your contact or subscribe form sends data to third-party servers (like mailchimp.com and etc.) the plugin will not protect your form against spam bots. Because the plugin protects only forms which are sends data directly to your WordPress website.
|
170 |
|
171 |
+
= What is "Connection test" message? =
|
172 |
+
After activation Anti-spam by CleanTalk sends test message with email stop_email@example.com. This request required for test our plugin and in some cases it can give us information about problems in plugin, so you can contact our support in time. Result of test query you can see in plugin's settings - green ticks or red crosses.
|
|
|
|
|
|
|
|
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
== Screenshots ==
|
176 |
1. Anti-spam plugin settings.
|
180 |
1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
|
181 |
|
182 |
== Changelog ==
|
183 |
+
= 5.15 2015-07-16 =
|
184 |
* New feature: anti-spam protection for forms, that uses external services
|
185 |
+
* Protection improvement: plugin filter spam bots registrations, even connect to our servers failed.
|
186 |
|
187 |
= 5.14 2015-07-03 =
|
188 |
* Added anti-spam protection for some themes and plugins
|
590 |
* First version
|
591 |
|
592 |
== Upgrade Notice ==
|
593 |
+
= 5.15 2015-07-16 =
|
594 |
* New feature: anti-spam protection for forms, that uses external services
|
595 |
|
596 |
= 5.14 2015-07-03 =
|