Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.141.1

Version Description

Jul 06 2020 = * Fix: Add timeout for first SFW activation.

Download this release

Release Info

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

Code changes from version 5.141 to 5.141.1

cleantalk.php CHANGED
@@ -3,10 +3,10 @@
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: https://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.
6
- Version: 5.141
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: https://cleantalk.org
9
- Text Domain: cleantalk
10
  Domain Path: /i18n
11
  */
12
 
@@ -474,6 +474,7 @@ function apbct_after_options_added($option, $value) {
474
  if ($option == 'cleantalk_settings') {
475
  // SFW actions
476
  if($value['spam_firewall'] == 1){
 
477
  $result = ct_sfw_update(true, $value['apikey']);
478
  if( ! empty( $result['error'] ) )
479
  $apbct->error_add('sfw_update', $result['error']);
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: https://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.
6
+ Version: 5.141.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: https://cleantalk.org
9
+ Text Domain: cleantalk-spam-protect
10
  Domain Path: /i18n
11
  */
12
 
474
  if ($option == 'cleantalk_settings') {
475
  // SFW actions
476
  if($value['spam_firewall'] == 1){
477
+ sleep(6);
478
  $result = ct_sfw_update(true, $value['apikey']);
479
  if( ! empty( $result['error'] ) )
480
  $apbct->error_add('sfw_update', $result['error']);
inc/cleantalk-admin.php CHANGED
@@ -32,15 +32,15 @@ function apbct_add_buttons_to_comments_and_users( $unused_argument ) {
32
  echo '
33
  <a href="' . $button_url__check . '" class="button" style="margin:1px 0 0 0; display: inline-block;">
34
  <img src="' . $apbct->logo__small__colored . '" alt="Cleantalk Antispam logo" height="" style="width: 17px; vertical-align: text-bottom;" />
35
- ' . sprintf(__( 'Find spam %s', 'cleantalk' ), $button_description ) . '
36
  </a>
37
  <a href="' . $button_url__results . '" class="button" style="margin:1px 0 0 0; display: inline-block;">
38
  <img src="' . $apbct->logo__small__colored . '" alt="Cleantalk Antispam logo" height="" style="width: 17px; vertical-align: text-bottom;" />
39
- ' . sprintf(__( 'View spam %s', 'cleantalk' ), $button_description ) . '
40
  </a>
41
  <a href="https://cleantalk.org/my/show_requests?service_id=' . $apbct->data['service_id'] . '&int=week" target="_blank" class="button" style="margin:1px 0 0 0; display: inline-block;">
42
  <img src="' . $apbct->logo__small__colored . '" alt="Cleantalk Antispam logo" height="" style="width: 17px; vertical-align: text-bottom;" />
43
- ' . __( 'CleanTalk Anti-Spam Log', 'cleantalk' ) . '
44
  </a>
45
  ';
46
 
@@ -59,8 +59,8 @@ function ct_dashboard_statistics_widget() {
59
  $apbct->plugin_name
60
  ."<div class='ct_widget_top_links'>"
61
  ."<img src='".plugins_url('/cleantalk-spam-protect/inc/images/preloader.gif')."' class='ct_preloader'>"
62
- .sprintf(__("%sRefresh%s", 'cleantalk'), "<a href='#ct_widget' class='ct_widget_refresh_link'>", "</a>")
63
- .sprintf(__("%sConfigure%s", 'cleantalk'), "<a href='{$apbct->settings_link}' class='ct_widget_settings_link'>", "</a>")
64
  ."</div>",
65
  'ct_dashboard_statistics_widget_output'
66
  );
@@ -77,17 +77,17 @@ function ct_dashboard_statistics_widget_output( $post, $callback_args ) {
77
  <form id='ct_refresh_form' method='POST' action='#ct_widget'>
78
  <input type='hidden' name='ct_brief_refresh' value='1'>
79
  </form>
80
- <h4 class='ct_widget_block_header' style='margin-left: 12px;'><?php _e('7 days anti-spam stats', 'cleantalk'); ?></h4>
81
  <div class='ct_widget_block ct_widget_chart_wrapper'>
82
  <div id='ct_widget_chart'></div>
83
  </div>
84
- <h4 class='ct_widget_block_header'><?php _e('Top 5 spam IPs blocked', 'cleantalk'); ?></h4>
85
  <hr class='ct_widget_hr'>
86
  <?php
87
  if(!apbct_api_key__is_correct() || (isset($apbct->data['brief_data']['error_no']) && $apbct->data['brief_data']['error_no'] == 6)){
88
  ?> <div class='ct_widget_block'>
89
  <form action='<? echo $apbct->settings_link; ?>' method='POST'>
90
- <h2 class='ct_widget_activate_header'><?php _e('Get Access key to activate Anti-Spam protection!', 'cleantalk'); ?></h2>
91
  <input class='ct_widget_button ct_widget_activate_button' type='submit' name='get_apikey_auto' value='ACTIVATE' />
92
  </form>
93
  </div>
@@ -95,11 +95,11 @@ function ct_dashboard_statistics_widget_output( $post, $callback_args ) {
95
  }elseif(!empty($apbct->data['brief_data']['error'])){
96
  echo '<div class="ct_widget_block">'
97
  .'<h2 class="ct_widget_activate_header">'
98
- .sprintf(__('Something went wrong! Error: "%s".', 'cleantalk'), "<u>{$apbct->brief_data['error']}</u>")
99
  .'</h2>';
100
  if($apbct->user_token && !$apbct->white_label){
101
  echo '<h2 class="ct_widget_activate_header">'
102
- .__('Please, visit your dashboard.', 'cleantalk')
103
  .'</h2>'
104
  .'<a target="_blank" href="https://cleantalk.org/my?user_token='.$apbct->user_token.'&cp_mode=antispam">'
105
  .'<input class="ct_widget_button ct_widget_activate_button ct_widget_resolve_button" type="button" value="VISIT CONTROL PANEL">'
@@ -113,9 +113,9 @@ function ct_dashboard_statistics_widget_output( $post, $callback_args ) {
113
  <div class='ct_widget_block'>
114
  <table cellspacing="0">
115
  <tr>
116
- <th><?php _e('IP', 'cleantalk'); ?></th>
117
- <th><?php _e('Country', 'cleantalk'); ?></th>
118
- <th><?php _e('Block Count', 'cleantalk'); ?></th>
119
  </tr>
120
  <?php foreach($apbct->brief_data['top5_spam_ip'] as $val){ ?>
121
  <tr>
@@ -143,10 +143,10 @@ function ct_dashboard_statistics_widget_output( $post, $callback_args ) {
143
  if($apbct->spam_count && $apbct->spam_count > 0){
144
  echo '<div class="ct_widget_wprapper_total_blocked">'
145
  .'<img src="'.$apbct->logo__small__colored.'" class="ct_widget_small_logo"/>'
146
- .'<span title="'.sprintf(__('This is the count from the %s\'s cloud and could be different to admin bar counters', 'cleantalk').'">', $apbct->plugin_name)
147
  .sprintf(
148
  /* translators: %s: Number of spam messages */
149
- __( '%s%s%s has blocked %s spam for all time. The statistics are automatically updated every 24 hours.', 'cleantalk'),
150
  !$apbct->white_label ? '<a href="https://cleantalk.org/my/?user_token='.$apbct->user_token.'&utm_source=wp-backend&utm_medium=dashboard_widget&cp_mode=antispam" target="_blank">' : '',
151
  $apbct->plugin_name,
152
  !$apbct->white_label ? '</a>' : '',
@@ -157,7 +157,7 @@ function ct_dashboard_statistics_widget_output( $post, $callback_args ) {
157
  ? '<br><br>'
158
  .'<b style="font-size: 16px;">'
159
  .sprintf(
160
- __('Do you like CleanTalk? %sPost your feedback here%s.', 'cleantalk'),
161
  '<u><a href="https://wordpress.org/support/plugin/cleantalk-spam-protect/reviews/#new-post" target="_blank">',
162
  '</a></u>'
163
  )
@@ -239,12 +239,12 @@ function apbct_admin__register_plugin_links($links, $file){
239
  $links[] = '<a class="ct_meta_links ct_translate_links" href="'
240
  .sprintf('https://translate.wordpress.org/locale/%s/default/wp-plugins/cleantalk-spam-protect', substr(get_locale(), 0, 2))
241
  .'" target="_blank">'
242
- .__('Translate', 'cleantalk')
243
  .'</a>';
244
 
245
- $links[] = '<a class="ct_meta_links" href="'.$apbct->settings_link.'" target="_blank">' . __( 'Start here','cleantalk' ) . '</a>';
246
- $links[] = '<a class="ct_meta_links ct_faq_links" href="https://wordpress.org/plugins/cleantalk-spam-protect/faq/" target="_blank">' . __( 'FAQ','cleantalk' ) . '</a>';
247
- $links[] = '<a class="ct_meta_links ct_support_links"href="https://wordpress.org/support/plugin/cleantalk-spam-protect" target="_blank">' . __( 'Support','cleantalk' ) . '</a>';
248
  $trial = apbct_admin__badge__get_premium(false);
249
  if(!empty($trial))
250
  $links[] = apbct_admin__badge__get_premium(false);
@@ -317,7 +317,7 @@ function apbct_admin__enqueue_scripts($hook){
317
  wp_enqueue_style ('ct_icons', plugins_url('/cleantalk-spam-protect/css/cleantalk-icons.min.css'), array(), APBCT_VERSION, 'all');
318
 
319
  wp_localize_script( 'jquery', 'ctSettingsPage', array(
320
- 'ct_subtitle' => $apbct->ip_license ? __('Hosting AntiSpam', 'cleantalk') : '',
321
  'ip_license' => $apbct->ip_license ? true : false,
322
  ));
323
  }
@@ -327,10 +327,10 @@ function apbct_admin__enqueue_scripts($hook){
327
  wp_enqueue_script('ct_comments_editscreen', plugins_url('/cleantalk-spam-protect/js/cleantalk-comments-editscreen.min.js'), array(), APBCT_VERSION);
328
  wp_localize_script( 'jquery', 'ctCommentsScreen', array(
329
  'ct_ajax_nonce' => wp_create_nonce('ct_secret_nonce'),
330
- 'spambutton_text' => __("Find spam comments", 'cleantalk'),
331
- 'ct_feedback_msg_whitelisted' => __("The sender has been whitelisted.", 'cleantalk'),
332
- 'ct_feedback_msg_blacklisted' => __("The sender has been blacklisted.", 'cleantalk'),
333
- 'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk'), $apbct->user_token ? "<a target='_blank' href=https://cleantalk.org/my?user_token={$apbct->user_token}&cp_mode=antispam>" : '', $apbct->user_token ? "</a>" : ''),
334
  'ct_show_check_links' => (bool)$apbct->settings['show_check_links'],
335
  'ct_img_src_new_tab' => plugin_dir_url(__FILE__)."images/new_window.gif",
336
  ));
@@ -341,7 +341,7 @@ function apbct_admin__enqueue_scripts($hook){
341
  wp_enqueue_style ('ct_icons', plugins_url('/cleantalk-spam-protect/css/cleantalk-icons.min.css'), array(), APBCT_VERSION, 'all');
342
  wp_enqueue_script('ct_users_editscreen', plugins_url('/cleantalk-spam-protect/js/cleantalk-users-editscreen.min.js'), array(), APBCT_VERSION);
343
  wp_localize_script( 'jquery', 'ctUsersScreen', array(
344
- 'spambutton_text' => __("Find spam-users", 'cleantalk'),
345
  'ct_show_check_links' => (bool)$apbct->settings['show_check_links'],
346
  'ct_img_src_new_tab' => plugin_dir_url(__FILE__)."images/new_window.gif"
347
  ));
@@ -382,10 +382,10 @@ function apbct_admin__notice_message(){
382
  /* Disabled at 09.09.2018
383
  if($apbct->notice_auto_update == 1 && $apbct->auto_update != -1 && empty($_COOKIE['apbct_update_banner_closed'])){
384
  $link = '<a href="https://cleantalk.org/help/cleantalk-auto-update" target="_blank">%s</a>';
385
- $button = sprintf($link, '<input type="button" class="button button-primary" value="'.__('Learn more', 'cleantalk').'" />');
386
  echo '<div class="error notice is-dismissible apbct_update_notice">'
387
  .'<h3>'
388
- .__('Do you know that Anti-Spam by CleanTalk has auto update option?', 'cleantalk')
389
  .'</br></br>'
390
  .$button
391
  .'</h3>'
@@ -395,8 +395,8 @@ function apbct_admin__notice_message(){
395
  //Unable to get key automatically (if apbct_admin__init().getAutoKey() returns error)
396
  if ($apbct->notice_show && !empty($apbct->errors['get_key']) && !$apbct->white_label){
397
  echo '<div class="error">
398
- <h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $apbct->api_key).
399
- "<a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=" . urlencode(ct_get_admin_email())."&website=" . urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Get the Access key', 'cleantalk').'</a>
400
  </h3>
401
  </div>';
402
  }
@@ -405,7 +405,7 @@ function apbct_admin__notice_message(){
405
  if (!apbct_api_key__is_correct() && $apbct->moderate_ip == 0){
406
  echo "<div class='error'>"
407
  ."<h3>"
408
- .sprintf(__("Please enter Access Key in %s settings to enable anti spam protection!", 'cleantalk'), "<a href='{$settings_link}'>$apbct->plugin_name</a>")
409
  ."</h3>"
410
  ."</div>";
411
  $apbct->notice_show = false;
@@ -415,7 +415,7 @@ function apbct_admin__notice_message(){
415
  if ($apbct->notice_show && $apbct->notice_trial == 1 && $apbct->moderate_ip == 0 && !$apbct->white_label) {
416
  if(isset($_GET['page']) && in_array($_GET['page'], array('cleantalk', 'ct_check_spam', 'ct_check_users'))){
417
  echo '<div class="error" id="apbct_trial_notice">
418
- <h3>' . sprintf(__("%s trial period ends, please upgrade to %s!", 'cleantalk'),
419
  "<a href='{$settings_link}'>".$apbct->plugin_name."</a>",
420
  "<a href=\"https://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20trial$user_token&cp_mode=antispam\" target=\"_blank\"><b>premium version</b></a>") .
421
  '</h3>
@@ -428,12 +428,12 @@ function apbct_admin__notice_message(){
428
  //Renew notice from apbct_admin_init().api_method__notice_paid_till()
429
  if ($apbct->notice_show && $apbct->notice_renew == 1 && $apbct->moderate_ip == 0 && !$apbct->white_label) {
430
  $renew_link = "<a href=\"https://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%%20backend%%20renew$user_token&cp_mode=antispam\" target=\"_blank\">%s</a>";
431
- $button_html = sprintf($renew_link, '<input type="button" class="button button-primary" value="'.__('RENEW ANTI-SPAM', 'cleantalk').'" />');
432
- $link_html = sprintf($renew_link, "<b>".__('next year', 'cleantalk')."</b>");
433
 
434
  echo '<div class="updated" id="apbct_renew_notice">
435
  <h3>'.
436
- sprintf(__("Please renew your anti-spam license for %s.", 'cleantalk'), $link_html).
437
  '</h3>
438
  <h4 style = "color: gray">Account status updates every 15 minutes.</h4>
439
  '.$button_html.'
@@ -446,7 +446,7 @@ function apbct_admin__notice_message(){
446
  if ($apbct->notice_show && $page_is_ct_settings && !$apbct->data['key_is_ok'] && $apbct->moderate_ip == 0 && !$apbct->white_label){
447
  echo '<div class="error">
448
  <h3><b>'.
449
- __("Wrong <a href='{$settings_link}'><b style=\"color: #49C73B;\">Clean</b><b style=\"color: #349ebf;\">Talk</b> access key</a>! Please check it or ask <a target=\"_blank\" href=\"https://wordpress.org/support/plugin/cleantalk-spam-protect/\">support</a>.", 'cleantalk').
450
  '</b></h3>
451
  </div>';
452
  }
@@ -461,9 +461,9 @@ function apbct_admin__badge__get_premium($print = true, $out = ''){
461
 
462
  if($apbct->license_trial == 1 && $apbct->user_token){
463
  $out .= '<b style="display: inline-block; margin-top: 10px;">'
464
- .($print ? __('Make it right!', 'cleantalk').' ' : '')
465
  .sprintf(
466
- __('%sGet premium%s', 'cleantalk'),
467
  '<a href="https://cleantalk.org/my/bill/recharge?user_token='.$apbct->user_token.'" target="_blank">',
468
  '</a>'
469
  )
@@ -502,27 +502,27 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
502
  //Compile user's counter string
503
  $user_counter=Array('accepted'=>$apbct->data['user_counter']['accepted'], 'blocked'=>$apbct->data['user_counter']['blocked'], 'all'=>$apbct->data['user_counter']['accepted'] + $apbct->data['user_counter']['blocked'], 'since'=>$apbct->data['user_counter']['since']);
504
  //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>';
505
- $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>';
506
 
507
  $all_time_counter_str='';
508
  //Don't compile if all time counter disabled
509
  if($apbct->settings['all_time_counter'] == 1){
510
  $all_time_counter=Array('accepted'=>$apbct->data['all_time_counter']['accepted'], 'blocked'=>$apbct->data['all_time_counter']['blocked'], 'all'=>$apbct->data['all_time_counter']['accepted'] + $apbct->data['all_time_counter']['blocked']);
511
- $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>';
512
  }
513
 
514
  $daily_counter_str='';
515
  //Don't compile if daily counter disabled
516
  if( $apbct->settings['daily_counter'] == 1){
517
  $daily_counter=Array('accepted'=>array_sum($apbct->data['array_accepted']), 'blocked'=>array_sum($apbct->data['array_blocked']), 'all'=>array_sum($apbct->data['array_accepted']) + array_sum($apbct->data['array_blocked']));
518
- //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>';
519
- $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>';
520
  }
521
  $sfw_counter_str='';
522
  //Don't compile if SFW counter disabled
523
  if( $apbct->settings['sfw_counter'] == 1 && $apbct->settings['spam_firewall'] == 1){
524
  $sfw_counter=Array('all'=>$apbct->data['sfw_counter']['all'], 'blocked'=>$apbct->data['sfw_counter']['blocked']);
525
- $sfw_counter_str='<span style="color: white;" title="'.__('All / Blocked events. Access attempts regitred by SpamFireWall counted since the last plugin activation.', 'cleantalk').'"><span style="color: white;"> | SpamFireWall: ' .$sfw_counter['all']. '</span> / <span style="color: red;">' .$sfw_counter['blocked']. '</span></span>';
526
  }
527
 
528
  $args = array(
@@ -532,7 +532,7 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
532
  .'<div class="ab-label" id="ct_stats">'
533
  .($apbct->notice_trial == 1
534
  ? "<span><a style='color: red;' href=\"https://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20trial&user_token={$apbct->user_token}&cp_mode=antispam\" target=\"_blank\">Renew Anti-Spam</a></span>"
535
- : '<span style="color: white;" title="'.__('Allowed / Blocked submissions. The number of submissions is being counted since ', 'cleantalk').' '.$user_counter['since'].'">'.$user_counter_str.'</span> '.$daily_counter_str.$all_time_counter_str.$sfw_counter_str
536
  )
537
  .'</div>'
538
  .'</div>' //You could change widget string here by simply deleting variables
@@ -543,14 +543,14 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
543
  if(!$apbct->white_label){
544
  $wp_admin_bar->add_node( array(
545
  'id' => 'ct_dashboard_link',
546
- 'title' => '<a href="https://cleantalk.org/my/?user_token='.$apbct->user_token.'&utm_source=wp-backend&utm_medium=admin-bar&cp_mode=antispam " target="_blank">CleanTalk '.__('dashboard', 'cleantalk').'</a>',
547
  'parent' => 'ct_parent_node'
548
  ));
549
  }
550
 
551
  $wp_admin_bar->add_node( array(
552
  'id' => 'ct_settings_link',
553
- 'title' => '<a href="'.$apbct->settings_link.'">'.__('Settings', 'cleantalk').'</a>',
554
  'parent' => 'ct_parent_node'
555
  ));
556
 
@@ -558,7 +558,7 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
558
  if(!is_network_admin()){
559
  $args = array(
560
  'id' => 'ct_settings_bulk_comments',
561
- 'title' => '<hr style="margin-top: 7px;" /><a href="edit-comments.php?page=ct_check_spam" title="'.__('Bulk spam comments removal tool.', 'cleantalk').'">'.__('Check comments for spam', 'cleantalk').'</a>',
562
  'parent' => 'ct_parent_node'
563
  );
564
  }
@@ -568,7 +568,7 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
568
  if(!is_network_admin()){
569
  $args = array(
570
  'id' => 'ct_settings_bulk_users',
571
- 'title' => '<a href="users.php?page=ct_check_users" title="Bulk spam users removal tool.">'.__('Check users for spam', 'cleantalk').'</a>',
572
  'parent' => 'ct_parent_node'
573
  );
574
  }
@@ -577,7 +577,7 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
577
  // User counter reset.
578
  $args = array(
579
  'id' => 'ct_reset_counter',
580
- 'title' => '<hr style="margin-top: 7px;"><a href="?ct_reset_user_counter=1" title="Reset your personal counter of submissions.">'.__('Reset first counter', 'cleantalk').'</a>',
581
  'parent' => 'ct_parent_node'
582
  );
583
  $wp_admin_bar->add_node( $args );// add a child item to our parent item. Counter reset.
@@ -585,7 +585,7 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
585
  // Reset ALL counter
586
  $args = array(
587
  'id' => 'ct_reset_counters_all',
588
- 'title' => '<a href="?ct_reset_all_counters=1" title="Reset all counters.">'.__('Reset all counters', 'cleantalk').'</a>',
589
  'parent' => 'ct_parent_node'
590
  );
591
  $wp_admin_bar->add_node( $args );
@@ -594,7 +594,7 @@ function apbct_admin__admin_bar__add( $wp_admin_bar ) {
594
  if(!$apbct->white_label){
595
  $wp_admin_bar->add_node( array(
596
  'id' => 'ct_admin_bar_support_link',
597
- 'title' => '<hr style="margin-top: 7px;" /><a target="_blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">'.__('Support', 'cleantalk').'</a>',
598
  'parent' => 'ct_parent_node'
599
  ));
600
  }
32
  echo '
33
  <a href="' . $button_url__check . '" class="button" style="margin:1px 0 0 0; display: inline-block;">
34
  <img src="' . $apbct->logo__small__colored . '" alt="Cleantalk Antispam logo" height="" style="width: 17px; vertical-align: text-bottom;" />
35
+ ' . sprintf(__( 'Find spam %s', 'cleantalk-spam-protect'), $button_description ) . '
36
  </a>
37
  <a href="' . $button_url__results . '" class="button" style="margin:1px 0 0 0; display: inline-block;">
38
  <img src="' . $apbct->logo__small__colored . '" alt="Cleantalk Antispam logo" height="" style="width: 17px; vertical-align: text-bottom;" />
39
+ ' . sprintf(__( 'View spam %s', 'cleantalk-spam-protect'), $button_description ) . '
40
  </a>
41
  <a href="https://cleantalk.org/my/show_requests?service_id=' . $apbct->data['service_id'] . '&int=week" target="_blank" class="button" style="margin:1px 0 0 0; display: inline-block;">
42
  <img src="' . $apbct->logo__small__colored . '" alt="Cleantalk Antispam logo" height="" style="width: 17px; vertical-align: text-bottom;" />
43
+ ' . __( 'CleanTalk Anti-Spam Log', 'cleantalk-spam-protect') . '
44
  </a>
45
  ';
46
 
59
  $apbct->plugin_name
60
  ."<div class='ct_widget_top_links'>"
61
  ."<img src='".plugins_url('/cleantalk-spam-protect/inc/images/preloader.gif')."' class='ct_preloader'>"
62
+ .sprintf(__("%sRefresh%s", 'cleantalk-spam-protect'), "<a href='#ct_widget' class='ct_widget_refresh_link'>", "</a>")
63
+ .sprintf(__("%sConfigure%s", 'cleantalk-spam-protect'), "<a href='{$apbct->settings_link}' class='ct_widget_settings_link'>", "</a>")
64
  ."</div>",
65
  'ct_dashboard_statistics_widget_output'
66
  );
77
  <form id='ct_refresh_form' method='POST' action='#ct_widget'>
78
  <input type='hidden' name='ct_brief_refresh' value='1'>
79
  </form>
80
+ <h4 class='ct_widget_block_header' style='margin-left: 12px;'><?php _e('7 days anti-spam stats', 'cleantalk-spam-protect'); ?></h4>
81
  <div class='ct_widget_block ct_widget_chart_wrapper'>
82
  <div id='ct_widget_chart'></div>
83
  </div>
84
+ <h4 class='ct_widget_block_header'><?php _e('Top 5 spam IPs blocked', 'cleantalk-spam-protect'); ?></h4>
85
  <hr class='ct_widget_hr'>
86
  <?php
87
  if(!apbct_api_key__is_correct() || (isset($apbct->data['brief_data']['error_no']) && $apbct->data['brief_data']['error_no'] == 6)){
88
  ?> <div class='ct_widget_block'>
89
  <form action='<? echo $apbct->settings_link; ?>' method='POST'>
90
+ <h2 class='ct_widget_activate_header'><?php _e('Get Access key to activate Anti-Spam protection!', 'cleantalk-spam-protect'); ?></h2>
91
  <input class='ct_widget_button ct_widget_activate_button' type='submit' name='get_apikey_auto' value='ACTIVATE' />
92
  </form>
93
  </div>
95
  }elseif(!empty($apbct->data['brief_data']['error'])){
96
  echo '<div class="ct_widget_block">'
97
  .'<h2 class="ct_widget_activate_header">'
98
+ .sprintf(__('Something went wrong! Error: "%s".', 'cleantalk-spam-protect'), "<u>{$apbct->brief_data['error']}</u>")
99
  .'</h2>';
100
  if($apbct->user_token && !$apbct->white_label){
101
  echo '<h2 class="ct_widget_activate_header">'
102
+ .__('Please, visit your dashboard.', 'cleantalk-spam-protect')
103
  .'</h2>'
104
  .'<a target="_blank" href="https://cleantalk.org/my?user_token='.$apbct->user_token.'&cp_mode=antispam">'
105
  .'<input class="ct_widget_button ct_widget_activate_button ct_widget_resolve_button" type="button" value="VISIT CONTROL PANEL">'
113
  <div class='ct_widget_block'>
114
  <table cellspacing="0">
115
  <tr>
116
+ <th><?php _e('IP', 'cleantalk-spam-protect'); ?></th>
117
+ <th><?php _e('Country', 'cleantalk-spam-protect'); ?></th>
118
+ <th><?php _e('Block Count', 'cleantalk-spam-protect'); ?></th>
119
  </tr>
120
  <?php foreach($apbct->brief_data['top5_spam_ip'] as $val){ ?>
121
  <tr>
143
  if($apbct->spam_count && $apbct->spam_count > 0){
144
  echo '<div class="ct_widget_wprapper_total_blocked">'
145
  .'<img src="'.$apbct->logo__small__colored.'" class="ct_widget_small_logo"/>'
146
+ .'<span title="'.sprintf(__('This is the count from the %s\'s cloud and could be different to admin bar counters', 'cleantalk-spam-protect').'">', $apbct->plugin_name)
147
  .sprintf(
148
  /* translators: %s: Number of spam messages */
149
+ __( '%s%s%s has blocked %s spam for all time. The statistics are automatically updated every 24 hours.', 'cleantalk-spam-protect'),
150
  !$apbct->white_label ? '<a href="https://cleantalk.org/my/?user_token='.$apbct->user_token.'&utm_source=wp-backend&utm_medium=dashboard_widget&cp_mode=antispam" target="_blank">' : '',
151
  $apbct->plugin_name,
152
  !$apbct->white_label ? '</a>' : '',
157
  ? '<br><br>'
158
  .'<b style="font-size: 16px;">'
159
  .sprintf(
160
+ __('Do you like CleanTalk? %sPost your feedback here%s.', 'cleantalk-spam-protect'),
161
  '<u><a href="https://wordpress.org/support/plugin/cleantalk-spam-protect/reviews/#new-post" target="_blank">',
162
  '</a></u>'
163
  )
239
  $links[] = '<a class="ct_meta_links ct_translate_links" href="'
240
  .sprintf('https://translate.wordpress.org/locale/%s/default/wp-plugins/cleantalk-spam-protect', substr(get_locale(), 0, 2))
241
  .'" target="_blank">'
242
+ .__('Translate', 'cleantalk-spam-protect')
243
  .'</a>';
244
 
245
+ $links[] = '<a class="ct_meta_links" href="'.$apbct->settings_link.'" target="_blank">' . __( 'Start here','cleantalk-spam-protect') . '</a>';
246
+ $links[] = '<a class="ct_meta_links ct_faq_links" href="https://wordpress.org/plugins/cleantalk-spam-protect/faq/" target="_blank">' . __( 'FAQ','cleantalk-spam-protect') . '</a>';
247
+ $links[] = '<a class="ct_meta_links ct_support_links"href="https://wordpress.org/support/plugin/cleantalk-spam-protect" target="_blank">' . __( 'Support','cleantalk-spam-protect') . '</a>';
248
  $trial = apbct_admin__badge__get_premium(false);
249
  if(!empty($trial))
250
  $links[] = apbct_admin__badge__get_premium(false);
317
  wp_enqueue_style ('ct_icons', plugins_url('/cleantalk-spam-protect/css/cleantalk-icons.min.css'), array(), APBCT_VERSION, 'all');
318
 
319
  wp_localize_script( 'jquery', 'ctSettingsPage', array(
320
+ 'ct_subtitle' => $apbct->ip_license ? __('Hosting AntiSpam', 'cleantalk-spam-protect') : '',
321
  'ip_license' => $apbct->ip_license ? true : false,
322
  ));
323
  }
327
  wp_enqueue_script('ct_comments_editscreen', plugins_url('/cleantalk-spam-protect/js/cleantalk-comments-editscreen.min.js'), array(), APBCT_VERSION);
328
  wp_localize_script( 'jquery', 'ctCommentsScreen', array(
329
  'ct_ajax_nonce' => wp_create_nonce('ct_secret_nonce'),
330
+ 'spambutton_text' => __("Find spam comments", 'cleantalk-spam-protect'),
331
+ 'ct_feedback_msg_whitelisted' => __("The sender has been whitelisted.", 'cleantalk-spam-protect'),
332
+ 'ct_feedback_msg_blacklisted' => __("The sender has been blacklisted.", 'cleantalk-spam-protect'),
333
+ 'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk-spam-protect'), $apbct->user_token ? "<a target='_blank' href=https://cleantalk.org/my?user_token={$apbct->user_token}&cp_mode=antispam>" : '', $apbct->user_token ? "</a>" : ''),
334
  'ct_show_check_links' => (bool)$apbct->settings['show_check_links'],
335
  'ct_img_src_new_tab' => plugin_dir_url(__FILE__)."images/new_window.gif",
336
  ));
341
  wp_enqueue_style ('ct_icons', plugins_url('/cleantalk-spam-protect/css/cleantalk-icons.min.css'), array(), APBCT_VERSION, 'all');
342
  wp_enqueue_script('ct_users_editscreen', plugins_url('/cleantalk-spam-protect/js/cleantalk-users-editscreen.min.js'), array(), APBCT_VERSION);
343
  wp_localize_script( 'jquery', 'ctUsersScreen', array(
344
+ 'spambutton_text' => __("Find spam-users", 'cleantalk-spam-protect'),
345
  'ct_show_check_links' => (bool)$apbct->settings['show_check_links'],
346
  'ct_img_src_new_tab' => plugin_dir_url(__FILE__)."images/new_window.gif"
347
  ));
382
  /* Disabled at 09.09.2018
383
  if($apbct->notice_auto_update == 1 && $apbct->auto_update != -1 && empty($_COOKIE['apbct_update_banner_closed'])){
384
  $link = '<a href="https://cleantalk.org/help/cleantalk-auto-update" target="_blank">%s</a>';
385
+ $button = sprintf($link, '<input type="button" class="button button-primary" value="'.__('Learn more', 'cleantalk-spam-protect').'" />');
386
  echo '<div class="error notice is-dismissible apbct_update_notice">'
387
  .'<h3>'
388
+ .__('Do you know that Anti-Spam by CleanTalk has auto update option?', 'cleantalk-spam-protect')
389
  .'</br></br>'
390
  .$button
391
  .'</h3>'
395
  //Unable to get key automatically (if apbct_admin__init().getAutoKey() returns error)
396
  if ($apbct->notice_show && !empty($apbct->errors['get_key']) && !$apbct->white_label){
397
  echo '<div class="error">
398
+ <h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk-spam-protect'), $apbct->api_key).
399
+ "<a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=" . urlencode(ct_get_admin_email())."&website=" . urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Get the Access key', 'cleantalk-spam-protect').'</a>
400
  </h3>
401
  </div>';
402
  }
405
  if (!apbct_api_key__is_correct() && $apbct->moderate_ip == 0){
406
  echo "<div class='error'>"
407
  ."<h3>"
408
+ .sprintf(__("Please enter Access Key in %s settings to enable anti spam protection!", 'cleantalk-spam-protect'), "<a href='{$settings_link}'>$apbct->plugin_name</a>")
409
  ."</h3>"
410
  ."</div>";
411
  $apbct->notice_show = false;
415
  if ($apbct->notice_show && $apbct->notice_trial == 1 && $apbct->moderate_ip == 0 && !$apbct->white_label) {
416
  if(isset($_GET['page']) && in_array($_GET['page'], array('cleantalk', 'ct_check_spam', 'ct_check_users'))){
417
  echo '<div class="error" id="apbct_trial_notice">
418
+ <h3>' . sprintf(__("%s trial period ends, please upgrade to %s!", 'cleantalk-spam-protect'),
419
  "<a href='{$settings_link}'>".$apbct->plugin_name."</a>",
420
  "<a href=\"https://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20trial$user_token&cp_mode=antispam\" target=\"_blank\"><b>premium version</b></a>") .
421
  '</h3>
428
  //Renew notice from apbct_admin_init().api_method__notice_paid_till()
429
  if ($apbct->notice_show && $apbct->notice_renew == 1 && $apbct->moderate_ip == 0 && !$apbct->white_label) {
430
  $renew_link = "<a href=\"https://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%%20backend%%20renew$user_token&cp_mode=antispam\" target=\"_blank\">%s</a>";
431
+ $button_html = sprintf($renew_link, '<input type="button" class="button button-primary" value="'.__('RENEW ANTI-SPAM', 'cleantalk-spam-protect').'" />');
432
+ $link_html = sprintf($renew_link, "<b>".__('next year', 'cleantalk-spam-protect')."</b>");
433
 
434
  echo '<div class="updated" id="apbct_renew_notice">
435
  <h3>'.
436
+ sprintf(__("Please renew your anti-spam license for %s.", 'cleantalk-spam-protect'), $link_html).
437
  '</h3>
438
  <h4 style = "color: gray">Account status updates every 15 minutes.</h4>
439
  '.$button_html.'
446
  if ($apbct->notice_show && $page_is_ct_settings && !$apbct->data['key_is_ok'] && $apbct->moderate_ip == 0 && !$apbct->white_label){
447
  echo '<div class="error">
448
  <h3><b>'.
449
+ __("Wrong <a href='{$settings_link}'><b style=\"color: #49C73B;\">Clean</b><b style=\"color: #349ebf;\">Talk</b> access key</a>! Please check it or ask <a target=\"_blank\" href=\"https://wordpress.org/support/plugin/cleantalk-spam-protect/\">support</a>.", 'cleantalk-spam-protect').
450
  '</b></h3>
451
  </div>';
452
  }
461
 
462
  if($apbct->license_trial == 1 && $apbct->user_token){
463
  $out .= '<b style="display: inline-block; margin-top: 10px;">'
464
+ .($print ? __('Make it right!', 'cleantalk-spam-protect').' ' : '')
465
  .sprintf(
466
+ __('%sGet premium%s', 'cleantalk-spam-protect'),
467
  '<a href="https://cleantalk.org/my/bill/recharge?user_token='.$apbct->user_token.'" target="_blank">',
468
  '</a>'
469
  )
502
  //Compile user's counter string
503
  $user_counter=Array('accepted'=>$apbct->data['user_counter']['accepted'], 'blocked'=>$apbct->data['user_counter']['blocked'], 'all'=>$apbct->data['user_counter']['accepted'] + $apbct->data['user_counter']['blocked'], 'since'=>$apbct->data['user_counter']['since']);
504
  //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>';
505
+ $user_counter_str='<span style="color: white;">' . __('Since', 'cleantalk-spam-protect') . '&nbsp;' . $user_counter['since'].': </span><span style="color: green;">' .$user_counter['accepted']. '</span> / <span style="color: red;">' .$user_counter['blocked']. '</span>';
506
 
507
  $all_time_counter_str='';
508
  //Don't compile if all time counter disabled
509
  if($apbct->settings['all_time_counter'] == 1){
510
  $all_time_counter=Array('accepted'=>$apbct->data['all_time_counter']['accepted'], 'blocked'=>$apbct->data['all_time_counter']['blocked'], 'all'=>$apbct->data['all_time_counter']['accepted'] + $apbct->data['all_time_counter']['blocked']);
511
+ $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-spam-protect').'"><span style="color: white;"> | ' . __('All', 'cleantalk-spam-protect') . ': ' .$all_time_counter['all']. '</span> / <span style="color: green;">' .$all_time_counter['accepted']. '</span> / <span style="color: red;">' .$all_time_counter['blocked']. '</span></span>';
512
  }
513
 
514
  $daily_counter_str='';
515
  //Don't compile if daily counter disabled
516
  if( $apbct->settings['daily_counter'] == 1){
517
  $daily_counter=Array('accepted'=>array_sum($apbct->data['array_accepted']), 'blocked'=>array_sum($apbct->data['array_blocked']), 'all'=>array_sum($apbct->data['array_accepted']) + array_sum($apbct->data['array_blocked']));
518
+ //Previous version $daily_counter_str='<span style="color: white;" title="'.__('All / Allowed / Blocked submissions. The number of submissions for past 24 hours. ', 'cleantalk-spam-protect').'"><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>';
519
+ $daily_counter_str='<span style="color: white;" title="'.__('Allowed / Blocked submissions. The number of submissions for past 24 hours. ', 'cleantalk-spam-protect').'"><span style="color: white;"> | ' . __('Day', 'cleantalk-spam-protect') . ': </span><span style="color: green;">' .$daily_counter['accepted']. '</span> / <span style="color: red;">' .$daily_counter['blocked']. '</span></span>';
520
  }
521
  $sfw_counter_str='';
522
  //Don't compile if SFW counter disabled
523
  if( $apbct->settings['sfw_counter'] == 1 && $apbct->settings['spam_firewall'] == 1){
524
  $sfw_counter=Array('all'=>$apbct->data['sfw_counter']['all'], 'blocked'=>$apbct->data['sfw_counter']['blocked']);
525
+ $sfw_counter_str='<span style="color: white;" title="'.__('All / Blocked events. Access attempts regitred by SpamFireWall counted since the last plugin activation.', 'cleantalk-spam-protect').'"><span style="color: white;"> | SpamFireWall: ' .$sfw_counter['all']. '</span> / <span style="color: red;">' .$sfw_counter['blocked']. '</span></span>';
526
  }
527
 
528
  $args = array(
532
  .'<div class="ab-label" id="ct_stats">'
533
  .($apbct->notice_trial == 1
534
  ? "<span><a style='color: red;' href=\"https://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20trial&user_token={$apbct->user_token}&cp_mode=antispam\" target=\"_blank\">Renew Anti-Spam</a></span>"
535
+ : '<span style="color: white;" title="'.__('Allowed / Blocked submissions. The number of submissions is being counted since ', 'cleantalk-spam-protect').' '.$user_counter['since'].'">'.$user_counter_str.'</span> '.$daily_counter_str.$all_time_counter_str.$sfw_counter_str
536
  )
537
  .'</div>'
538
  .'</div>' //You could change widget string here by simply deleting variables
543
  if(!$apbct->white_label){
544
  $wp_admin_bar->add_node( array(
545
  'id' => 'ct_dashboard_link',
546
+ 'title' => '<a href="https://cleantalk.org/my/?user_token='.$apbct->user_token.'&utm_source=wp-backend&utm_medium=admin-bar&cp_mode=antispam " target="_blank">CleanTalk '.__('dashboard', 'cleantalk-spam-protect').'</a>',
547
  'parent' => 'ct_parent_node'
548
  ));
549
  }
550
 
551
  $wp_admin_bar->add_node( array(
552
  'id' => 'ct_settings_link',
553
+ 'title' => '<a href="'.$apbct->settings_link.'">'.__('Settings', 'cleantalk-spam-protect').'</a>',
554
  'parent' => 'ct_parent_node'
555
  ));
556
 
558
  if(!is_network_admin()){
559
  $args = array(
560
  'id' => 'ct_settings_bulk_comments',
561
+ 'title' => '<hr style="margin-top: 7px;" /><a href="edit-comments.php?page=ct_check_spam" title="'.__('Bulk spam comments removal tool.', 'cleantalk-spam-protect').'">'.__('Check comments for spam', 'cleantalk-spam-protect').'</a>',
562
  'parent' => 'ct_parent_node'
563
  );
564
  }
568
  if(!is_network_admin()){
569
  $args = array(
570
  'id' => 'ct_settings_bulk_users',
571
+ 'title' => '<a href="users.php?page=ct_check_users" title="Bulk spam users removal tool.">'.__('Check users for spam', 'cleantalk-spam-protect').'</a>',
572
  'parent' => 'ct_parent_node'
573
  );
574
  }
577
  // User counter reset.
578
  $args = array(
579
  'id' => 'ct_reset_counter',
580
+ 'title' => '<hr style="margin-top: 7px;"><a href="?ct_reset_user_counter=1" title="Reset your personal counter of submissions.">'.__('Reset first counter', 'cleantalk-spam-protect').'</a>',
581
  'parent' => 'ct_parent_node'
582
  );
583
  $wp_admin_bar->add_node( $args );// add a child item to our parent item. Counter reset.
585
  // Reset ALL counter
586
  $args = array(
587
  'id' => 'ct_reset_counters_all',
588
+ 'title' => '<a href="?ct_reset_all_counters=1" title="Reset all counters.">'.__('Reset all counters', 'cleantalk-spam-protect').'</a>',
589
  'parent' => 'ct_parent_node'
590
  );
591
  $wp_admin_bar->add_node( $args );
594
  if(!$apbct->white_label){
595
  $wp_admin_bar->add_node( array(
596
  'id' => 'ct_admin_bar_support_link',
597
+ 'title' => '<hr style="margin-top: 7px;" /><a target="_blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">'.__('Support', 'cleantalk-spam-protect').'</a>',
598
  'parent' => 'ct_parent_node'
599
  ));
600
  }
inc/cleantalk-autoloader.php CHANGED
@@ -10,7 +10,7 @@
10
  function apbct_autoloader( $class ){
11
  // Register class auto loader
12
  // Custom modules
13
- if( strpos( $class, 'Cleantalk' ) !== false && ! class_exists( '\\' . $class )) {
14
  $class_file = CLEANTALK_PLUGIN_DIR . 'lib' . DIRECTORY_SEPARATOR . $class . '.php';
15
  if( file_exists( $class_file ) ){
16
  require_once( $class_file );
10
  function apbct_autoloader( $class ){
11
  // Register class auto loader
12
  // Custom modules
13
+ if( strpos( $class, 'cleantalk-spam-protect') !== false && ! class_exists( '\\' . $class )) {
14
  $class_file = CLEANTALK_PLUGIN_DIR . 'lib' . DIRECTORY_SEPARATOR . $class . '.php';
15
  if( file_exists( $class_file ) ){
16
  require_once( $class_file );
inc/cleantalk-common.php CHANGED
@@ -63,7 +63,7 @@ $admin_email = NULL;
63
  */
64
  function apbct_plugin_loaded() {
65
  $dir=plugin_basename( dirname( __FILE__ ) ) . '/../i18n';
66
- $loaded=load_plugin_textdomain('cleantalk', false, $dir);
67
  }
68
 
69
  /**
63
  */
64
  function apbct_plugin_loaded() {
65
  $dir=plugin_basename( dirname( __FILE__ ) ) . '/../i18n';
66
+ $loaded=load_plugin_textdomain('cleantalk-spam-protect', false, $dir);
67
  }
68
 
69
  /**
inc/cleantalk-find-spam.php CHANGED
@@ -10,14 +10,14 @@ add_action( 'admin_menu', 'ct_add_find_spam_pages' );
10
  function ct_add_find_spam_pages(){
11
 
12
  // Check users pages
13
- $ct_check_users = add_users_page( __( "Check for spam", 'cleantalk' ), __( "Find spam users", 'cleantalk' ), 'activate_plugins', 'ct_check_users', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
14
- $ct_check_users_total = add_users_page( __( "Previous scan results", 'cleantalk' ), '', 'activate_plugins', 'ct_check_users_total', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
15
- $ct_check_users_logs = add_users_page( __( "Scan logs", 'cleantalk' ), '', 'activate_plugins', 'ct_check_users_logs', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
16
 
17
  // Cheack comments pages
18
- $ct_check_spam = add_comments_page( __( "Check for spam", 'cleantalk' ), __( "Find spam comments", 'cleantalk' ), 'activate_plugins', 'ct_check_spam', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
19
- $ct_check_spam_total = add_comments_page( __( "Previous scan results", 'cleantalk' ), '', 'activate_plugins', 'ct_check_spam_total', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
20
- $ct_check_spam_logs = add_comments_page( __( "Scan logs", 'cleantalk' ), '', 'activate_plugins', 'ct_check_spam_logs', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
21
 
22
  // Remove some pages from main menu
23
  remove_submenu_page( 'users.php', 'ct_check_users_total' );
10
  function ct_add_find_spam_pages(){
11
 
12
  // Check users pages
13
+ $ct_check_users = add_users_page( __( "Check for spam", 'cleantalk-spam-protect'), __( "Find spam users", 'cleantalk-spam-protect'), 'activate_plugins', 'ct_check_users', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
14
+ $ct_check_users_total = add_users_page( __( "Previous scan results", 'cleantalk-spam-protect'), '', 'activate_plugins', 'ct_check_users_total', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
15
+ $ct_check_users_logs = add_users_page( __( "Scan logs", 'cleantalk-spam-protect'), '', 'activate_plugins', 'ct_check_users_logs', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
16
 
17
  // Cheack comments pages
18
+ $ct_check_spam = add_comments_page( __( "Check for spam", 'cleantalk-spam-protect'), __( "Find spam comments", 'cleantalk-spam-protect'), 'activate_plugins', 'ct_check_spam', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
19
+ $ct_check_spam_total = add_comments_page( __( "Previous scan results", 'cleantalk-spam-protect'), '', 'activate_plugins', 'ct_check_spam_total', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
20
+ $ct_check_spam_logs = add_comments_page( __( "Scan logs", 'cleantalk-spam-protect'), '', 'activate_plugins', 'ct_check_spam_logs', array( 'ClassCleantalkFindSpamPage', 'showFindSpamPage' ) );
21
 
22
  // Remove some pages from main menu
23
  remove_submenu_page( 'users.php', 'ct_check_users_total' );
inc/cleantalk-public.php CHANGED
@@ -550,7 +550,7 @@ function ct_woocommerce_wishlist_check($args){
550
  $ct_result = $base_call_result['ct_result'];
551
 
552
  if ($ct_result->allow == 0)
553
- wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
554
  else
555
  return $args;
556
  }
@@ -708,7 +708,7 @@ function apbct_integration__buddyPres__private_msg_check( $bp_message_obj){
708
  $ct_result = $base_call_result['ct_result'];
709
 
710
  if ($ct_result->allow == 0)
711
- wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
712
  }
713
 
714
  /**
@@ -876,7 +876,7 @@ function apbct_form__piratesForm__testSpam(){
876
  $ct_result = $base_call_result['ct_result'];
877
 
878
  if ($ct_result->allow == 0)
879
- wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
880
  }
881
 
882
  /**
@@ -1383,7 +1383,7 @@ function ct_preprocess_comment($comment) {
1383
  $ct_comment = $ct_result->comment;
1384
  $ct_stop_words = $ct_result->stop_words;
1385
 
1386
- $err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk') . "</center><br><br>\n" . $ct_result->comment;
1387
  $err_text .= '<script>setTimeout("history.back()", 5000);</script>';
1388
 
1389
  // Terminate. Definitely spam.
@@ -1481,8 +1481,8 @@ function apbct_comment__Wordpress__changeMailNotification($notify_message, $comm
1481
 
1482
  $notify_message =
1483
  PHP_EOL
1484
- .__('CleanTalk AntiSpam: This message is possible spam.', 'cleantalk')
1485
- ."\n".__('You could check it in CleanTalk\'s anti-spam database:', 'cleantalk')
1486
  ."\n".'IP: https://cleantalk.org/blacklists/' . $apbct->sender_ip
1487
  ."\n".'Email: https://cleantalk.org/blacklists/' . $apbct->sender_email
1488
  ."\n".PHP_EOL . sprintf(
@@ -1512,7 +1512,7 @@ function apbct_comment__wordpress__show_blacklists( $notify_message, $comment_id
1512
  $black_list_link = 'https://cleantalk.org/blacklists/';
1513
 
1514
  $links = PHP_EOL;
1515
- $links .= esc_html__( 'Check for spam:', 'cleantalk' );
1516
  $links .= PHP_EOL;
1517
  $links .= $black_list_link . $comment_details->comment_author_email;
1518
  $links .= PHP_EOL;
@@ -1532,14 +1532,14 @@ function apbct_comment__wordpress__show_blacklists( $notify_message, $comment_id
1532
  /**
1533
  * Set die page with Cleantalk comment.
1534
  * @global array $ct_comment
1535
- $err_text = '<center><b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ' . __('Spam protection', 'cleantalk') . "</center><br><br>\n" . $ct_comment;
1536
  * @param type $comment_status
1537
  */
1538
  function ct_die($comment_id, $comment_status) {
1539
 
1540
  global $ct_comment;
1541
 
1542
- $err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk') . "</center><br><br>\n" . $ct_comment;
1543
  $err_text .= '<script>setTimeout("history.back()", 5000);</script>';
1544
  if(isset($_POST['et_pb_contact_email']))
1545
  {
@@ -1558,7 +1558,7 @@ function ct_die($comment_id, $comment_status) {
1558
  */
1559
  function ct_die_extended($comment_body) {
1560
 
1561
- $err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk') . "</center><br><br>\n" . $comment_body;
1562
  $err_text .= '<script>setTimeout("history.back()", 5000);</script>';
1563
  wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' => true));
1564
  }
@@ -1755,7 +1755,7 @@ function ct_login_message($message) {
1755
  if( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ){
1756
  if (isset($_COOKIE[$apbct_cookie_register_ok_label])){
1757
  if(is_wp_error($errors)){
1758
- $errors->add('ct_message',sprintf(__('Registration approved by %s.', 'cleantalk'), '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk</b>'), 'message');
1759
  }
1760
  }
1761
  }
@@ -2039,8 +2039,8 @@ function apbct_registration__Wordpress__changeMailNotification($wp_new_user_noti
2039
  global $apbct;
2040
 
2041
  $wp_new_user_notification_email_admin['message'] = PHP_EOL
2042
- .__('CleanTalk AntiSpam: This registration is spam.', 'cleantalk')
2043
- ."\n" . __('CleanTalk\'s anti-spam database:', 'cleantalk')
2044
  ."\n" . 'IP: ' . $apbct->sender_ip
2045
  ."\n" . 'Email: ' . $apbct->sender_email
2046
  .PHP_EOL . PHP_EOL .
@@ -2417,8 +2417,8 @@ function apbct_form__contactForm7__changeMailNotification($component){
2417
  global $apbct;
2418
 
2419
  $component['body'] =
2420
- __('CleanTalk AntiSpam: This message is spam.', 'cleantalk')
2421
- .PHP_EOL . __('CleanTalk\'s anti-spam database:', 'cleantalk')
2422
  .PHP_EOL . 'IP: ' . $apbct->sender_ip
2423
  .PHP_EOL . 'Email: ' . $apbct->sender_email
2424
  .PHP_EOL . sprintf(
@@ -2575,7 +2575,7 @@ function apbct_form__seedprod_coming_soon__testSpam() {
2575
 
2576
  $response = array(
2577
  'status' => 200,
2578
- 'html' => "<h1>".__('Spam protection by CleanTalk', 'cleantalk')."</h1><h2>".$ct_result->comment."</h2>"
2579
  );
2580
 
2581
  echo sanitize_text_field($_GET['callback']) . '(' . json_encode($response) . ')';
@@ -2598,8 +2598,8 @@ function apbct_form__ninjaForms__changeMailNotification($message, $data, $action
2598
 
2599
  $message .= wpautop(PHP_EOL . '---'
2600
  .PHP_EOL
2601
- .__('CleanTalk AntiSpam: This message is spam.', 'cleantalk')
2602
- .PHP_EOL . __('CleanTalk\'s anti-spam database:', 'cleantalk')
2603
  .PHP_EOL . 'IP: ' . $apbct->sender_ip
2604
  .PHP_EOL . 'Email: ' . $apbct->sender_email
2605
  .PHP_EOL .
@@ -2754,8 +2754,8 @@ function apbct_form__WPForms__changeMailNotification($message, $wpforms_email){
2754
  $message = str_replace('</body>', '', $message);
2755
  $message .= wpautop(PHP_EOL . '---'
2756
  .PHP_EOL
2757
- .__('CleanTalk AntiSpam: This message is spam.', 'cleantalk')
2758
- .PHP_EOL . __('CleanTalk\'s anti-spam database:', 'cleantalk')
2759
  .PHP_EOL . 'IP: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_ip . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_ip . '</a>'
2760
  .PHP_EOL . 'Email: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_email . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_email . '</a>'
2761
  .PHP_EOL . sprintf(
@@ -2885,7 +2885,7 @@ function ct_comment_text($comment_text) {
2885
  $ct_hash = get_comment_meta($comment->comment_ID, 'ct_hash', true);
2886
 
2887
  if ($ct_hash !== '' && $_COOKIE[$ct_approved_request_id_label] == $ct_hash) {
2888
- $comment_text .= '<br /><br /> <em class="comment-awaiting-moderation">' . __('Comment approved. Anti-spam by CleanTalk.', 'cleantalk') . '</em>';
2889
  }
2890
  }
2891
 
@@ -3321,7 +3321,8 @@ function ct_contact_form_validate() {
3321
  apbct_is_in_uri('login-1') || //Skip login form
3322
  apbct_is_in_uri('recuperacao-de-senha-2') || //Skip form reset password
3323
  apbct_is_in_uri('membermouse/api/request.php') && isset($_POST['membership_level_id'],$_POST['apikey'],$_POST['apisecret']) || // Membermouse API
3324
- ( isset( $_POST['AppKey'] ) && ( isset( $_POST['cbAP'] ) && $_POST['cbAP'] == 'Caspio' ) ) // Caspio exclusion (ticket #16444)
 
3325
  ) {
3326
  do_action( 'apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST );
3327
  return null;
@@ -3438,7 +3439,7 @@ function ct_contact_form_validate() {
3438
  return $ct_result->comment;
3439
 
3440
  }elseif(isset($_POST['vfb-submit']) && defined('VFB_VERSION')){
3441
- wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
3442
  // Caldera Contact Forms
3443
  }elseif(isset($_POST['action']) && $_POST['action'] == 'cf_process_ajax_submit'){
3444
  print json_encode("<h3 style='color: red;'><red>".$ct_result->comment);
@@ -3616,10 +3617,10 @@ function ct_send_error_notice ($comment = '') {
3616
  update_option('cleantalk_timelabel_reg', time());
3617
 
3618
  $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
3619
- $message = __('Attention, please!', 'cleantalk') . "\r\n\r\n";
3620
- $message .= sprintf(__('"%s" plugin error on your site "%s":', 'cleantalk'), $apbct->plugin_name, $blogname) . "\r\n\r\n";
3621
  $message .= preg_replace('/^(.*?)<a.*?"(.*?)".*?>(.*?)<.a>(.*)$/', '$1. $3: $2?user_token='. $apbct->user_token .' $4', $comment) . "\r\n\r\n";
3622
- @wp_mail(ct_get_admin_email(), sprintf(__('[%s] "%s" error!', 'cleantalk'), $apbct->plugin_name, $blogname), $message);
3623
  }
3624
 
3625
  return null;
@@ -3676,7 +3677,7 @@ function ct_enqueue_scripts_public($hook){
3676
 
3677
  wp_localize_script('ct_public_gdpr', 'ctPublicGDPR', array(
3678
  'gdpr_forms' => array(),
3679
- 'gdpr_text' => $apbct->settings['gdpr_text'] ? $apbct->settings['gdpr_text'] : __('By using this form you agree with the storage and processing of your data by using the Privacy Policy on this website.', 'cleantalk'),
3680
  ));
3681
  }
3682
 
@@ -3724,9 +3725,9 @@ function ct_enqueue_scripts_public($hook){
3724
  wp_localize_script('ct_public_admin_js', 'ctPublicAdmin', array(
3725
  'ct_ajax_nonce' => $ajax_nonce,
3726
  'ajaxurl' => admin_url('admin-ajax.php'),
3727
- 'ct_feedback_error' => __('Error occurred while sending feedback.', 'cleantalk'),
3728
- 'ct_feedback_no_hash' => __('Feedback wasn\'t sent. There is no associated request.', 'cleantalk'),
3729
- 'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk'), $apbct->user_token ? "<a target='_blank' href=https://cleantalk.org/my/show_requests?user_token={$apbct->user_token}&cp_mode=antispam>" : '', $apbct->user_token ? "</a>" : ''),
3730
  ));
3731
 
3732
  }
@@ -3775,10 +3776,10 @@ function ct_comments_output($curr_comment, $param2, $wp_list_comments_args){
3775
  $settings_link = '/wp-admin/'.(is_network_admin() ? "settings.php?page=cleantalk" : "options-general.php?page=cleantalk");
3776
 
3777
  echo "<div class='ct_comment_info'><div class ='ct_comment_titles'>";
3778
- echo "<p class='ct_comment_info_title'>".__('Sender info', 'cleantalk')."</p>";
3779
 
3780
  echo "<p class='ct_comment_logo_title'>
3781
- ".__('by', 'cleantalk')
3782
  ." <a href='{$settings_link}' target='_blank'><img class='ct_comment_logo_img' src='".plugins_url()."/cleantalk-spam-protect/inc/images/logo_color.png'></a>"
3783
  ." <a href='{$settings_link}' target='_blank'>CleanTalk</a>"
3784
  ."</p></div>";
@@ -3789,7 +3790,7 @@ function ct_comments_output($curr_comment, $param2, $wp_list_comments_args){
3789
  ."&nbsp;<img src='".plugins_url()."/cleantalk-spam-protect/inc/images/new_window.gif' border='0' style='float:none; box-shadow: transparent 0 0 0 !important;'/>"
3790
  ."</a>";
3791
  else
3792
- echo __('No email', 'cleantalk');
3793
  echo "&nbsp;|&nbsp;";
3794
 
3795
  // Outputs IP if exists
@@ -3799,14 +3800,14 @@ function ct_comments_output($curr_comment, $param2, $wp_list_comments_args){
3799
  ."&nbsp;<img src='".plugins_url()."/cleantalk-spam-protect/inc/images/new_window.gif' border='0' style='float:none; box-shadow: transparent 0 0 0 !important;'/>"
3800
  ."</a>";
3801
  else
3802
- echo __('No IP', 'cleantalk');
3803
  echo '&nbsp;|&nbsp;';
3804
 
3805
- echo "<span commentid='$id' class='ct_this_is ct_this_is_spam' href='#'>".__('Mark as spam', 'cleantalk')."</span>";
3806
- echo "<span commentid='$id' class='ct_this_is ct_this_is_not_spam ct_hidden' href='#'>".__('Unspam', 'cleantalk')."</span>";
3807
  echo "<p class='ct_feedback_wrap'>";
3808
- echo "<span class='ct_feedback_result ct_feedback_result_spam'>".__('Marked as spam.', 'cleantalk')."</span>";
3809
- echo "<span class='ct_feedback_result ct_feedback_result_not_spam'>".__('Marked as not spam.', 'cleantalk')."</span>";
3810
  echo "&nbsp;<span class='ct_feedback_msg'><span>";
3811
  echo "</p>";
3812
 
550
  $ct_result = $base_call_result['ct_result'];
551
 
552
  if ($ct_result->allow == 0)
553
+ wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk-spam-protect')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
554
  else
555
  return $args;
556
  }
708
  $ct_result = $base_call_result['ct_result'];
709
 
710
  if ($ct_result->allow == 0)
711
+ wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk-spam-protect')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
712
  }
713
 
714
  /**
876
  $ct_result = $base_call_result['ct_result'];
877
 
878
  if ($ct_result->allow == 0)
879
+ wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk-spam-protect')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
880
  }
881
 
882
  /**
1383
  $ct_comment = $ct_result->comment;
1384
  $ct_stop_words = $ct_result->stop_words;
1385
 
1386
+ $err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $ct_result->comment;
1387
  $err_text .= '<script>setTimeout("history.back()", 5000);</script>';
1388
 
1389
  // Terminate. Definitely spam.
1481
 
1482
  $notify_message =
1483
  PHP_EOL
1484
+ .__('CleanTalk AntiSpam: This message is possible spam.', 'cleantalk-spam-protect')
1485
+ ."\n".__('You could check it in CleanTalk\'s anti-spam database:', 'cleantalk-spam-protect')
1486
  ."\n".'IP: https://cleantalk.org/blacklists/' . $apbct->sender_ip
1487
  ."\n".'Email: https://cleantalk.org/blacklists/' . $apbct->sender_email
1488
  ."\n".PHP_EOL . sprintf(
1512
  $black_list_link = 'https://cleantalk.org/blacklists/';
1513
 
1514
  $links = PHP_EOL;
1515
+ $links .= esc_html__( 'Check for spam:', 'cleantalk-spam-protect');
1516
  $links .= PHP_EOL;
1517
  $links .= $black_list_link . $comment_details->comment_author_email;
1518
  $links .= PHP_EOL;
1532
  /**
1533
  * Set die page with Cleantalk comment.
1534
  * @global array $ct_comment
1535
+ $err_text = '<center><b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ' . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $ct_comment;
1536
  * @param type $comment_status
1537
  */
1538
  function ct_die($comment_id, $comment_status) {
1539
 
1540
  global $ct_comment;
1541
 
1542
+ $err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $ct_comment;
1543
  $err_text .= '<script>setTimeout("history.back()", 5000);</script>';
1544
  if(isset($_POST['et_pb_contact_email']))
1545
  {
1558
  */
1559
  function ct_die_extended($comment_body) {
1560
 
1561
+ $err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $comment_body;
1562
  $err_text .= '<script>setTimeout("history.back()", 5000);</script>';
1563
  wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' => true));
1564
  }
1755
  if( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ){
1756
  if (isset($_COOKIE[$apbct_cookie_register_ok_label])){
1757
  if(is_wp_error($errors)){
1758
+ $errors->add('ct_message',sprintf(__('Registration approved by %s.', 'cleantalk-spam-protect'), '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk</b>'), 'message');
1759
  }
1760
  }
1761
  }
2039
  global $apbct;
2040
 
2041
  $wp_new_user_notification_email_admin['message'] = PHP_EOL
2042
+ .__('CleanTalk AntiSpam: This registration is spam.', 'cleantalk-spam-protect')
2043
+ ."\n" . __('CleanTalk\'s anti-spam database:', 'cleantalk-spam-protect')
2044
  ."\n" . 'IP: ' . $apbct->sender_ip
2045
  ."\n" . 'Email: ' . $apbct->sender_email
2046
  .PHP_EOL . PHP_EOL .
2417
  global $apbct;
2418
 
2419
  $component['body'] =
2420
+ __('CleanTalk AntiSpam: This message is spam.', 'cleantalk-spam-protect')
2421
+ .PHP_EOL . __('CleanTalk\'s anti-spam database:', 'cleantalk-spam-protect')
2422
  .PHP_EOL . 'IP: ' . $apbct->sender_ip
2423
  .PHP_EOL . 'Email: ' . $apbct->sender_email
2424
  .PHP_EOL . sprintf(
2575
 
2576
  $response = array(
2577
  'status' => 200,
2578
+ 'html' => "<h1>".__('Spam protection by CleanTalk', 'cleantalk-spam-protect')."</h1><h2>".$ct_result->comment."</h2>"
2579
  );
2580
 
2581
  echo sanitize_text_field($_GET['callback']) . '(' . json_encode($response) . ')';
2598
 
2599
  $message .= wpautop(PHP_EOL . '---'
2600
  .PHP_EOL
2601
+ .__('CleanTalk AntiSpam: This message is spam.', 'cleantalk-spam-protect')
2602
+ .PHP_EOL . __('CleanTalk\'s anti-spam database:', 'cleantalk-spam-protect')
2603
  .PHP_EOL . 'IP: ' . $apbct->sender_ip
2604
  .PHP_EOL . 'Email: ' . $apbct->sender_email
2605
  .PHP_EOL .
2754
  $message = str_replace('</body>', '', $message);
2755
  $message .= wpautop(PHP_EOL . '---'
2756
  .PHP_EOL
2757
+ .__('CleanTalk AntiSpam: This message is spam.', 'cleantalk-spam-protect')
2758
+ .PHP_EOL . __('CleanTalk\'s anti-spam database:', 'cleantalk-spam-protect')
2759
  .PHP_EOL . 'IP: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_ip . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_ip . '</a>'
2760
  .PHP_EOL . 'Email: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_email . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_email . '</a>'
2761
  .PHP_EOL . sprintf(
2885
  $ct_hash = get_comment_meta($comment->comment_ID, 'ct_hash', true);
2886
 
2887
  if ($ct_hash !== '' && $_COOKIE[$ct_approved_request_id_label] == $ct_hash) {
2888
+ $comment_text .= '<br /><br /> <em class="comment-awaiting-moderation">' . __('Comment approved. Anti-spam by CleanTalk.', 'cleantalk-spam-protect') . '</em>';
2889
  }
2890
  }
2891
 
3321
  apbct_is_in_uri('login-1') || //Skip login form
3322
  apbct_is_in_uri('recuperacao-de-senha-2') || //Skip form reset password
3323
  apbct_is_in_uri('membermouse/api/request.php') && isset($_POST['membership_level_id'],$_POST['apikey'],$_POST['apisecret']) || // Membermouse API
3324
+ ( isset( $_POST['AppKey'] ) && ( isset( $_POST['cbAP'] ) && $_POST['cbAP'] == 'Caspio' ) ) || // Caspio exclusion (ticket #16444)
3325
+ isset($_POST['wpforms_id'], $_POST['wpforms_author']) //Skip wpforms
3326
  ) {
3327
  do_action( 'apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST );
3328
  return null;
3439
  return $ct_result->comment;
3440
 
3441
  }elseif(isset($_POST['vfb-submit']) && defined('VFB_VERSION')){
3442
+ wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk-spam-protect')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
3443
  // Caldera Contact Forms
3444
  }elseif(isset($_POST['action']) && $_POST['action'] == 'cf_process_ajax_submit'){
3445
  print json_encode("<h3 style='color: red;'><red>".$ct_result->comment);
3617
  update_option('cleantalk_timelabel_reg', time());
3618
 
3619
  $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
3620
+ $message = __('Attention, please!', 'cleantalk-spam-protect') . "\r\n\r\n";
3621
+ $message .= sprintf(__('"%s" plugin error on your site "%s":', 'cleantalk-spam-protect'), $apbct->plugin_name, $blogname) . "\r\n\r\n";
3622
  $message .= preg_replace('/^(.*?)<a.*?"(.*?)".*?>(.*?)<.a>(.*)$/', '$1. $3: $2?user_token='. $apbct->user_token .' $4', $comment) . "\r\n\r\n";
3623
+ @wp_mail(ct_get_admin_email(), sprintf(__('[%s] "%s" error!', 'cleantalk-spam-protect'), $apbct->plugin_name, $blogname), $message);
3624
  }
3625
 
3626
  return null;
3677
 
3678
  wp_localize_script('ct_public_gdpr', 'ctPublicGDPR', array(
3679
  'gdpr_forms' => array(),
3680
+ 'gdpr_text' => $apbct->settings['gdpr_text'] ? $apbct->settings['gdpr_text'] : __('By using this form you agree with the storage and processing of your data by using the Privacy Policy on this website.', 'cleantalk-spam-protect'),
3681
  ));
3682
  }
3683
 
3725
  wp_localize_script('ct_public_admin_js', 'ctPublicAdmin', array(
3726
  'ct_ajax_nonce' => $ajax_nonce,
3727
  'ajaxurl' => admin_url('admin-ajax.php'),
3728
+ 'ct_feedback_error' => __('Error occurred while sending feedback.', 'cleantalk-spam-protect'),
3729
+ 'ct_feedback_no_hash' => __('Feedback wasn\'t sent. There is no associated request.', 'cleantalk-spam-protect'),
3730
+ 'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk-spam-protect'), $apbct->user_token ? "<a target='_blank' href=https://cleantalk.org/my/show_requests?user_token={$apbct->user_token}&cp_mode=antispam>" : '', $apbct->user_token ? "</a>" : ''),
3731
  ));
3732
 
3733
  }
3776
  $settings_link = '/wp-admin/'.(is_network_admin() ? "settings.php?page=cleantalk" : "options-general.php?page=cleantalk");
3777
 
3778
  echo "<div class='ct_comment_info'><div class ='ct_comment_titles'>";
3779
+ echo "<p class='ct_comment_info_title'>".__('Sender info', 'cleantalk-spam-protect')."</p>";
3780
 
3781
  echo "<p class='ct_comment_logo_title'>
3782
+ ".__('by', 'cleantalk-spam-protect')
3783
  ." <a href='{$settings_link}' target='_blank'><img class='ct_comment_logo_img' src='".plugins_url()."/cleantalk-spam-protect/inc/images/logo_color.png'></a>"
3784
  ." <a href='{$settings_link}' target='_blank'>CleanTalk</a>"
3785
  ."</p></div>";
3790
  ."&nbsp;<img src='".plugins_url()."/cleantalk-spam-protect/inc/images/new_window.gif' border='0' style='float:none; box-shadow: transparent 0 0 0 !important;'/>"
3791
  ."</a>";
3792
  else
3793
+ echo __('No email', 'cleantalk-spam-protect');
3794
  echo "&nbsp;|&nbsp;";
3795
 
3796
  // Outputs IP if exists
3800
  ."&nbsp;<img src='".plugins_url()."/cleantalk-spam-protect/inc/images/new_window.gif' border='0' style='float:none; box-shadow: transparent 0 0 0 !important;'/>"
3801
  ."</a>";
3802
  else
3803
+ echo __('No IP', 'cleantalk-spam-protect');
3804
  echo '&nbsp;|&nbsp;';
3805
 
3806
+ echo "<span commentid='$id' class='ct_this_is ct_this_is_spam' href='#'>".__('Mark as spam', 'cleantalk-spam-protect')."</span>";
3807
+ echo "<span commentid='$id' class='ct_this_is ct_this_is_not_spam ct_hidden' href='#'>".__('Unspam', 'cleantalk-spam-protect')."</span>";
3808
  echo "<p class='ct_feedback_wrap'>";
3809
+ echo "<span class='ct_feedback_result ct_feedback_result_spam'>".__('Marked as spam.', 'cleantalk-spam-protect')."</span>";
3810
+ echo "<span class='ct_feedback_result ct_feedback_result_not_spam'>".__('Marked as not spam.', 'cleantalk-spam-protect')."</span>";
3811
  echo "&nbsp;<span class='ct_feedback_msg'><span>";
3812
  echo "</p>";
3813
 
inc/cleantalk-settings.php CHANGED
@@ -93,47 +93,47 @@ function apbct_settings__set_fileds( $fields ){
93
  'fields' => array(
94
  'spam_firewall' => array(
95
  'type' => 'checkbox',
96
- 'title' => __('SpamFireWall', 'cleantalk'),
97
- 'description' => __("This option allows to filter spam bots before they access website. Also reduces CPU usage on hosting server and accelerates pages load time.", 'cleantalk'),
98
  ),
99
  ),
100
  ),
101
 
102
  // Forms protection
103
  'forms_protection' => array(
104
- 'title' => __('Forms to protect', 'cleantalk'),
105
  'default_params' => array(),
106
  'description' => '',
107
  'html_before' => '<hr><br>'
108
  .'<span id="ct_adv_showhide">'
109
  .'<a href="#" class="apbct_color--gray" onclick="event.preventDefault(); apbct_show_hide_elem(\'apbct_settings__davanced_settings\');">'
110
- .__('Advanced settings', 'cleantalk')
111
  .'</a>'
112
  .'</span>'
113
  .'<div id="apbct_settings__davanced_settings" style="display: none;">',
114
  'html_after' => '',
115
  'fields' => array(
116
  'registrations_test' => array(
117
- 'title' => __('Registration Forms', 'cleantalk'),
118
- 'description' => __('WordPress, BuddyPress, bbPress, S2Member, WooCommerce.', 'cleantalk'),
119
  ),
120
  'comments_test' => array(
121
- 'title' => __('Comments form', 'cleantalk'),
122
- 'description' => __('WordPress, JetPack, WooCommerce.', 'cleantalk'),
123
  ),
124
  'contact_forms_test' => array(
125
- 'title' => __('Contact forms', 'cleantalk'),
126
- 'description' => __('Contact Form 7, Formidable forms, JetPack, Fast Secure Contact Form, WordPress Landing Pages, Gravity Forms.', 'cleantalk'),
127
  ),
128
  'general_contact_forms_test' => array(
129
- 'title' => __('Custom contact forms', 'cleantalk'),
130
- 'description' => __('Anti spam test for any WordPress themes or contacts forms.', 'cleantalk'),
131
  ),
132
  'search_test' => array(
133
- 'title' => __('Test default Wordpress search form for spam', 'cleantalk'),
134
- 'description' => __('Spam protection for Search form.', 'cleantalk')
135
  . (!$apbct->white_label || is_main_site()
136
- ? sprintf(__('Read more about %sspam protection for Search form%s on our blog. “noindex” tag will be placed in meta derictive on search page.', 'cleantalk'),
137
  '<a href="https://blog.cleantalk.org/how-to-protect-website-search-from-spambots/" target="_blank">',
138
  '</a>'
139
  )
@@ -141,35 +141,35 @@ function apbct_settings__set_fileds( $fields ){
141
  )
142
  ),
143
  'check_external' => array(
144
- 'title' => __('Protect external forms', 'cleantalk'),
145
- 'description' => __('Turn this option on to protect forms on your WordPress that send data to third-part servers (like MailChimp).', 'cleantalk'),
146
  'childrens' => array('check_external__capture_buffer'),
147
  ),
148
  'check_external__capture_buffer' => array(
149
- 'title' => __('Capture buffer', 'cleantalk'),
150
- 'description' => __('This setting gives you more sophisticated and strengthened protection for external forms. But it could break plugins which use a buffer like Ninja Forms.', 'cleantalk'),
151
  'class' => 'apbct_settings-field_wrapper--sub',
152
  'parent' => 'check_external',
153
  ),
154
  'check_internal' => array(
155
- 'title' => __('Protect internal forms', 'cleantalk'),
156
- 'description' => __('This option will enable protection for custom (hand-made) AJAX forms with PHP scripts handlers on your WordPress.', 'cleantalk'),
157
  ),
158
  ),
159
  ),
160
 
161
  // Comments and Messages
162
  'wc' => array(
163
- 'title' => __('WooCommerce', 'cleantalk'),
164
  'fields' => array(
165
  'wc_checkout_test' => array(
166
- 'title' => __('WooCommerce checkout form', 'cleantalk'),
167
- 'description' => __('Anti spam test for WooCommerce checkout form.', 'cleantalk'),
168
  'childrens' => array('wc_register_from_order')
169
  ),
170
  'wc_register_from_order' => array(
171
- 'title' => __('Spam test for registration during checkout', 'cleantalk'),
172
- 'description' => __('Enable anti spam test for registration process which during woocommerce\'s checkout.', 'cleantalk'),
173
  'parent' => 'wc_checkout_test',
174
  'class' => 'apbct_settings-field_wrapper--sub',
175
  'reverse_trigger' => true
@@ -179,11 +179,11 @@ function apbct_settings__set_fileds( $fields ){
179
 
180
  // Comments and Messages
181
  'comments_and_messages' => array(
182
- 'title' => __('Comments and Messages', 'cleantalk'),
183
  'fields' => array(
184
  'disable_comments__all' => array(
185
- 'title' => __( 'Disable all comments', 'cleantalk' ),
186
- 'description' => __( 'Disabling comments for all types of content.', 'cleantalk' ),
187
  'childrens' => array(
188
  'disable_comments__posts',
189
  'disable_comments__pages',
@@ -195,43 +195,43 @@ function apbct_settings__set_fileds( $fields ){
195
  ),
196
  ),
197
  'disable_comments__posts' => array(
198
- 'title' => __( 'Disable comments for all posts', 'cleantalk' ),
199
  'class' => 'apbct_settings-field_wrapper--sub',
200
  'parent' => 'disable_comments__all',
201
  'reverse_trigger' => true,
202
  ),
203
  'disable_comments__pages' => array(
204
- 'title' => __( 'Disable comments for all pages', 'cleantalk' ),
205
  'class' => 'apbct_settings-field_wrapper--sub',
206
  'parent' => 'disable_comments__all',
207
  'reverse_trigger' => true,
208
  ),
209
  'disable_comments__media' => array(
210
- 'title' => __( 'Disable comments for all media', 'cleantalk' ),
211
  'class' => 'apbct_settings-field_wrapper--sub',
212
  'parent' => 'disable_comments__all',
213
  'reverse_trigger' => true,
214
  ),
215
  'bp_private_messages' => array(
216
- 'title' => __('BuddyPress Private Messages', 'cleantalk'),
217
- 'description' => __('Check buddyPress private messages.', 'cleantalk'),
218
  ),
219
  'remove_old_spam' => array(
220
- 'title' => __('Automatically delete spam comments', 'cleantalk'),
221
- 'description' => sprintf(__('Delete spam comments older than %d days.', 'cleantalk'), $apbct->data['spam_store_days']),
222
  ),
223
  'remove_comments_links' => array(
224
- 'title' => __('Remove links from approved comments', 'cleantalk'),
225
- 'description' => __('Remove links from approved comments. Replace it with "[Link deleted]"', 'cleantalk'),
226
  ),
227
  'show_check_links' => array(
228
- 'title' => __('Show links to check Emails, IPs for spam', 'cleantalk'),
229
- 'description' => __('Shows little icon near IP addresses and Emails allowing you to check it via CleanTalk\'s database.', 'cleantalk'),
230
  'display' => !$apbct->white_label,
231
  ),
232
  'manage_comments_on_public_page' => array(
233
- 'title' => __('Manage comments on public pages', 'cleantalk'),
234
- 'description' => __('Allows administrators to manage comments on public post\'s pages with small interactive menu.', 'cleantalk'),
235
  'display' => !$apbct->white_label,
236
  ),
237
  ),
@@ -239,23 +239,23 @@ function apbct_settings__set_fileds( $fields ){
239
 
240
  // Data Processing
241
  'data_processing' => array(
242
- 'title' => __('Data Processing', 'cleantalk'),
243
  'fields' => array(
244
  'protect_logged_in' => array(
245
- 'title' => __("Protect logged in Users", 'cleantalk'),
246
- 'description' => __('Turn this option on to check for spam any submissions (comments, contact forms and etc.) from registered Users.', 'cleantalk'),
247
  ),
248
  'check_comments_number' => array(
249
- 'title' => __("Don't check trusted user's comments", 'cleantalk'),
250
- 'description' => sprintf(__("Don't check comments for users with above %d comments.", 'cleantalk'), defined('CLEANTALK_CHECK_COMMENTS_NUMBER') ? CLEANTALK_CHECK_COMMENTS_NUMBER : 3),
251
  ),
252
  'use_ajax' => array(
253
- 'title' => __('Use AJAX for JavaScript check', 'cleantalk'),
254
- 'description' => __('Options helps protect WordPress against spam with any caching plugins. Turn this option on to avoid issues with caching plugins.', 'cleantalk'),
255
  ),
256
  'use_static_js_key' => array(
257
- 'title' => __('Use static keys for JS check.', 'cleantalk'),
258
- 'description' => __('Could help if you have cache for AJAX requests and you are dealing with false positives. Slightly decreases protection quality. Auto - Static key will be used if caching plugin is spotted.', 'cleantalk'),
259
  'options' => array(
260
  array('val' => 1, 'label' => __('On'), ),
261
  array('val' => 0, 'label' => __('Off'), ),
@@ -263,96 +263,96 @@ function apbct_settings__set_fileds( $fields ){
263
  ),
264
  ),
265
  'general_postdata_test' => array(
266
- 'title' => __('Check all post data', 'cleantalk'),
267
- 'description' => __('Check all POST submissions from website visitors. Enable this option if you have spam misses on website.', 'cleantalk')
268
  .(!$apbct->white_label
269
- ? __(' Or you don`t have records about missed spam here:', 'cleantalk') . '&nbsp;' . '<a href="https://cleantalk.org/my/?user_token='.$apbct->user_token.'&utm_source=wp-backend&utm_medium=admin-bar&cp_mode=antispam" target="_blank">' . __('CleanTalk dashboard', 'cleantalk') . '</a>.'
270
  : ''
271
  )
272
- .'<br />' . __('СAUTION! Option can catch POST requests in WordPress backend', 'cleantalk'),
273
  ),
274
  'set_cookies' => array(
275
- 'title' => __("Set cookies", 'cleantalk'),
276
- 'description' => __('Turn this option off to deny plugin generates any cookies on website front-end. This option is helpful if you use Varnish. But most of contact forms will not be protected if the option is turned off! <b>Warning: We strongly recommend you to enable this otherwise it could cause false positives spam detection.</b>', 'cleantalk'),
277
  'childrens' => array('set_cookies__sessions'),
278
  ),
279
  'set_cookies__sessions' => array(
280
- 'title' => __('Use alternative mechanism for cookies', 'cleantalk'),
281
- 'description' => __('Doesn\'t use cookie or PHP sessions. Collect data for all types of bots.', 'cleantalk'),
282
  'parent' => 'set_cookies',
283
  'class' => 'apbct_settings-field_wrapper--sub',
284
  ),
285
  'ssl_on' => array(
286
- 'title' => __("Use SSL", 'cleantalk'),
287
- 'description' => __('Turn this option on to use encrypted (SSL) connection with servers.', 'cleantalk'),
288
  ),
289
  'use_buitin_http_api' => array(
290
- 'title' => __("Use Wordpress HTTP API", 'cleantalk'),
291
- 'description' => __('Alternative way to connect the Cloud. Use this if you have connection problems.', 'cleantalk'),
292
  ),
293
  ),
294
  ),
295
 
296
  // Exclusions
297
  'exclusions' => array(
298
- 'title' => __('Exclusions', 'cleantalk'),
299
  'fields' => array(
300
  'exclusions__urls' => array(
301
  'type' => 'text',
302
- 'title' => __('URL exclusions', 'cleantalk'),
303
- 'description' => __('You could type here URL you want to exclude. Use comma as separator.', 'cleantalk'),
304
  ),
305
  'exclusions__urls__use_regexp' => array(
306
  'type' => 'checkbox',
307
- 'title' => __('Use Regular Expression in URL Exclusions', 'cleantalk'),
308
  ),
309
  'exclusions__fields' => array(
310
  'type' => 'text',
311
- 'title' => __('Field name exclusions', 'cleantalk'),
312
- 'description' => __('You could type here fields names you want to exclude. Use comma as separator.', 'cleantalk'),
313
  ),
314
  'exclusions__fields__use_regexp' => array(
315
  'type' => 'checkbox',
316
- 'title' => __('Use Regular Expression in Field Exclusions', 'cleantalk'),
317
  ),
318
  'exclusions__roles' => array(
319
  'type' => 'select',
320
  'multiple' => true,
321
  'options_callback' => 'apbct_get_all_roles',
322
  'options_callback_params' => array(true),
323
- 'description' => __('Roles which bypass spam test. Hold CTRL to select multiple roles.', 'cleantalk'),
324
  ),
325
  ),
326
  ),
327
 
328
  // Admin bar
329
  'admin_bar' => array(
330
- 'title' => __('Admin bar', 'cleantalk'),
331
  'default_params' => array(),
332
  'description' => '',
333
  'html_before' => '',
334
  'html_after' => '',
335
  'fields' => array(
336
  'show_adminbar' => array(
337
- 'title' => __('Show statistics in admin bar', 'cleantalk'),
338
- 'description' => __('Show/hide icon in top level menu in WordPress backend. The number of submissions is being counted for past 24 hours.', 'cleantalk'),
339
  'childrens' => array('all_time_counter','daily_counter','sfw_counter'),
340
  ),
341
  'all_time_counter' => array(
342
- 'title' => __('Show All-time counter', 'cleantalk'),
343
- 'description' => __('Display all-time requests counter in the admin bar. Counter displays number of requests since plugin installation.', 'cleantalk'),
344
  'parent' => 'show_adminbar',
345
  'class' => 'apbct_settings-field_wrapper--sub',
346
  ),
347
  'daily_counter' => array(
348
- 'title' => __('Show 24 hours counter', 'cleantalk'),
349
- 'description' => __('Display daily requests counter in the admin bar. Counter displays number of requests of the past 24 hours.', 'cleantalk'),
350
  'parent' => 'show_adminbar',
351
  'class' => 'apbct_settings-field_wrapper--sub',
352
  ),
353
  'sfw_counter' => array(
354
- 'title' => __('SpamFireWall counter', 'cleantalk'),
355
- 'description' => __('Display SpamFireWall requests in the admin bar. Counter displays number of requests since plugin installation.', 'cleantalk'),
356
  'parent' => 'show_adminbar',
357
  'class' => 'apbct_settings-field_wrapper--sub',
358
  ),
@@ -365,49 +365,49 @@ function apbct_settings__set_fileds( $fields ){
365
  'fields' => array(
366
  'collect_details' => array(
367
  'type' => 'checkbox',
368
- 'title' => __('Collect details about browsers', 'cleantalk'),
369
- 'description' => __("Checking this box you allow plugin store information about screen size and browser plugins of website visitors. The option in a beta state.", 'cleantalk'),
370
  ),
371
  'send_connection_reports' => array(
372
  'type' => 'checkbox',
373
- 'title' => __('Send connection reports', 'cleantalk'),
374
- 'description' => __("Checking this box you allow plugin to send the information about your connection. The option in a beta state.", 'cleantalk'),
375
  ),
376
  'async_js' => array(
377
  'type' => 'checkbox',
378
- 'title' => __('Async JavaScript loading', 'cleantalk'),
379
- 'description' => __('Use async loading for scripts. Warning: This could reduce filtration quality.', 'cleantalk'),
380
  ),
381
  'gdpr_enabled' => array(
382
  'type' => 'checkbox',
383
- 'title' => __('Allow to add GDPR notice via shortcode', 'cleantalk'),
384
- 'description' => __(' Adds small checkbox under your website form. To add it you should use the shortcode on the form\'s page: [cleantalk_gdpr_form id="FORM_ID"]', 'cleantalk'),
385
  'childrens' => array('gdpr_text'),
386
  ),
387
  'gdpr_text' => array(
388
  'type' => 'text',
389
- 'title' => __('GDPR text notice', 'cleantalk'),
390
- 'description' => __('This text will be added as a description to the GDPR checkbox.', 'cleantalk'),
391
  'parent' => 'gdpr_enabled',
392
  'class' => 'apbct_settings-field_wrapper--sub',
393
  ),
394
  'store_urls' => array(
395
  'type' => 'checkbox',
396
- 'title' => __('Store visited URLs', 'cleantalk'),
397
- 'description' => __("Plugin stores last 10 visited URLs (HTTP REFFERERS) before visitor submits form on the site. You can see stored visited URLS for each visitor in your Dashboard. Turn the option on to improve Anti-Spam protection.", 'cleantalk'),
398
  'childrens' => array('store_urls__sessions'),
399
  ),
400
  'store_urls__sessions' => array(
401
  'type' => 'checkbox',
402
- 'title' => __('Use cookies less sessions', 'cleantalk'),
403
- 'description' => __('Doesn\'t use cookie or PHP sessions. Collect data for all types of bots.', 'cleantalk'),
404
  'parent' => 'store_urls',
405
  'class' => 'apbct_settings-field_wrapper--sub',
406
  ),
407
  'comment_notify' => array(
408
  'type' => 'checkbox',
409
- 'title' => __('Notify users with selected roles about new approved comments. Hold CTRL to select multiple roles.', 'cleantalk'),
410
- 'description' => sprintf(__("If enabled, overrides similar Wordpress %sdiscussion settings%s.", 'cleantalk'), '<a href="options-discussion.php">','</a>'),
411
  'childrens' => array('comment_notify__roles'),
412
  ),
413
  'comment_notify__roles' => array(
@@ -420,8 +420,8 @@ function apbct_settings__set_fileds( $fields ){
420
  ),
421
  'complete_deactivation' => array(
422
  'type' => 'checkbox',
423
- 'title' => __('Complete deactivation', 'cleantalk'),
424
- 'description' => __('Leave no trace in the system after deactivation.', 'cleantalk'),
425
  ),
426
 
427
  ),
@@ -438,15 +438,15 @@ function apbct_settings__set_fileds__network( $fields ){
438
  'fields' => array(
439
  'white_label' => array(
440
  'type' => 'checkbox',
441
- 'title' => __('Enable White Label Mode', 'cleantalk'),
442
- 'description' => sprintf(__("Learn more information %shere%s.", 'cleantalk'), '<a target="_blank" href="https://cleantalk.org/ru/help/hosting-white-label">', '</a>'),
443
  'childrens' => array( 'white_label__hoster_key', 'white_label__plugin_name', 'allow_custom_key', ),
444
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
445
  'network' => true,
446
  ),
447
  'white_label__hoster_key' => array(
448
- 'title' => __('Hoster API Key', 'cleantalk'),
449
- 'description' => sprintf(__("You can get it in %sCleantalk's Control Panel%s", 'cleantalk'), '<a target="_blank" href="https://cleantalk.org/my/profile">', '</a>'),
450
  'type' => 'text',
451
  'parent' => 'white_label',
452
  'class' => 'apbct_settings-field_wrapper--sub',
@@ -454,8 +454,8 @@ function apbct_settings__set_fileds__network( $fields ){
454
  'required' => true,
455
  ),
456
  'white_label__plugin_name' => array(
457
- 'title' => __('Plugin name', 'cleantalk'),
458
- 'description' => sprintf(__("Specify plugin name. Leave empty for deafult %sAntispam by Cleantalk%s", 'cleantalk'), '<b>', '</b>'),
459
  'type' => 'text',
460
  'parent' => 'white_label',
461
  'class' => 'apbct_settings-field_wrapper--sub',
@@ -464,13 +464,13 @@ function apbct_settings__set_fileds__network( $fields ){
464
  ),
465
  'allow_custom_key' => array(
466
  'type' => 'checkbox',
467
- 'title' => __('Allow users to use other key', 'cleantalk'),
468
- 'description' => __('Allow users to use different Access key in their plugin settings on child blogs. They could use different CleanTalk account.', 'cleantalk')
469
  . (defined('CLEANTALK_ACCESS_KEY')
470
  ? ' <span style="color: red">'
471
- . __('Constant <b>CLEANTALK_ACCESS_KEY</b> is set. All websites will use API key from this constant. Look into wp-config.php', 'cleantalk')
472
  . '<br>'
473
- . __('You are not able to use white label mode while <b>CLEANTALK_ACCESS_KEY</b> is defined.', 'cleantalk')
474
  . '</span>'
475
  : ''
476
  ),
@@ -480,23 +480,23 @@ function apbct_settings__set_fileds__network( $fields ){
480
  ),
481
  'allow_custom_settings' => array(
482
  'type' => 'checkbox',
483
- 'title' => __('Allow users to manage plugin settings', 'cleantalk'),
484
- 'description' => __('Allow to change settings on child sites.', 'cleantalk'),
485
  'display' => APBCT_WPMS && is_main_site(),
486
  'network' => true,
487
  ),
488
  'use_settings_template' => array(
489
  'type' => 'checkbox',
490
- 'title' => __('Use settings template', 'cleantalk'),
491
- 'description' => __("Use the current settings template for child sites.", 'cleantalk'),
492
  'childrens' => array( 'use_settings_template_apply_for_new', 'use_settings_template_apply_for_current'),
493
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
494
  'network' => true,
495
  ),
496
  'use_settings_template_apply_for_new' => array(
497
  'type' => 'checkbox',
498
- 'title' => __('Apply for newly added sites.', 'cleantalk'),
499
- 'description' => __("The newly added site will have the same preset settings template.", 'cleantalk'),
500
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
501
  'parent' => 'use_settings_template',
502
  'class' => 'apbct_settings-field_wrapper--sub',
@@ -504,8 +504,8 @@ function apbct_settings__set_fileds__network( $fields ){
504
  ),
505
  'use_settings_template_apply_for_current' => array(
506
  'type' => 'checkbox',
507
- 'title' => __('Apply for current sites.', 'cleantalk'),
508
- 'description' => __("Apply current settings template for selected sites.", 'cleantalk'),
509
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
510
  'parent' => 'use_settings_template',
511
  'childrens' => array( 'use_settings_template_apply_for_current_list_sites'),
@@ -519,7 +519,7 @@ function apbct_settings__set_fileds__network( $fields ){
519
  'options_callback_params' => array(true),
520
  'class' => 'apbct_settings-field_wrapper--sub',
521
  'parent' => 'use_settings_template_apply_for_current',
522
- 'description' => __('Sites to apply settings. Hold CTRL to select multiple sites.', 'cleantalk'),
523
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
524
  'network' => true,
525
  ),
@@ -564,7 +564,7 @@ function apbct_settings__add_groups_and_fields( $fields ){
564
 
565
  foreach($apbct->settings_fields_in_groups as $group_name => $group){
566
 
567
- add_settings_section('apbct_section__'.$group_name, '', 'apbct_section__'.$group_name, 'cleantalk');
568
 
569
  foreach($group['fields'] as $field_name => $field){
570
 
@@ -607,11 +607,11 @@ function apbct_settings__display() {
607
  global $apbct;
608
 
609
  // Title
610
- echo '<h2 class="apbct_settings-title">'.__($apbct->plugin_name, 'cleantalk').'</h2>';
611
 
612
  // Subtitle for IP license
613
  if($apbct->moderate_ip)
614
- echo '<h4 class="apbct_settings-subtitle apbct_color--gray">'. __('Hosting AntiSpam', 'cleantalk').'</h4>';
615
 
616
  echo '<form action="options.php" method="post">';
617
 
@@ -621,18 +621,18 @@ function apbct_settings__display() {
621
  if(!$apbct->white_label){
622
  echo '<div style="float: right; padding: 15px 15px 5px 15px; font-size: 13px; position: relative; background: #f1f1f1;">';
623
 
624
- echo __('CleanTalk\'s tech support:', 'cleantalk')
625
  .'&nbsp;'
626
  .'<a target="_blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">Wordpress.org</a>.'
627
- // .' <a href="https://community.cleantalk.org/viewforum.php?f=25" target="_blank">'.__("Tech forum", 'cleantalk').'</a>'
628
- // .($user_token ? ", <a href='https://cleantalk.org/my/support?user_token=$user_token&cp_mode=antispam' target='_blank'>".__("Service support ", 'cleantalk').'</a>' : '').
629
  .'<br>';
630
- echo __('Plugin Homepage at', 'cleantalk').' <a href="https://cleantalk.org" target="_blank">cleantalk.org</a>.<br/>';
631
- echo '<span id="apbct_gdpr_open_modal" style="text-decoration: underline;">'.__('GDPR compliance', 'cleantalk').'</span><br/>';
632
- echo __('Use s@cleantalk.org to test plugin in any WordPress form.', 'cleantalk').'<br>';
633
- echo __('CleanTalk is registered Trademark. All rights reserved.', 'cleantalk').'<br/>';
634
  if($apbct->key_is_ok)
635
- echo '<b style="display: inline-block; margin-top: 10px;">'.sprintf(__('Do you like CleanTalk? %sPost your feedback here%s.', 'cleantalk'), '<a href="https://wordpress.org/support/plugin/cleantalk-spam-protect/reviews/#new-post" target="_blank">', '</a>').'</b><br />';
636
  apbct_admin__badge__get_premium();
637
  echo '<div id="gdpr_dialog" style="display: none; padding: 7px;">';
638
  apbct_settings_show_gdpr_text('print');
@@ -647,7 +647,7 @@ function apbct_settings__display() {
647
  .'<br>'
648
  .'<span>'
649
  .sprintf(
650
- __( '%s has blocked <b>%s</b> spam.', 'cleantalk' ),
651
  $apbct->plugin_name,
652
  number_format($apbct->spam_count, 0, ',', ' ')
653
  )
@@ -659,11 +659,11 @@ function apbct_settings__display() {
659
  if(!$apbct->white_label){
660
  // CP button
661
  echo '<a class="cleantalk_link cleantalk_link-manual" target="__blank" href="https://cleantalk.org/my?user_token='.$apbct->user_token.'&cp_mode=antispam">'
662
- .__('Click here to get anti-spam statistics', 'cleantalk')
663
  .'</a>';
664
  echo '&nbsp;&nbsp;';
665
  // Support button
666
- echo '<a class="cleantalk_link cleantalk_link-auto" target="__blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">'.__('Support', 'cleantalk').'</a>';
667
  echo '<br>'
668
  .'<br>';
669
  }
@@ -704,7 +704,7 @@ function apbct_settings__display__network(){
704
  $site_url = get_site_option('siteurl');
705
  $site_url = preg_match( '/\/$/', $site_url ) ? $site_url : $site_url . '/';
706
  $link = $site_url . 'wp-admin/options-general.php?page=cleantalk';
707
- printf("<h2>" . __("Please, enter the %splugin settings%s in main site dashboard.", 'cleantalk') . "</h2>", "<a href='$link'>", "</a>");
708
  return;
709
  }
710
  }
@@ -723,12 +723,12 @@ function apbct_settings__error__output($return = false){
723
 
724
  $error_texts = array(
725
  // Misc
726
- 'key_invalid' => __('Error occurred while API key validating. Error: ', 'cleantalk'),
727
- 'key_get' => __('Error occurred while automatically gettings access key. Error: ', 'cleantalk'),
728
- 'sfw_send_logs' => __('Error occurred while sending SpamFireWall logs. Error: ', 'cleantalk'),
729
- 'sfw_update' => __('Error occurred while updating SpamFireWall local base. Error: ' , 'cleantalk'),
730
- 'account_check' => __('Error occurred while checking account status. Error: ', 'cleantalk'),
731
- 'api' => __('Error occurred while excuting API call. Error: ', 'cleantalk'),
732
 
733
  // Validating settings
734
  'settings_validate' => 'Validate Settings',
@@ -736,7 +736,7 @@ function apbct_settings__error__output($return = false){
736
  'exclusions_fields' => 'Field Exclusions',
737
 
738
  // Unknown
739
- 'unknown' => __('Unknown error. Error: ', 'cleantalk'),
740
  );
741
 
742
  $errors_out = array();
@@ -767,12 +767,12 @@ function apbct_settings__error__output($return = false){
767
 
768
  if(!empty($errors_out)){
769
  $out .= '<div id="apbctTopWarning" class="error" style="position: relative;">'
770
- .'<h3 style="display: inline-block;">'.__('Errors:', 'cleantalk').'</h3>';
771
  foreach($errors_out as $value){
772
  $out .= '<h4>'.$value.'</h4>';
773
  }
774
  $out .= !$apbct->white_label
775
- ? '<h4 style="text-align: unset;">'.sprintf(__('You can get support any time here: %s.', 'cleantalk'), '<a target="blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">https://wordpress.org/support/plugin/cleantalk-spam-protect</a>').'</h4>'
776
  : '';
777
  $out .= '</div>';
778
  }
@@ -848,25 +848,25 @@ function apbct_settings__field__state(){
848
 
849
  print '<div class="apbct_settings-field_wrapper" style="color:'.$color.'">';
850
 
851
- print '<h2>'.__('Protection is active', 'cleantalk').'</h2>';
852
 
853
- echo '<img class="apbct_status_icon" src="'.($apbct->settings['registrations_test'] == 1 ? $img : $img_no).'"/>'.__('Registration forms', 'cleantalk');
854
- echo '<img class="apbct_status_icon" src="'.($apbct->settings['comments_test'] == 1 ? $img : $img_no).'"/>'.__('Comments forms', 'cleantalk');
855
- echo '<img class="apbct_status_icon" src="'.($apbct->settings['contact_forms_test'] == 1 ? $img : $img_no).'"/>'.__('Contact forms', 'cleantalk');
856
- echo '<img class="apbct_status_icon" src="'.($apbct->settings['general_contact_forms_test'] == 1 ? $img : $img_no).'"/>'.__('Custom contact forms', 'cleantalk');
857
  if(!$apbct->white_label || is_main_site())
858
  echo '<img class="apbct_status_icon" src="'.($apbct->data['moderate'] == 1 ? $img : $img_no).'"/>'
859
- .'<a style="color: black" href="https://blog.cleantalk.org/real-time-email-address-existence-validation/">'.__('Validate email for existence', 'cleantalk').'</a>';
860
- echo '<img class="apbct_status_icon" id = "sfw_status_icon" style = "width:16px;height:16px;" src="'.($apbct->settings['spam_firewall'] == 1 ? ( $apbct->stats['sfw']['update_in_process'] == true ? $preloader : $img) : $img_no).'"/>'.__('SpamFireWall', 'cleantalk');
861
  // Autoupdate status
862
  if($apbct->notice_auto_update && (!$apbct->white_label || is_main_site())){
863
- echo '<img class="apbct_status_icon" src="'.($apbct->auto_update == 1 ? $img : ($apbct->auto_update == -1 ? $img_no : $img_no_gray)).'"/>'.__('Auto update', 'cleantalk')
864
  .' <sup><a href="https://cleantalk.org/help/cleantalk-auto-update" target="_blank">?</a></sup>';
865
  }
866
 
867
  // WooCommerce
868
  if(class_exists('WooCommerce'))
869
- echo '<img class="apbct_status_icon" src="'.($apbct->settings['wc_checkout_test'] == 1 ? $img : $img_no).'"/>'.__('WooCommerce checkout form', 'cleantalk');
870
  if($apbct->moderate_ip)
871
  print "<br /><br />The anti-spam service is paid by your hosting provider. License #".$apbct->data['ip_license'].".<br />";
872
 
@@ -884,11 +884,11 @@ function apbct_settings__field__apikey(){
884
 
885
  // Using key from Main site, or from CLEANTALK_ACCESS_KEY constant
886
  if(APBCT_WPMS && !is_main_site() && (!$apbct->allow_custom_key || defined('CLEANTALK_ACCESS_KEY'))){
887
- _e('<h3>Key is provided by Super Admin.</h3>', 'cleantalk');
888
  return;
889
  }
890
 
891
- echo '<label class="apbct_settings__label" for="cleantalk_apkey">' . __('Access key', 'cleantalk') . '</label>';
892
 
893
  echo '<input
894
  id="apbct_setting_apikey"
@@ -903,13 +903,13 @@ function apbct_settings__field__apikey(){
903
  . '"
904
  key="' . $apbct->api_key . '"
905
  size="20"
906
- placeholder="' . __('Enter the key', 'cleantalk') . '"'
907
  . ' />';
908
 
909
  // Show account name associated with key
910
  if(!empty($apbct->data['account_name_ob'])){
911
  echo '<div class="apbct_display--none">'
912
- . sprintf( __('Account at cleantalk.org is %s.', 'cleantalk'),
913
  '<b>'.$apbct->data['account_name_ob'].'</b>'
914
  )
915
  . '</div>';
@@ -918,7 +918,7 @@ function apbct_settings__field__apikey(){
918
  // Show key button
919
  if((apbct_api_key__is_correct($apbct->api_key) && $apbct->key_is_ok)){
920
  echo '<a id="apbct_showApiKey" class="ct_support_link" style="display: block" href="#">'
921
- . __('Show the access key', 'cleantalk')
922
  . '</a>';
923
 
924
  // "Auto Get Key" buttons. License agreement
@@ -929,7 +929,7 @@ function apbct_settings__field__apikey(){
929
  // Auto get key
930
  if(!$apbct->ip_license){
931
  echo '<button class="cleantalk_link cleantalk_link-manual apbct_setting---get_key_auto" name="submit" type="submit" value="get_key_auto">'
932
- .__('Get Access Key Automatically', 'cleantalk')
933
  .'</button>';
934
  echo '<input type="hidden" id="ct_admin_timezone" name="ct_admin_timezone" value="null" />';
935
  echo '<br />';
@@ -937,7 +937,7 @@ function apbct_settings__field__apikey(){
937
  }
938
 
939
  // Warnings and GDPR
940
- printf( __('Admin e-mail (%s) will be used for registration, if you want to use other email please %sGet Access Key Manually%s.', 'cleantalk'),
941
  ct_get_admin_email(),
942
  '<a class="apbct_color--gray" target="__blank" href="'
943
  . sprintf( 'https://cleantalk.org/register?platform=wordpress&email=%s&website=%s',
@@ -953,7 +953,7 @@ function apbct_settings__field__apikey(){
953
  echo '<div>';
954
  echo '<input checked type="checkbox" id="license_agreed" onclick="apbctSettingsDependencies(\'apbct_setting---get_key_auto\');"/>';
955
  echo '<label for="spbc_license_agreed">';
956
- printf( __('I accept %sLicense Agreement%s.', 'cleantalk'),
957
  '<a class = "apbct_color--gray" href="https://cleantalk.org/publicoffer" target="_blank">',
958
  '</a>'
959
  );
@@ -972,9 +972,9 @@ function apbct_settings__field__action_buttons(){
972
  $links = apply_filters(
973
  'apbct_settings_action_buttons',
974
  array(
975
- '<a href="edit-comments.php?page=ct_check_spam" class="ct_support_link">' . __('Check comments for spam', 'cleantalk') . '</a>',
976
- '<a href="users.php?page=ct_check_users" class="ct_support_link">' . __('Check users for spam', 'cleantalk') . '</a>',
977
- '<a href="#" class="ct_support_link" onclick="apbct_show_hide_elem(\'apbct_statistics\')">' . __('Statistics & Reports', 'cleantalk') . '</a>',
978
  )
979
  );
980
 
@@ -999,43 +999,43 @@ function apbct_settings__field__statistics() {
999
 
1000
  // Last request
1001
  printf(
1002
- __('Last spam check request to %s server was at %s.', 'cleantalk'),
1003
- $apbct->stats['last_request']['server'] ? $apbct->stats['last_request']['server'] : __('unknown', 'cleantalk'),
1004
- $apbct->stats['last_request']['time'] ? date('M d Y H:i:s', $apbct->stats['last_request']['time']) : __('unknown', 'cleantalk')
1005
  );
1006
  echo '<br>';
1007
 
1008
  // Avarage time request
1009
  printf(
1010
- __('Average request time for past 7 days: %s seconds.', 'cleantalk'),
1011
  $apbct->stats['requests'][min(array_keys($apbct->stats['requests']))]['average_time']
1012
  ? round($apbct->stats['requests'][min(array_keys($apbct->stats['requests']))]['average_time'], 3)
1013
- : __('unknown', 'cleantalk')
1014
  );
1015
  echo '<br>';
1016
 
1017
  // SFW last die
1018
  printf(
1019
- __('Last time SpamFireWall was triggered for %s IP at %s', 'cleantalk'),
1020
- $apbct->stats['last_sfw_block']['ip'] ? $apbct->stats['last_sfw_block']['ip'] : __('unknown', 'cleantalk'),
1021
- $apbct->stats['last_sfw_block']['time'] ? date('M d Y H:i:s', $apbct->stats['last_sfw_block']['time']) : __('unknown', 'cleantalk')
1022
  );
1023
  echo '<br>';
1024
 
1025
  // SFW last update
1026
  $sfw_netwoks_amount = $wpdb->get_results("SELECT count(*) AS cnt FROM `".$wpdb->prefix."cleantalk_sfw`", ARRAY_A);
1027
  printf(
1028
- __('SpamFireWall was updated %s. Now contains %s entries.', 'cleantalk'),
1029
- $apbct->stats['sfw']['last_update_time'] ? date('M d Y H:i:s', $apbct->stats['sfw']['last_update_time']) : __('unknown', 'cleantalk'),
1030
- isset($sfw_netwoks_amount[0]['cnt']) ? $sfw_netwoks_amount[0]['cnt'] : __('unknown', 'cleantalk')
1031
  );
1032
  echo '<br>';
1033
 
1034
  // SFW last sent logs
1035
  printf(
1036
- __('SpamFireWall sent %s events at %s.', 'cleantalk'),
1037
- $apbct->stats['sfw']['last_send_amount'] ? $apbct->stats['sfw']['last_send_amount'] : __('unknown', 'cleantalk'),
1038
- $apbct->stats['sfw']['last_send_time'] ? date('M d Y H:i:s', $apbct->stats['sfw']['last_send_time']) : __('unknown', 'cleantalk')
1039
  );
1040
  echo '<br>';
1041
 
@@ -1043,7 +1043,7 @@ function apbct_settings__field__statistics() {
1043
  if ($apbct->connection_reports){
1044
 
1045
  if ($apbct->connection_reports['negative'] == 0){
1046
- _e('There are no failed connections to server.', 'cleantalk');
1047
  }else{
1048
  echo "<table id='negative_reports_table''>
1049
  <tr>
@@ -1070,11 +1070,11 @@ function apbct_settings__field__statistics() {
1070
  . ' value="ct_send_connection_report"'
1071
  . (!$apbct->settings['send_connection_reports'] ? ' disabled="disabled"' : '')
1072
  . '>'
1073
- .__('Send report', 'cleantalk')
1074
  .'</button>';
1075
  if (!$apbct->settings['send_connection_reports']){
1076
  echo '<br><br>';
1077
- _e('Please, enable "Send connection reports" setting to be able to send reports', 'cleantalk');
1078
  }
1079
  }
1080
 
@@ -1440,7 +1440,7 @@ function apbct_settings__validate($settings) {
1440
  // Key is not valid
1441
  }else{
1442
  $apbct->data['key_is_ok'] = false;
1443
- $apbct->error_add('key_invalid', __('Testing is failed. Please check the Access key.', 'cleantalk'));
1444
  }
1445
 
1446
  // WPMS Logic.
@@ -1574,16 +1574,16 @@ function apbct_settings__get__long_description(){
1574
 
1575
  $descriptions = array(
1576
  'white_label' => array(
1577
- 'title' => __( 'XSS check', 'cleantalk' ),
1578
- 'desc' => __( 'Cross-Site Scripting (XSS) — prevents malicious code to be executed/sent to any user. As a result malicious scripts can not get access to the cookie files, session tokens and any other confidential information browsers use and store. Such scripts can even overwrite content of HTML pages. CleanTalk WAF monitors for patterns of these parameters and block them.', 'cleantalk' ),
1579
  ),
1580
  'white_label__hoster_key' => array(
1581
- 'title' => __( 'SQL-injection check', 'cleantalk' ),
1582
- 'desc' => __( 'SQL Injection — one of the most popular ways to hack websites and programs that work with databases. It is based on injection of a custom SQL code into database queries. It could transmit data through GET, POST requests or cookie files in an SQL code. If a website is vulnerable and execute such injections then it would allow attackers to apply changes to the website\'s MySQL database.', 'cleantalk' ),
1583
  ),
1584
  'white_label__plugin_name' => array(
1585
- 'title' => __( 'Check uploaded files', 'cleantalk' ),
1586
- 'desc' => __( 'The option checks each uploaded file to a website for malicious code. If it\'s possible for visitors to upload files to a website, for instance a work resume, then attackers could abuse it and upload an infected file to execute it later and get access to your website.', 'cleantalk' ),
1587
  ),
1588
  );
1589
 
93
  'fields' => array(
94
  'spam_firewall' => array(
95
  'type' => 'checkbox',
96
+ 'title' => __('SpamFireWall', 'cleantalk-spam-protect'),
97
+ 'description' => __("This option allows to filter spam bots before they access website. Also reduces CPU usage on hosting server and accelerates pages load time.", 'cleantalk-spam-protect'),
98
  ),
99
  ),
100
  ),
101
 
102
  // Forms protection
103
  'forms_protection' => array(
104
+ 'title' => __('Forms to protect', 'cleantalk-spam-protect'),
105
  'default_params' => array(),
106
  'description' => '',
107
  'html_before' => '<hr><br>'
108
  .'<span id="ct_adv_showhide">'
109
  .'<a href="#" class="apbct_color--gray" onclick="event.preventDefault(); apbct_show_hide_elem(\'apbct_settings__davanced_settings\');">'
110
+ .__('Advanced settings', 'cleantalk-spam-protect')
111
  .'</a>'
112
  .'</span>'
113
  .'<div id="apbct_settings__davanced_settings" style="display: none;">',
114
  'html_after' => '',
115
  'fields' => array(
116
  'registrations_test' => array(
117
+ 'title' => __('Registration Forms', 'cleantalk-spam-protect'),
118
+ 'description' => __('WordPress, BuddyPress, bbPress, S2Member, WooCommerce.', 'cleantalk-spam-protect'),
119
  ),
120
  'comments_test' => array(
121
+ 'title' => __('Comments form', 'cleantalk-spam-protect'),
122
+ 'description' => __('WordPress, JetPack, WooCommerce.', 'cleantalk-spam-protect'),
123
  ),
124
  'contact_forms_test' => array(
125
+ 'title' => __('Contact forms', 'cleantalk-spam-protect'),
126
+ 'description' => __('Contact Form 7, Formidable forms, JetPack, Fast Secure Contact Form, WordPress Landing Pages, Gravity Forms.', 'cleantalk-spam-protect'),
127
  ),
128
  'general_contact_forms_test' => array(
129
+ 'title' => __('Custom contact forms', 'cleantalk-spam-protect'),
130
+ 'description' => __('Anti spam test for any WordPress themes or contacts forms.', 'cleantalk-spam-protect'),
131
  ),
132
  'search_test' => array(
133
+ 'title' => __('Test default Wordpress search form for spam', 'cleantalk-spam-protect'),
134
+ 'description' => __('Spam protection for Search form.', 'cleantalk-spam-protect')
135
  . (!$apbct->white_label || is_main_site()
136
+ ? sprintf(__('Read more about %sspam protection for Search form%s on our blog. “noindex” tag will be placed in meta derictive on search page.', 'cleantalk-spam-protect'),
137
  '<a href="https://blog.cleantalk.org/how-to-protect-website-search-from-spambots/" target="_blank">',
138
  '</a>'
139
  )
141
  )
142
  ),
143
  'check_external' => array(
144
+ 'title' => __('Protect external forms', 'cleantalk-spam-protect'),
145
+ 'description' => __('Turn this option on to protect forms on your WordPress that send data to third-part servers (like MailChimp).', 'cleantalk-spam-protect'),
146
  'childrens' => array('check_external__capture_buffer'),
147
  ),
148
  'check_external__capture_buffer' => array(
149
+ 'title' => __('Capture buffer', 'cleantalk-spam-protect'),
150
+ 'description' => __('This setting gives you more sophisticated and strengthened protection for external forms. But it could break plugins which use a buffer like Ninja Forms.', 'cleantalk-spam-protect'),
151
  'class' => 'apbct_settings-field_wrapper--sub',
152
  'parent' => 'check_external',
153
  ),
154
  'check_internal' => array(
155
+ 'title' => __('Protect internal forms', 'cleantalk-spam-protect'),
156
+ 'description' => __('This option will enable protection for custom (hand-made) AJAX forms with PHP scripts handlers on your WordPress.', 'cleantalk-spam-protect'),
157
  ),
158
  ),
159
  ),
160
 
161
  // Comments and Messages
162
  'wc' => array(
163
+ 'title' => __('WooCommerce', 'cleantalk-spam-protect'),
164
  'fields' => array(
165
  'wc_checkout_test' => array(
166
+ 'title' => __('WooCommerce checkout form', 'cleantalk-spam-protect'),
167
+ 'description' => __('Anti spam test for WooCommerce checkout form.', 'cleantalk-spam-protect'),
168
  'childrens' => array('wc_register_from_order')
169
  ),
170
  'wc_register_from_order' => array(
171
+ 'title' => __('Spam test for registration during checkout', 'cleantalk-spam-protect'),
172
+ 'description' => __('Enable anti spam test for registration process which during woocommerce\'s checkout.', 'cleantalk-spam-protect'),
173
  'parent' => 'wc_checkout_test',
174
  'class' => 'apbct_settings-field_wrapper--sub',
175
  'reverse_trigger' => true
179
 
180
  // Comments and Messages
181
  'comments_and_messages' => array(
182
+ 'title' => __('Comments and Messages', 'cleantalk-spam-protect'),
183
  'fields' => array(
184
  'disable_comments__all' => array(
185
+ 'title' => __( 'Disable all comments', 'cleantalk-spam-protect'),
186
+ 'description' => __( 'Disabling comments for all types of content.', 'cleantalk-spam-protect'),
187
  'childrens' => array(
188
  'disable_comments__posts',
189
  'disable_comments__pages',
195
  ),
196
  ),
197
  'disable_comments__posts' => array(
198
+ 'title' => __( 'Disable comments for all posts', 'cleantalk-spam-protect'),
199
  'class' => 'apbct_settings-field_wrapper--sub',
200
  'parent' => 'disable_comments__all',
201
  'reverse_trigger' => true,
202
  ),
203
  'disable_comments__pages' => array(
204
+ 'title' => __( 'Disable comments for all pages', 'cleantalk-spam-protect'),
205
  'class' => 'apbct_settings-field_wrapper--sub',
206
  'parent' => 'disable_comments__all',
207
  'reverse_trigger' => true,
208
  ),
209
  'disable_comments__media' => array(
210
+ 'title' => __( 'Disable comments for all media', 'cleantalk-spam-protect'),
211
  'class' => 'apbct_settings-field_wrapper--sub',
212
  'parent' => 'disable_comments__all',
213
  'reverse_trigger' => true,
214
  ),
215
  'bp_private_messages' => array(
216
+ 'title' => __('BuddyPress Private Messages', 'cleantalk-spam-protect'),
217
+ 'description' => __('Check buddyPress private messages.', 'cleantalk-spam-protect'),
218
  ),
219
  'remove_old_spam' => array(
220
+ 'title' => __('Automatically delete spam comments', 'cleantalk-spam-protect'),
221
+ 'description' => sprintf(__('Delete spam comments older than %d days.', 'cleantalk-spam-protect'), $apbct->data['spam_store_days']),
222
  ),
223
  'remove_comments_links' => array(
224
+ 'title' => __('Remove links from approved comments', 'cleantalk-spam-protect'),
225
+ 'description' => __('Remove links from approved comments. Replace it with "[Link deleted]"', 'cleantalk-spam-protect'),
226
  ),
227
  'show_check_links' => array(
228
+ 'title' => __('Show links to check Emails, IPs for spam', 'cleantalk-spam-protect'),
229
+ 'description' => __('Shows little icon near IP addresses and Emails allowing you to check it via CleanTalk\'s database.', 'cleantalk-spam-protect'),
230
  'display' => !$apbct->white_label,
231
  ),
232
  'manage_comments_on_public_page' => array(
233
+ 'title' => __('Manage comments on public pages', 'cleantalk-spam-protect'),
234
+ 'description' => __('Allows administrators to manage comments on public post\'s pages with small interactive menu.', 'cleantalk-spam-protect'),
235
  'display' => !$apbct->white_label,
236
  ),
237
  ),
239
 
240
  // Data Processing
241
  'data_processing' => array(
242
+ 'title' => __('Data Processing', 'cleantalk-spam-protect'),
243
  'fields' => array(
244
  'protect_logged_in' => array(
245
+ 'title' => __("Protect logged in Users", 'cleantalk-spam-protect'),
246
+ 'description' => __('Turn this option on to check for spam any submissions (comments, contact forms and etc.) from registered Users.', 'cleantalk-spam-protect'),
247
  ),
248
  'check_comments_number' => array(
249
+ 'title' => __("Don't check trusted user's comments", 'cleantalk-spam-protect'),
250
+ 'description' => sprintf(__("Don't check comments for users with above %d comments.", 'cleantalk-spam-protect'), defined('CLEANTALK_CHECK_COMMENTS_NUMBER') ? CLEANTALK_CHECK_COMMENTS_NUMBER : 3),
251
  ),
252
  'use_ajax' => array(
253
+ 'title' => __('Use AJAX for JavaScript check', 'cleantalk-spam-protect'),
254
+ 'description' => __('Options helps protect WordPress against spam with any caching plugins. Turn this option on to avoid issues with caching plugins.', 'cleantalk-spam-protect'),
255
  ),
256
  'use_static_js_key' => array(
257
+ 'title' => __('Use static keys for JS check.', 'cleantalk-spam-protect'),
258
+ 'description' => __('Could help if you have cache for AJAX requests and you are dealing with false positives. Slightly decreases protection quality. Auto - Static key will be used if caching plugin is spotted.', 'cleantalk-spam-protect'),
259
  'options' => array(
260
  array('val' => 1, 'label' => __('On'), ),
261
  array('val' => 0, 'label' => __('Off'), ),
263
  ),
264
  ),
265
  'general_postdata_test' => array(
266
+ 'title' => __('Check all post data', 'cleantalk-spam-protect'),
267
+ 'description' => __('Check all POST submissions from website visitors. Enable this option if you have spam misses on website.', 'cleantalk-spam-protect')
268
  .(!$apbct->white_label
269
+ ? __(' Or you don`t have records about missed spam here:', 'cleantalk-spam-protect') . '&nbsp;' . '<a href="https://cleantalk.org/my/?user_token='.$apbct->user_token.'&utm_source=wp-backend&utm_medium=admin-bar&cp_mode=antispam" target="_blank">' . __('CleanTalk dashboard', 'cleantalk-spam-protect') . '</a>.'
270
  : ''
271
  )
272
+ .'<br />' . __('СAUTION! Option can catch POST requests in WordPress backend', 'cleantalk-spam-protect'),
273
  ),
274
  'set_cookies' => array(
275
+ 'title' => __("Set cookies", 'cleantalk-spam-protect'),
276
+ 'description' => __('Turn this option off to deny plugin generates any cookies on website front-end. This option is helpful if you use Varnish. But most of contact forms will not be protected if the option is turned off! <b>Warning: We strongly recommend you to enable this otherwise it could cause false positives spam detection.</b>', 'cleantalk-spam-protect'),
277
  'childrens' => array('set_cookies__sessions'),
278
  ),
279
  'set_cookies__sessions' => array(
280
+ 'title' => __('Use alternative mechanism for cookies', 'cleantalk-spam-protect'),
281
+ 'description' => __('Doesn\'t use cookie or PHP sessions. Collect data for all types of bots.', 'cleantalk-spam-protect'),
282
  'parent' => 'set_cookies',
283
  'class' => 'apbct_settings-field_wrapper--sub',
284
  ),
285
  'ssl_on' => array(
286
+ 'title' => __("Use SSL", 'cleantalk-spam-protect'),
287
+ 'description' => __('Turn this option on to use encrypted (SSL) connection with servers.', 'cleantalk-spam-protect'),
288
  ),
289
  'use_buitin_http_api' => array(
290
+ 'title' => __("Use Wordpress HTTP API", 'cleantalk-spam-protect'),
291
+ 'description' => __('Alternative way to connect the Cloud. Use this if you have connection problems.', 'cleantalk-spam-protect'),
292
  ),
293
  ),
294
  ),
295
 
296
  // Exclusions
297
  'exclusions' => array(
298
+ 'title' => __('Exclusions', 'cleantalk-spam-protect'),
299
  'fields' => array(
300
  'exclusions__urls' => array(
301
  'type' => 'text',
302
+ 'title' => __('URL exclusions', 'cleantalk-spam-protect'),
303
+ 'description' => __('You could type here URL you want to exclude. Use comma as separator.', 'cleantalk-spam-protect'),
304
  ),
305
  'exclusions__urls__use_regexp' => array(
306
  'type' => 'checkbox',
307
+ 'title' => __('Use Regular Expression in URL Exclusions', 'cleantalk-spam-protect'),
308
  ),
309
  'exclusions__fields' => array(
310
  'type' => 'text',
311
+ 'title' => __('Field name exclusions', 'cleantalk-spam-protect'),
312
+ 'description' => __('You could type here fields names you want to exclude. Use comma as separator.', 'cleantalk-spam-protect'),
313
  ),
314
  'exclusions__fields__use_regexp' => array(
315
  'type' => 'checkbox',
316
+ 'title' => __('Use Regular Expression in Field Exclusions', 'cleantalk-spam-protect'),
317
  ),
318
  'exclusions__roles' => array(
319
  'type' => 'select',
320
  'multiple' => true,
321
  'options_callback' => 'apbct_get_all_roles',
322
  'options_callback_params' => array(true),
323
+ 'description' => __('Roles which bypass spam test. Hold CTRL to select multiple roles.', 'cleantalk-spam-protect'),
324
  ),
325
  ),
326
  ),
327
 
328
  // Admin bar
329
  'admin_bar' => array(
330
+ 'title' => __('Admin bar', 'cleantalk-spam-protect'),
331
  'default_params' => array(),
332
  'description' => '',
333
  'html_before' => '',
334
  'html_after' => '',
335
  'fields' => array(
336
  'show_adminbar' => array(
337
+ 'title' => __('Show statistics in admin bar', 'cleantalk-spam-protect'),
338
+ 'description' => __('Show/hide icon in top level menu in WordPress backend. The number of submissions is being counted for past 24 hours.', 'cleantalk-spam-protect'),
339
  'childrens' => array('all_time_counter','daily_counter','sfw_counter'),
340
  ),
341
  'all_time_counter' => array(
342
+ 'title' => __('Show All-time counter', 'cleantalk-spam-protect'),
343
+ 'description' => __('Display all-time requests counter in the admin bar. Counter displays number of requests since plugin installation.', 'cleantalk-spam-protect'),
344
  'parent' => 'show_adminbar',
345
  'class' => 'apbct_settings-field_wrapper--sub',
346
  ),
347
  'daily_counter' => array(
348
+ 'title' => __('Show 24 hours counter', 'cleantalk-spam-protect'),
349
+ 'description' => __('Display daily requests counter in the admin bar. Counter displays number of requests of the past 24 hours.', 'cleantalk-spam-protect'),
350
  'parent' => 'show_adminbar',
351
  'class' => 'apbct_settings-field_wrapper--sub',
352
  ),
353
  'sfw_counter' => array(
354
+ 'title' => __('SpamFireWall counter', 'cleantalk-spam-protect'),
355
+ 'description' => __('Display SpamFireWall requests in the admin bar. Counter displays number of requests since plugin installation.', 'cleantalk-spam-protect'),
356
  'parent' => 'show_adminbar',
357
  'class' => 'apbct_settings-field_wrapper--sub',
358
  ),
365
  'fields' => array(
366
  'collect_details' => array(
367
  'type' => 'checkbox',
368
+ 'title' => __('Collect details about browsers', 'cleantalk-spam-protect'),
369
+ 'description' => __("Checking this box you allow plugin store information about screen size and browser plugins of website visitors. The option in a beta state.", 'cleantalk-spam-protect'),
370
  ),
371
  'send_connection_reports' => array(
372
  'type' => 'checkbox',
373
+ 'title' => __('Send connection reports', 'cleantalk-spam-protect'),
374
+ 'description' => __("Checking this box you allow plugin to send the information about your connection. The option in a beta state.", 'cleantalk-spam-protect'),
375
  ),
376
  'async_js' => array(
377
  'type' => 'checkbox',
378
+ 'title' => __('Async JavaScript loading', 'cleantalk-spam-protect'),
379
+ 'description' => __('Use async loading for scripts. Warning: This could reduce filtration quality.', 'cleantalk-spam-protect'),
380
  ),
381
  'gdpr_enabled' => array(
382
  'type' => 'checkbox',
383
+ 'title' => __('Allow to add GDPR notice via shortcode', 'cleantalk-spam-protect'),
384
+ 'description' => __(' Adds small checkbox under your website form. To add it you should use the shortcode on the form\'s page: [cleantalk_gdpr_form id="FORM_ID"]', 'cleantalk-spam-protect'),
385
  'childrens' => array('gdpr_text'),
386
  ),
387
  'gdpr_text' => array(
388
  'type' => 'text',
389
+ 'title' => __('GDPR text notice', 'cleantalk-spam-protect'),
390
+ 'description' => __('This text will be added as a description to the GDPR checkbox.', 'cleantalk-spam-protect'),
391
  'parent' => 'gdpr_enabled',
392
  'class' => 'apbct_settings-field_wrapper--sub',
393
  ),
394
  'store_urls' => array(
395
  'type' => 'checkbox',
396
+ 'title' => __('Store visited URLs', 'cleantalk-spam-protect'),
397
+ 'description' => __("Plugin stores last 10 visited URLs (HTTP REFFERERS) before visitor submits form on the site. You can see stored visited URLS for each visitor in your Dashboard. Turn the option on to improve Anti-Spam protection.", 'cleantalk-spam-protect'),
398
  'childrens' => array('store_urls__sessions'),
399
  ),
400
  'store_urls__sessions' => array(
401
  'type' => 'checkbox',
402
+ 'title' => __('Use cookies less sessions', 'cleantalk-spam-protect'),
403
+ 'description' => __('Doesn\'t use cookie or PHP sessions. Collect data for all types of bots.', 'cleantalk-spam-protect'),
404
  'parent' => 'store_urls',
405
  'class' => 'apbct_settings-field_wrapper--sub',
406
  ),
407
  'comment_notify' => array(
408
  'type' => 'checkbox',
409
+ 'title' => __('Notify users with selected roles about new approved comments. Hold CTRL to select multiple roles.', 'cleantalk-spam-protect'),
410
+ 'description' => sprintf(__("If enabled, overrides similar Wordpress %sdiscussion settings%s.", 'cleantalk-spam-protect'), '<a href="options-discussion.php">','</a>'),
411
  'childrens' => array('comment_notify__roles'),
412
  ),
413
  'comment_notify__roles' => array(
420
  ),
421
  'complete_deactivation' => array(
422
  'type' => 'checkbox',
423
+ 'title' => __('Complete deactivation', 'cleantalk-spam-protect'),
424
+ 'description' => __('Leave no trace in the system after deactivation.', 'cleantalk-spam-protect'),
425
  ),
426
 
427
  ),
438
  'fields' => array(
439
  'white_label' => array(
440
  'type' => 'checkbox',
441
+ 'title' => __('Enable White Label Mode', 'cleantalk-spam-protect'),
442
+ 'description' => sprintf(__("Learn more information %shere%s.", 'cleantalk-spam-protect'), '<a target="_blank" href="https://cleantalk.org/ru/help/hosting-white-label">', '</a>'),
443
  'childrens' => array( 'white_label__hoster_key', 'white_label__plugin_name', 'allow_custom_key', ),
444
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
445
  'network' => true,
446
  ),
447
  'white_label__hoster_key' => array(
448
+ 'title' => __('Hoster API Key', 'cleantalk-spam-protect'),
449
+ 'description' => sprintf(__("You can get it in %sCleantalk's Control Panel%s", 'cleantalk-spam-protect'), '<a target="_blank" href="https://cleantalk.org/my/profile">', '</a>'),
450
  'type' => 'text',
451
  'parent' => 'white_label',
452
  'class' => 'apbct_settings-field_wrapper--sub',
454
  'required' => true,
455
  ),
456
  'white_label__plugin_name' => array(
457
+ 'title' => __('Plugin name', 'cleantalk-spam-protect'),
458
+ 'description' => sprintf(__("Specify plugin name. Leave empty for deafult %sAntispam by Cleantalk%s", 'cleantalk-spam-protect'), '<b>', '</b>'),
459
  'type' => 'text',
460
  'parent' => 'white_label',
461
  'class' => 'apbct_settings-field_wrapper--sub',
464
  ),
465
  'allow_custom_key' => array(
466
  'type' => 'checkbox',
467
+ 'title' => __('Allow users to use other key', 'cleantalk-spam-protect'),
468
+ 'description' => __('Allow users to use different Access key in their plugin settings on child blogs. They could use different CleanTalk account.', 'cleantalk-spam-protect')
469
  . (defined('CLEANTALK_ACCESS_KEY')
470
  ? ' <span style="color: red">'
471
+ . __('Constant <b>CLEANTALK_ACCESS_KEY</b> is set. All websites will use API key from this constant. Look into wp-config.php', 'cleantalk-spam-protect')
472
  . '<br>'
473
+ . __('You are not able to use white label mode while <b>CLEANTALK_ACCESS_KEY</b> is defined.', 'cleantalk-spam-protect')
474
  . '</span>'
475
  : ''
476
  ),
480
  ),
481
  'allow_custom_settings' => array(
482
  'type' => 'checkbox',
483
+ 'title' => __('Allow users to manage plugin settings', 'cleantalk-spam-protect'),
484
+ 'description' => __('Allow to change settings on child sites.', 'cleantalk-spam-protect'),
485
  'display' => APBCT_WPMS && is_main_site(),
486
  'network' => true,
487
  ),
488
  'use_settings_template' => array(
489
  'type' => 'checkbox',
490
+ 'title' => __('Use settings template', 'cleantalk-spam-protect'),
491
+ 'description' => __("Use the current settings template for child sites.", 'cleantalk-spam-protect'),
492
  'childrens' => array( 'use_settings_template_apply_for_new', 'use_settings_template_apply_for_current'),
493
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
494
  'network' => true,
495
  ),
496
  'use_settings_template_apply_for_new' => array(
497
  'type' => 'checkbox',
498
+ 'title' => __('Apply for newly added sites.', 'cleantalk-spam-protect'),
499
+ 'description' => __("The newly added site will have the same preset settings template.", 'cleantalk-spam-protect'),
500
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
501
  'parent' => 'use_settings_template',
502
  'class' => 'apbct_settings-field_wrapper--sub',
504
  ),
505
  'use_settings_template_apply_for_current' => array(
506
  'type' => 'checkbox',
507
+ 'title' => __('Apply for current sites.', 'cleantalk-spam-protect'),
508
+ 'description' => __("Apply current settings template for selected sites.", 'cleantalk-spam-protect'),
509
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
510
  'parent' => 'use_settings_template',
511
  'childrens' => array( 'use_settings_template_apply_for_current_list_sites'),
519
  'options_callback_params' => array(true),
520
  'class' => 'apbct_settings-field_wrapper--sub',
521
  'parent' => 'use_settings_template_apply_for_current',
522
+ 'description' => __('Sites to apply settings. Hold CTRL to select multiple sites.', 'cleantalk-spam-protect'),
523
  'disabled' => defined('CLEANTALK_ACCESS_KEY'),
524
  'network' => true,
525
  ),
564
 
565
  foreach($apbct->settings_fields_in_groups as $group_name => $group){
566
 
567
+ add_settings_section('apbct_section__'.$group_name, '', 'apbct_section__'.$group_name, 'cleantalk-spam-protect');
568
 
569
  foreach($group['fields'] as $field_name => $field){
570
 
607
  global $apbct;
608
 
609
  // Title
610
+ echo '<h2 class="apbct_settings-title">'.__($apbct->plugin_name, 'cleantalk-spam-protect').'</h2>';
611
 
612
  // Subtitle for IP license
613
  if($apbct->moderate_ip)
614
+ echo '<h4 class="apbct_settings-subtitle apbct_color--gray">'. __('Hosting AntiSpam', 'cleantalk-spam-protect').'</h4>';
615
 
616
  echo '<form action="options.php" method="post">';
617
 
621
  if(!$apbct->white_label){
622
  echo '<div style="float: right; padding: 15px 15px 5px 15px; font-size: 13px; position: relative; background: #f1f1f1;">';
623
 
624
+ echo __('CleanTalk\'s tech support:', 'cleantalk-spam-protect')
625
  .'&nbsp;'
626
  .'<a target="_blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">Wordpress.org</a>.'
627
+ // .' <a href="https://community.cleantalk.org/viewforum.php?f=25" target="_blank">'.__("Tech forum", 'cleantalk-spam-protect').'</a>'
628
+ // .($user_token ? ", <a href='https://cleantalk.org/my/support?user_token=$user_token&cp_mode=antispam' target='_blank'>".__("Service support ", 'cleantalk-spam-protect').'</a>' : '').
629
  .'<br>';
630
+ echo __('Plugin Homepage at', 'cleantalk-spam-protect').' <a href="https://cleantalk.org" target="_blank">cleantalk.org</a>.<br/>';
631
+ echo '<span id="apbct_gdpr_open_modal" style="text-decoration: underline;">'.__('GDPR compliance', 'cleantalk-spam-protect').'</span><br/>';
632
+ echo __('Use s@cleantalk.org to test plugin in any WordPress form.', 'cleantalk-spam-protect').'<br>';
633
+ echo __('CleanTalk is registered Trademark. All rights reserved.', 'cleantalk-spam-protect').'<br/>';
634
  if($apbct->key_is_ok)
635
+ echo '<b style="display: inline-block; margin-top: 10px;">'.sprintf(__('Do you like CleanTalk? %sPost your feedback here%s.', 'cleantalk-spam-protect'), '<a href="https://wordpress.org/support/plugin/cleantalk-spam-protect/reviews/#new-post" target="_blank">', '</a>').'</b><br />';
636
  apbct_admin__badge__get_premium();
637
  echo '<div id="gdpr_dialog" style="display: none; padding: 7px;">';
638
  apbct_settings_show_gdpr_text('print');
647
  .'<br>'
648
  .'<span>'
649
  .sprintf(
650
+ __( '%s has blocked <b>%s</b> spam.', 'cleantalk-spam-protect'),
651
  $apbct->plugin_name,
652
  number_format($apbct->spam_count, 0, ',', ' ')
653
  )
659
  if(!$apbct->white_label){
660
  // CP button
661
  echo '<a class="cleantalk_link cleantalk_link-manual" target="__blank" href="https://cleantalk.org/my?user_token='.$apbct->user_token.'&cp_mode=antispam">'
662
+ .__('Click here to get anti-spam statistics', 'cleantalk-spam-protect')
663
  .'</a>';
664
  echo '&nbsp;&nbsp;';
665
  // Support button
666
+ echo '<a class="cleantalk_link cleantalk_link-auto" target="__blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">'.__('Support', 'cleantalk-spam-protect').'</a>';
667
  echo '<br>'
668
  .'<br>';
669
  }
704
  $site_url = get_site_option('siteurl');
705
  $site_url = preg_match( '/\/$/', $site_url ) ? $site_url : $site_url . '/';
706
  $link = $site_url . 'wp-admin/options-general.php?page=cleantalk';
707
+ printf("<h2>" . __("Please, enter the %splugin settings%s in main site dashboard.", 'cleantalk-spam-protect') . "</h2>", "<a href='$link'>", "</a>");
708
  return;
709
  }
710
  }
723
 
724
  $error_texts = array(
725
  // Misc
726
+ 'key_invalid' => __('Error occurred while API key validating. Error: ', 'cleantalk-spam-protect'),
727
+ 'key_get' => __('Error occurred while automatically gettings access key. Error: ', 'cleantalk-spam-protect'),
728
+ 'sfw_send_logs' => __('Error occurred while sending SpamFireWall logs. Error: ', 'cleantalk-spam-protect'),
729
+ 'sfw_update' => __('Error occurred while updating SpamFireWall local base. Error: ' , 'cleantalk-spam-protect'),
730
+ 'account_check' => __('Error occurred while checking account status. Error: ', 'cleantalk-spam-protect'),
731
+ 'api' => __('Error occurred while excuting API call. Error: ', 'cleantalk-spam-protect'),
732
 
733
  // Validating settings
734
  'settings_validate' => 'Validate Settings',
736
  'exclusions_fields' => 'Field Exclusions',
737
 
738
  // Unknown
739
+ 'unknown' => __('Unknown error. Error: ', 'cleantalk-spam-protect'),
740
  );
741
 
742
  $errors_out = array();
767
 
768
  if(!empty($errors_out)){
769
  $out .= '<div id="apbctTopWarning" class="error" style="position: relative;">'
770
+ .'<h3 style="display: inline-block;">'.__('Errors:', 'cleantalk-spam-protect').'</h3>';
771
  foreach($errors_out as $value){
772
  $out .= '<h4>'.$value.'</h4>';
773
  }
774
  $out .= !$apbct->white_label
775
+ ? '<h4 style="text-align: unset;">'.sprintf(__('You can get support any time here: %s.', 'cleantalk-spam-protect'), '<a target="blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">https://wordpress.org/support/plugin/cleantalk-spam-protect</a>').'</h4>'
776
  : '';
777
  $out .= '</div>';
778
  }
848
 
849
  print '<div class="apbct_settings-field_wrapper" style="color:'.$color.'">';
850
 
851
+ print '<h2>'.__('Protection is active', 'cleantalk-spam-protect').'</h2>';
852
 
853
+ echo '<img class="apbct_status_icon" src="'.($apbct->settings['registrations_test'] == 1 ? $img : $img_no).'"/>'.__('Registration forms', 'cleantalk-spam-protect');
854
+ echo '<img class="apbct_status_icon" src="'.($apbct->settings['comments_test'] == 1 ? $img : $img_no).'"/>'.__('Comments forms', 'cleantalk-spam-protect');
855
+ echo '<img class="apbct_status_icon" src="'.($apbct->settings['contact_forms_test'] == 1 ? $img : $img_no).'"/>'.__('Contact forms', 'cleantalk-spam-protect');
856
+ echo '<img class="apbct_status_icon" src="'.($apbct->settings['general_contact_forms_test'] == 1 ? $img : $img_no).'"/>'.__('Custom contact forms', 'cleantalk-spam-protect');
857
  if(!$apbct->white_label || is_main_site())
858
  echo '<img class="apbct_status_icon" src="'.($apbct->data['moderate'] == 1 ? $img : $img_no).'"/>'
859
+ .'<a style="color: black" href="https://blog.cleantalk.org/real-time-email-address-existence-validation/">'.__('Validate email for existence', 'cleantalk-spam-protect').'</a>';
860
+ echo '<img class="apbct_status_icon" id = "sfw_status_icon" style = "width:16px;height:16px;" src="'.($apbct->settings['spam_firewall'] == 1 ? ( $apbct->stats['sfw']['update_in_process'] == true ? $preloader : $img) : $img_no).'"/>'.__('SpamFireWall', 'cleantalk-spam-protect');
861
  // Autoupdate status
862
  if($apbct->notice_auto_update && (!$apbct->white_label || is_main_site())){
863
+ echo '<img class="apbct_status_icon" src="'.($apbct->auto_update == 1 ? $img : ($apbct->auto_update == -1 ? $img_no : $img_no_gray)).'"/>'.__('Auto update', 'cleantalk-spam-protect')
864
  .' <sup><a href="https://cleantalk.org/help/cleantalk-auto-update" target="_blank">?</a></sup>';
865
  }
866
 
867
  // WooCommerce
868
  if(class_exists('WooCommerce'))
869
+ echo '<img class="apbct_status_icon" src="'.($apbct->settings['wc_checkout_test'] == 1 ? $img : $img_no).'"/>'.__('WooCommerce checkout form', 'cleantalk-spam-protect');
870
  if($apbct->moderate_ip)
871
  print "<br /><br />The anti-spam service is paid by your hosting provider. License #".$apbct->data['ip_license'].".<br />";
872
 
884
 
885
  // Using key from Main site, or from CLEANTALK_ACCESS_KEY constant
886
  if(APBCT_WPMS && !is_main_site() && (!$apbct->allow_custom_key || defined('CLEANTALK_ACCESS_KEY'))){
887
+ _e('<h3>Key is provided by Super Admin.</h3>', 'cleantalk-spam-protect');
888
  return;
889
  }
890
 
891
+ echo '<label class="apbct_settings__label" for="cleantalk_apkey">' . __('Access key', 'cleantalk-spam-protect') . '</label>';
892
 
893
  echo '<input
894
  id="apbct_setting_apikey"
903
  . '"
904
  key="' . $apbct->api_key . '"
905
  size="20"
906
+ placeholder="' . __('Enter the key', 'cleantalk-spam-protect') . '"'
907
  . ' />';
908
 
909
  // Show account name associated with key
910
  if(!empty($apbct->data['account_name_ob'])){
911
  echo '<div class="apbct_display--none">'
912
+ . sprintf( __('Account at cleantalk.org is %s.', 'cleantalk-spam-protect'),
913
  '<b>'.$apbct->data['account_name_ob'].'</b>'
914
  )
915
  . '</div>';
918
  // Show key button
919
  if((apbct_api_key__is_correct($apbct->api_key) && $apbct->key_is_ok)){
920
  echo '<a id="apbct_showApiKey" class="ct_support_link" style="display: block" href="#">'
921
+ . __('Show the access key', 'cleantalk-spam-protect')
922
  . '</a>';
923
 
924
  // "Auto Get Key" buttons. License agreement
929
  // Auto get key
930
  if(!$apbct->ip_license){
931
  echo '<button class="cleantalk_link cleantalk_link-manual apbct_setting---get_key_auto" name="submit" type="submit" value="get_key_auto">'
932
+ .__('Get Access Key Automatically', 'cleantalk-spam-protect')
933
  .'</button>';
934
  echo '<input type="hidden" id="ct_admin_timezone" name="ct_admin_timezone" value="null" />';
935
  echo '<br />';
937
  }
938
 
939
  // Warnings and GDPR
940
+ printf( __('Admin e-mail (%s) will be used for registration, if you want to use other email please %sGet Access Key Manually%s.', 'cleantalk-spam-protect'),
941
  ct_get_admin_email(),
942
  '<a class="apbct_color--gray" target="__blank" href="'
943
  . sprintf( 'https://cleantalk.org/register?platform=wordpress&email=%s&website=%s',
953
  echo '<div>';
954
  echo '<input checked type="checkbox" id="license_agreed" onclick="apbctSettingsDependencies(\'apbct_setting---get_key_auto\');"/>';
955
  echo '<label for="spbc_license_agreed">';
956
+ printf( __('I accept %sLicense Agreement%s.', 'cleantalk-spam-protect'),
957
  '<a class = "apbct_color--gray" href="https://cleantalk.org/publicoffer" target="_blank">',
958
  '</a>'
959
  );
972
  $links = apply_filters(
973
  'apbct_settings_action_buttons',
974
  array(
975
+ '<a href="edit-comments.php?page=ct_check_spam" class="ct_support_link">' . __('Check comments for spam', 'cleantalk-spam-protect') . '</a>',
976
+ '<a href="users.php?page=ct_check_users" class="ct_support_link">' . __('Check users for spam', 'cleantalk-spam-protect') . '</a>',
977
+ '<a href="#" class="ct_support_link" onclick="apbct_show_hide_elem(\'apbct_statistics\')">' . __('Statistics & Reports', 'cleantalk-spam-protect') . '</a>',
978
  )
979
  );
980
 
999
 
1000
  // Last request
1001
  printf(
1002
+ __('Last spam check request to %s server was at %s.', 'cleantalk-spam-protect'),
1003
+ $apbct->stats['last_request']['server'] ? $apbct->stats['last_request']['server'] : __('unknown', 'cleantalk-spam-protect'),
1004
+ $apbct->stats['last_request']['time'] ? date('M d Y H:i:s', $apbct->stats['last_request']['time']) : __('unknown', 'cleantalk-spam-protect')
1005
  );
1006
  echo '<br>';
1007
 
1008
  // Avarage time request
1009
  printf(
1010
+ __('Average request time for past 7 days: %s seconds.', 'cleantalk-spam-protect'),
1011
  $apbct->stats['requests'][min(array_keys($apbct->stats['requests']))]['average_time']
1012
  ? round($apbct->stats['requests'][min(array_keys($apbct->stats['requests']))]['average_time'], 3)
1013
+ : __('unknown', 'cleantalk-spam-protect')
1014
  );
1015
  echo '<br>';
1016
 
1017
  // SFW last die
1018
  printf(
1019
+ __('Last time SpamFireWall was triggered for %s IP at %s', 'cleantalk-spam-protect'),
1020
+ $apbct->stats['last_sfw_block']['ip'] ? $apbct->stats['last_sfw_block']['ip'] : __('unknown', 'cleantalk-spam-protect'),
1021
+ $apbct->stats['last_sfw_block']['time'] ? date('M d Y H:i:s', $apbct->stats['last_sfw_block']['time']) : __('unknown', 'cleantalk-spam-protect')
1022
  );
1023
  echo '<br>';
1024
 
1025
  // SFW last update
1026
  $sfw_netwoks_amount = $wpdb->get_results("SELECT count(*) AS cnt FROM `".$wpdb->prefix."cleantalk_sfw`", ARRAY_A);
1027
  printf(
1028
+ __('SpamFireWall was updated %s. Now contains %s entries.', 'cleantalk-spam-protect'),
1029
+ $apbct->stats['sfw']['last_update_time'] ? date('M d Y H:i:s', $apbct->stats['sfw']['last_update_time']) : __('unknown', 'cleantalk-spam-protect'),
1030
+ isset($sfw_netwoks_amount[0]['cnt']) ? $sfw_netwoks_amount[0]['cnt'] : __('unknown', 'cleantalk-spam-protect')
1031
  );
1032
  echo '<br>';
1033
 
1034
  // SFW last sent logs
1035
  printf(
1036
+ __('SpamFireWall sent %s events at %s.', 'cleantalk-spam-protect'),
1037
+ $apbct->stats['sfw']['last_send_amount'] ? $apbct->stats['sfw']['last_send_amount'] : __('unknown', 'cleantalk-spam-protect'),
1038
+ $apbct->stats['sfw']['last_send_time'] ? date('M d Y H:i:s', $apbct->stats['sfw']['last_send_time']) : __('unknown', 'cleantalk-spam-protect')
1039
  );
1040
  echo '<br>';
1041
 
1043
  if ($apbct->connection_reports){
1044
 
1045
  if ($apbct->connection_reports['negative'] == 0){
1046
+ _e('There are no failed connections to server.', 'cleantalk-spam-protect');
1047
  }else{
1048
  echo "<table id='negative_reports_table''>
1049
  <tr>
1070
  . ' value="ct_send_connection_report"'
1071
  . (!$apbct->settings['send_connection_reports'] ? ' disabled="disabled"' : '')
1072
  . '>'
1073
+ .__('Send report', 'cleantalk-spam-protect')
1074
  .'</button>';
1075
  if (!$apbct->settings['send_connection_reports']){
1076
  echo '<br><br>';
1077
+ _e('Please, enable "Send connection reports" setting to be able to send reports', 'cleantalk-spam-protect');
1078
  }
1079
  }
1080
 
1440
  // Key is not valid
1441
  }else{
1442
  $apbct->data['key_is_ok'] = false;
1443
+ $apbct->error_add('key_invalid', __('Testing is failed. Please check the Access key.', 'cleantalk-spam-protect'));
1444
  }
1445
 
1446
  // WPMS Logic.
1574
 
1575
  $descriptions = array(
1576
  'white_label' => array(
1577
+ 'title' => __( 'XSS check', 'cleantalk-spam-protect'),
1578
+ 'desc' => __( 'Cross-Site Scripting (XSS) — prevents malicious code to be executed/sent to any user. As a result malicious scripts can not get access to the cookie files, session tokens and any other confidential information browsers use and store. Such scripts can even overwrite content of HTML pages. CleanTalk WAF monitors for patterns of these parameters and block them.', 'cleantalk-spam-protect'),
1579
  ),
1580
  'white_label__hoster_key' => array(
1581
+ 'title' => __( 'SQL-injection check', 'cleantalk-spam-protect'),
1582
+ 'desc' => __( 'SQL Injection — one of the most popular ways to hack websites and programs that work with databases. It is based on injection of a custom SQL code into database queries. It could transmit data through GET, POST requests or cookie files in an SQL code. If a website is vulnerable and execute such injections then it would allow attackers to apply changes to the website\'s MySQL database.', 'cleantalk-spam-protect'),
1583
  ),
1584
  'white_label__plugin_name' => array(
1585
+ 'title' => __( 'Check uploaded files', 'cleantalk-spam-protect'),
1586
+ 'desc' => __( 'The option checks each uploaded file to a website for malicious code. If it\'s possible for visitors to upload files to a website, for instance a work resume, then attackers could abuse it and upload an infected file to execute it later and get access to your website.', 'cleantalk-spam-protect'),
1587
  ),
1588
  );
1589
 
inc/cleantalk-widget.php CHANGED
@@ -19,10 +19,10 @@ class cleantalk_widget extends WP_Widget
19
  'cleantalk_widget',
20
 
21
  // Widget name will appear in UI
22
- __('CleanTalk Widget', 'cleantalk'),
23
 
24
  // Widget description
25
- array( 'description' => __( 'CleanTalk widget', 'cleantalk' ), )
26
  );
27
  }
28
 
@@ -32,7 +32,7 @@ class cleantalk_widget extends WP_Widget
32
  {
33
  global $apbct;
34
 
35
- $instance['title'] = isset( $instance['title'] ) ? $instance['title'] : __( 'Spam blocked', 'cleantalk' );
36
  $title = apply_filters( 'widget_title', $instance['title'] );
37
  echo $args['before_widget'];
38
 
@@ -70,8 +70,8 @@ class cleantalk_widget extends WP_Widget
70
 
71
  // This is where you run the code and display the output
72
  echo '<div style="width:auto;">'
73
- .'<a href="https://cleantalk.org'.(!empty($instance['refid']) ? '?pid='.$instance['refid'] : '').'" target="_blank" title="'.__('CleanTalk\'s main page', 'cleantalk').'" style="'.$a_style.'">'
74
- .'<strong style="'.$strong_style.'"><b>'.$blocked.'</b> '.__('spam', 'cleantalk').'</strong> '.__('blocked by', 'cleantalk').' <strong>CleanTalk</strong>'
75
  .'</a>'
76
  .'</div>';
77
 
@@ -83,27 +83,27 @@ class cleantalk_widget extends WP_Widget
83
  {
84
  // Widget admin form
85
 
86
- $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : $title = __( 'Spam blocked', 'cleantalk' );
87
  $style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : $style = 'ct_style';
88
  $refid = isset( $instance[ 'refid' ] ) ? $instance[ 'refid' ] : $refid = '';
89
  // Title field
90
  echo '<p>'
91
- .'<label for="' . $this->get_field_id( 'title' ) . '">' . __( 'Title:', 'cleantalk' ) . '</label>'
92
  .'<input class="widefat" id="'.$this->get_field_id( 'title' ).'" name="'.$this->get_field_name( 'title' ).'" type="text" value="'.esc_attr( $title ).'" />'
93
  .'</p>';
94
  // Style
95
  echo '<p>'
96
- .'<label for="' . $this->get_field_id( 'style' ) . '">' . __( 'Style:', 'cleantalk' ) . '</label>'
97
  .'<select id="'.$this->get_field_id( 'style' ).'" class="widefat" name="'.$this->get_field_name( 'style' ).'">'
98
- .'<option '.($style == 'cleantalk' ? 'selected' : '').' value="cleantalk">'.__('CleanTalk\'s Style', 'cleantalk').'</option>'
99
- .'<option '.($style == 'light' ? 'selected' : '').' value="light">'.__('Light', 'cleantalk').'</option>'
100
- .'<option '.($style == 'ex_light' ? 'selected' : '').' value="ex_light">'.__('Extremely Light', 'cleantalk').'</option>'
101
- .'<option '.($style == 'dark' ? 'selected' : '').' value="dark">'.__('Dark', 'cleantalk').'</option>'
102
  .'</select>'
103
  .'</p>';
104
  // Ref ID
105
  echo '<p>'
106
- .'<label for="' . $this->get_field_id( 'refid' ) . '">' . __( 'Referal link ID:', 'cleantalk' ) . '</label>'
107
  .'<input class="widefat" id="'.$this->get_field_id( 'refid' ).'" name="'.$this->get_field_name( 'refid' ).'" type="text" value="'.$refid.'" />'
108
  .'</p>';
109
  }
19
  'cleantalk_widget',
20
 
21
  // Widget name will appear in UI
22
+ __('CleanTalk Widget', 'cleantalk-spam-protect'),
23
 
24
  // Widget description
25
+ array( 'description' => __( 'CleanTalk widget', 'cleantalk-spam-protect'), )
26
  );
27
  }
28
 
32
  {
33
  global $apbct;
34
 
35
+ $instance['title'] = isset( $instance['title'] ) ? $instance['title'] : __( 'Spam blocked', 'cleantalk-spam-protect');
36
  $title = apply_filters( 'widget_title', $instance['title'] );
37
  echo $args['before_widget'];
38
 
70
 
71
  // This is where you run the code and display the output
72
  echo '<div style="width:auto;">'
73
+ .'<a href="https://cleantalk.org'.(!empty($instance['refid']) ? '?pid='.$instance['refid'] : '').'" target="_blank" title="'.__('CleanTalk\'s main page', 'cleantalk-spam-protect').'" style="'.$a_style.'">'
74
+ .'<strong style="'.$strong_style.'"><b>'.$blocked.'</b> '.__('spam', 'cleantalk-spam-protect').'</strong> '.__('blocked by', 'cleantalk-spam-protect').' <strong>CleanTalk</strong>'
75
  .'</a>'
76
  .'</div>';
77
 
83
  {
84
  // Widget admin form
85
 
86
+ $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : $title = __( 'Spam blocked', 'cleantalk-spam-protect');
87
  $style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : $style = 'ct_style';
88
  $refid = isset( $instance[ 'refid' ] ) ? $instance[ 'refid' ] : $refid = '';
89
  // Title field
90
  echo '<p>'
91
+ .'<label for="' . $this->get_field_id( 'title' ) . '">' . __( 'Title:', 'cleantalk-spam-protect') . '</label>'
92
  .'<input class="widefat" id="'.$this->get_field_id( 'title' ).'" name="'.$this->get_field_name( 'title' ).'" type="text" value="'.esc_attr( $title ).'" />'
93
  .'</p>';
94
  // Style
95
  echo '<p>'
96
+ .'<label for="' . $this->get_field_id( 'style' ) . '">' . __( 'Style:', 'cleantalk-spam-protect') . '</label>'
97
  .'<select id="'.$this->get_field_id( 'style' ).'" class="widefat" name="'.$this->get_field_name( 'style' ).'">'
98
+ .'<option '.($style == 'cleantalk' ? 'selected' : '').' value="cleantalk">'.__('CleanTalk\'s Style', 'cleantalk-spam-protect').'</option>'
99
+ .'<option '.($style == 'light' ? 'selected' : '').' value="light">'.__('Light', 'cleantalk-spam-protect').'</option>'
100
+ .'<option '.($style == 'ex_light' ? 'selected' : '').' value="ex_light">'.__('Extremely Light', 'cleantalk-spam-protect').'</option>'
101
+ .'<option '.($style == 'dark' ? 'selected' : '').' value="dark">'.__('Dark', 'cleantalk-spam-protect').'</option>'
102
  .'</select>'
103
  .'</p>';
104
  // Ref ID
105
  echo '<p>'
106
+ .'<label for="' . $this->get_field_id( 'refid' ) . '">' . __( 'Referal link ID:', 'cleantalk-spam-protect') . '</label>'
107
  .'<input class="widefat" id="'.$this->get_field_id( 'refid' ).'" name="'.$this->get_field_name( 'refid' ).'" type="text" value="'.$refid.'" />'
108
  .'</p>';
109
  }
inc/find-spam/ClassCleantalkCommentsListTable.php CHANGED
@@ -26,9 +26,9 @@ class ABPCTCommentsListTable extends ABPCT_List_Table
26
  function get_columns(){
27
  return array(
28
  'cb' => '<input type="checkbox" />',
29
- 'ct_author' => esc_html__( 'Author', 'cleantalk' ),
30
- 'ct_comment' => esc_html__( 'Comment', 'cleantalk' ),
31
- 'ct_response_to' => esc_html__( ' In Response To', 'cleantalk' ),
32
  );
33
  }
34
 
@@ -57,7 +57,7 @@ class ABPCTCommentsListTable extends ABPCT_List_Table
57
  ."</a>"
58
  : '');
59
  } else {
60
- $column_content .= esc_html__( 'No email', 'cleantalk' );
61
  }
62
 
63
  $column_content .= '<br/>';
@@ -71,7 +71,7 @@ class ABPCTCommentsListTable extends ABPCT_List_Table
71
  ."</a>"
72
  : '');
73
  }else
74
- $column_content .= esc_html__( 'No IP adress', 'cleantalk' );
75
 
76
  return $column_content;
77
 
@@ -184,7 +184,7 @@ class ABPCTCommentsListTable extends ABPCT_List_Table
184
  }
185
 
186
  function no_items() {
187
- esc_html_e( 'No spam found.', 'cleantalk' );
188
  }
189
 
190
  //********************************************//
26
  function get_columns(){
27
  return array(
28
  'cb' => '<input type="checkbox" />',
29
+ 'ct_author' => esc_html__( 'Author', 'cleantalk-spam-protect'),
30
+ 'ct_comment' => esc_html__( 'Comment', 'cleantalk-spam-protect'),
31
+ 'ct_response_to' => esc_html__( ' In Response To', 'cleantalk-spam-protect'),
32
  );
33
  }
34
 
57
  ."</a>"
58
  : '');
59
  } else {
60
+ $column_content .= esc_html__( 'No email', 'cleantalk-spam-protect');
61
  }
62
 
63
  $column_content .= '<br/>';
71
  ."</a>"
72
  : '');
73
  }else
74
+ $column_content .= esc_html__( 'No IP adress', 'cleantalk-spam-protect');
75
 
76
  return $column_content;
77
 
184
  }
185
 
186
  function no_items() {
187
+ esc_html_e( 'No spam found.', 'cleantalk-spam-protect');
188
  }
189
 
190
  //********************************************//
inc/find-spam/ClassCleantalkCommentsListTableLogs.php CHANGED
@@ -8,10 +8,10 @@ class ABPCTCommentsListTableLogs extends ABPCTCommentsListTable
8
  function get_columns(){
9
  return array(
10
  'cb' => '<input type="checkbox" />',
11
- 'ct_start' => esc_html__( 'Start time', 'cleantalk' ),
12
- 'ct_checked' => esc_html__( 'Checked', 'cleantalk' ),
13
- 'ct_spam' => esc_html__( 'Found spam', 'cleantalk' ),
14
- 'ct_bad' => esc_html__( 'Found bad', 'cleantalk' ),
15
  );
16
  }
17
 
@@ -57,7 +57,7 @@ class ABPCTCommentsListTableLogs extends ABPCTCommentsListTable
57
  }
58
 
59
  function no_items() {
60
- esc_html_e( 'No logs found.', 'cleantalk' );
61
  }
62
 
63
  }
8
  function get_columns(){
9
  return array(
10
  'cb' => '<input type="checkbox" />',
11
+ 'ct_start' => esc_html__( 'Start time', 'cleantalk-spam-protect'),
12
+ 'ct_checked' => esc_html__( 'Checked', 'cleantalk-spam-protect'),
13
+ 'ct_spam' => esc_html__( 'Found spam', 'cleantalk-spam-protect'),
14
+ 'ct_bad' => esc_html__( 'Found bad', 'cleantalk-spam-protect'),
15
  );
16
  }
17
 
57
  }
58
 
59
  function no_items() {
60
+ esc_html_e( 'No logs found.', 'cleantalk-spam-protect');
61
  }
62
 
63
  }
inc/find-spam/ClassCleantalkCommentsListTableSpam.php CHANGED
@@ -44,7 +44,7 @@ class ABPCTCommentsListTableSpam extends ABPCTCommentsListTable
44
  $button_id = ($which) ? "ct_delete_all_$which" : "ct_delete_all";
45
  ?>
46
  <div class="alignleft actions bulkactions">
47
- <button type="button" id="<?php echo $button_id; ?>" class="button action ct_delete_all"><?php esc_html_e('Delete all comments from the list', 'cleantalk'); ?></button>
48
  <span class="spinner"></span>
49
  </div>
50
  <?php
44
  $button_id = ($which) ? "ct_delete_all_$which" : "ct_delete_all";
45
  ?>
46
  <div class="alignleft actions bulkactions">
47
+ <button type="button" id="<?php echo $button_id; ?>" class="button action ct_delete_all"><?php esc_html_e('Delete all comments from the list', 'cleantalk-spam-protect'); ?></button>
48
  <span class="spinner"></span>
49
  </div>
50
  <?php
inc/find-spam/ClassCleantalkFindSpamChecker.php CHANGED
@@ -73,24 +73,24 @@ abstract class ClassCleantalkFindSpamChecker
73
 
74
  <!-- Check options -->
75
  <div class="ct_to_hide" id="ct_check_params_wrapper">
76
- <button class="button ct_check_params_elem" id="ct_check_spam_button" <?php echo !$this->apbct->data['moderate'] ? 'disabled="disabled"' : ''; ?>><?php _e("Start check", 'cleantalk'); ?></button>
77
- <?php if(!empty($_COOKIE['ct_paused_'.$this->page_slug.'_check'])) { ?><button class="button ct_check_params_elem" id="ct_proceed_check_button"><?php _e("Continue check", 'cleantalk'); ?></button><?php } ?>
78
- <p class="ct_check_params_desc"><?php _e("The plugin will check all $this->page_slug against blacklists database and show you senders that have spam activity on other websites.", 'cleantalk'); ?></p>
79
  <br />
80
  <div class="ct_check_params_elem ct_check_params_elem_sub">
81
- <input id="ct_accurate_check" type="checkbox" value="1" /><label for="ct_accurate_check"><strong><?php _e("Accurate check", 'cleantalk'); ?></strong></label>
82
  </div>
83
- <p class="ct_check_params_desc"><?php _e("Allows to use $this->page_slug's dates to perform more accurate check. Could seriously slow down the check.", 'cleantalk'); ?></p>
84
  <br />
85
  <div class="ct_check_params_elem ct_check_params_elem_sub">
86
- <input id="ct_allow_date_range" type="checkbox" value="1" /><label for="ct_allow_date_range"><strong><?php _e("Specify date range", 'cleantalk'); ?></strong></label>
87
  </div>
88
  <div class="ct_check_params_desc">
89
  <label for="ct_date_range_from"></label><input class="ct_date" type="text" id="ct_date_range_from" value="<?php echo $this->lastCheckDate(); ?>" disabled readonly />
90
  <label for="ct_date_range_till"></label><input class="ct_date" type="text" id="ct_date_range_till" value="<?php echo date( "M j Y"); ?>" disabled readonly />
91
  </div>
92
  <div class="ct_check_params_desc">
93
- <p><?php esc_html_e( "Begin/end dates of creation $this->page_slug to check. If no date is specified, the plugin uses the last $this->page_slug check date.", 'cleantalk'); ?></p>
94
  </div>
95
  <br>
96
  <?php apbct_admin__badge__get_premium(); ?>
@@ -104,7 +104,7 @@ abstract class ClassCleantalkFindSpamChecker
104
  <img src="<?php echo APBCT_URL_PATH . '/inc/images/preloader.gif'; ?>" alt="Cleantalk preloader" />
105
  </div>
106
  <div id="ct_working_message">
107
- <?php _e("Please wait for a while. CleanTalk is checking all $this->page_slug via blacklist database at cleantalk.org. You will have option to delete found spam $this->page_slug after plugin finish.", 'cleantalk'); ?>
108
  </div>
109
 
110
  <!-- Pause button -->
73
 
74
  <!-- Check options -->
75
  <div class="ct_to_hide" id="ct_check_params_wrapper">
76
+ <button class="button ct_check_params_elem" id="ct_check_spam_button" <?php echo !$this->apbct->data['moderate'] ? 'disabled="disabled"' : ''; ?>><?php _e("Start check", 'cleantalk-spam-protect'); ?></button>
77
+ <?php if(!empty($_COOKIE['ct_paused_'.$this->page_slug.'_check'])) { ?><button class="button ct_check_params_elem" id="ct_proceed_check_button"><?php _e("Continue check", 'cleantalk-spam-protect'); ?></button><?php } ?>
78
+ <p class="ct_check_params_desc"><?php _e("The plugin will check all $this->page_slug against blacklists database and show you senders that have spam activity on other websites.", 'cleantalk-spam-protect'); ?></p>
79
  <br />
80
  <div class="ct_check_params_elem ct_check_params_elem_sub">
81
+ <input id="ct_accurate_check" type="checkbox" value="1" /><label for="ct_accurate_check"><strong><?php _e("Accurate check", 'cleantalk-spam-protect'); ?></strong></label>
82
  </div>
83
+ <p class="ct_check_params_desc"><?php _e("Allows to use $this->page_slug's dates to perform more accurate check. Could seriously slow down the check.", 'cleantalk-spam-protect'); ?></p>
84
  <br />
85
  <div class="ct_check_params_elem ct_check_params_elem_sub">
86
+ <input id="ct_allow_date_range" type="checkbox" value="1" /><label for="ct_allow_date_range"><strong><?php _e("Specify date range", 'cleantalk-spam-protect'); ?></strong></label>
87
  </div>
88
  <div class="ct_check_params_desc">
89
  <label for="ct_date_range_from"></label><input class="ct_date" type="text" id="ct_date_range_from" value="<?php echo $this->lastCheckDate(); ?>" disabled readonly />
90
  <label for="ct_date_range_till"></label><input class="ct_date" type="text" id="ct_date_range_till" value="<?php echo date( "M j Y"); ?>" disabled readonly />
91
  </div>
92
  <div class="ct_check_params_desc">
93
+ <p><?php esc_html_e( "Begin/end dates of creation $this->page_slug to check. If no date is specified, the plugin uses the last $this->page_slug check date.", 'cleantalk-spam-protect'); ?></p>
94
  </div>
95
  <br>
96
  <?php apbct_admin__badge__get_premium(); ?>
104
  <img src="<?php echo APBCT_URL_PATH . '/inc/images/preloader.gif'; ?>" alt="Cleantalk preloader" />
105
  </div>
106
  <div id="ct_working_message">
107
+ <?php _e("Please wait for a while. CleanTalk is checking all $this->page_slug via blacklist database at cleantalk.org. You will have option to delete found spam $this->page_slug after plugin finish.", 'cleantalk-spam-protect'); ?>
108
  </div>
109
 
110
  <!-- Pause button -->
inc/find-spam/ClassCleantalkFindSpamCommentsChecker.php CHANGED
@@ -8,7 +8,7 @@ class ClassCleantalkFindSpamCommentsChecker extends ClassCleantalkFindSpamChecke
8
 
9
  parent::__construct();
10
 
11
- $this->page_title = esc_html__( 'Check comments for spam', 'cleantalk' );
12
  $this->page_script_name = 'edit-comments.php';
13
  $this->page_slug = 'spam';
14
 
@@ -22,11 +22,11 @@ class ClassCleantalkFindSpamCommentsChecker extends ClassCleantalkFindSpamChecke
22
  'ct_prev_accurate' => !empty($prev_check['accurate']) ? true : false,
23
  'ct_prev_from' => !empty($prev_check['from']) ? $prev_check['from'] : false,
24
  'ct_prev_till' => !empty($prev_check['till']) ? $prev_check['till'] : false,
25
- 'ct_timeout_confirm' => __('Failed from timeout. Going to check comments again.', 'cleantalk'),
26
- 'ct_confirm_deletion_all' => __('Delete all spam comments?', 'cleantalk'),
27
- 'ct_comments_added_after' => __('comments', 'cleantalk'),
28
- 'ct_status_string' => __('Checked %s, found %s spam comments and %s bad comments (without IP or email).', 'cleantalk'),
29
- 'ct_status_string_warning' => '<p>'.__('Please do backup of WordPress database before delete any accounts!', 'cleantalk').'</p>',
30
  'start' => !empty($_COOKIE['ct_comments_start_check']) ? true : false,
31
  ));
32
 
@@ -336,17 +336,17 @@ class ClassCleantalkFindSpamCommentsChecker extends ClassCleantalkFindSpamChecke
336
 
337
  if( ! $direct_call ) {
338
  $return['message'] .= sprintf (
339
- esc_html__('Checked %s, found %s spam comments and %s bad comments (without IP or email)', 'cleantalk'),
340
  $cnt_checked,
341
  $cnt_spam,
342
  $cnt_bad
343
  );
344
  } else {
345
  if( isset( $return['checked'] ) && 0 == $return['checked'] ) {
346
- $return['message'] = esc_html__( 'Never checked yet or no new spam.', 'cleantalk' );
347
  } else {
348
  $return['message'] .= sprintf (
349
- __("Last check %s: checked %s comments, found %s spam comments and %s bad comments (without IP or email).", 'cleantalk'),
350
  self::lastCheckDate(),
351
  $cnt_checked,
352
  $cnt_spam,
@@ -357,7 +357,7 @@ class ClassCleantalkFindSpamCommentsChecker extends ClassCleantalkFindSpamChecke
357
 
358
  $backup_notice = '&nbsp;';
359
  if ($cnt_spam > 0){
360
- $backup_notice = __("Please do backup of WordPress database before delete any comments!", 'cleantalk');
361
  }
362
  $return['message'] .= "<p>$backup_notice</p>";
363
 
8
 
9
  parent::__construct();
10
 
11
+ $this->page_title = esc_html__( 'Check comments for spam', 'cleantalk-spam-protect');
12
  $this->page_script_name = 'edit-comments.php';
13
  $this->page_slug = 'spam';
14
 
22
  'ct_prev_accurate' => !empty($prev_check['accurate']) ? true : false,
23
  'ct_prev_from' => !empty($prev_check['from']) ? $prev_check['from'] : false,
24
  'ct_prev_till' => !empty($prev_check['till']) ? $prev_check['till'] : false,
25
+ 'ct_timeout_confirm' => __('Failed from timeout. Going to check comments again.', 'cleantalk-spam-protect'),
26
+ 'ct_confirm_deletion_all' => __('Delete all spam comments?', 'cleantalk-spam-protect'),
27
+ 'ct_comments_added_after' => __('comments', 'cleantalk-spam-protect'),
28
+ 'ct_status_string' => __('Checked %s, found %s spam comments and %s bad comments (without IP or email).', 'cleantalk-spam-protect'),
29
+ 'ct_status_string_warning' => '<p>'.__('Please do backup of WordPress database before delete any accounts!', 'cleantalk-spam-protect').'</p>',
30
  'start' => !empty($_COOKIE['ct_comments_start_check']) ? true : false,
31
  ));
32
 
336
 
337
  if( ! $direct_call ) {
338
  $return['message'] .= sprintf (
339
+ esc_html__('Checked %s, found %s spam comments and %s bad comments (without IP or email)', 'cleantalk-spam-protect'),
340
  $cnt_checked,
341
  $cnt_spam,
342
  $cnt_bad
343
  );
344
  } else {
345
  if( isset( $return['checked'] ) && 0 == $return['checked'] ) {
346
+ $return['message'] = esc_html__( 'Never checked yet or no new spam.', 'cleantalk-spam-protect');
347
  } else {
348
  $return['message'] .= sprintf (
349
+ __("Last check %s: checked %s comments, found %s spam comments and %s bad comments (without IP or email).", 'cleantalk-spam-protect'),
350
  self::lastCheckDate(),
351
  $cnt_checked,
352
  $cnt_spam,
357
 
358
  $backup_notice = '&nbsp;';
359
  if ($cnt_spam > 0){
360
+ $backup_notice = __("Please do backup of WordPress database before delete any comments!", 'cleantalk-spam-protect');
361
  }
362
  $return['message'] .= "<p>$backup_notice</p>";
363
 
inc/find-spam/ClassCleantalkFindSpamPage.php CHANGED
@@ -86,7 +86,7 @@ class ClassCleantalkFindSpamPage
86
  if( 1 == $this->spam_checker->getApbct()->moderate_ip ){
87
  echo '<h3>'
88
  .sprintf(
89
- __('Antispam hosting tariff does not allow you to use this feature. To do so, you need to enter an Access Key in the %splugin settings%s.', 'cleantalk'),
90
  '<a href="' . ( is_network_admin() ? 'settings.php?page=cleantalk' : 'options-general.php?page=cleantalk' ).'">',
91
  '</a>'
92
  )
@@ -98,14 +98,14 @@ class ClassCleantalkFindSpamPage
98
  ?>
99
  <div class="wrap">
100
  <h2><img src="<?php echo $this->spam_checker->getApbct()->logo__small__colored; ?>" alt="CleanTalk logo" /> <?php echo $this->spam_checker->getApbct()->plugin_name; ?></h2>
101
- <a style="color: gray; margin-left: 23px;" href="<?php echo $this->spam_checker->getApbct()->settings_link; ?>"><?php _e('Plugin Settings', 'cleantalk'); ?></a>
102
  <br />
103
  <h3><?php echo $this->spam_checker->getPageTitle(); ?></h3>
104
  <div id="ct_check_tabs">
105
  <ul>
106
- <li <?php echo (1 == $this->current_tab) ? 'class="active"' : ''; ?>><a href="<?php echo $this->spam_checker->getPageScriptName(); ?>?page=ct_check_<?php echo $this->spam_checker->getPageSlug(); ?>"><?php esc_html_e( 'Scan and new results', 'cleantalk' ) ?></a></li>
107
- <li <?php echo (2 == $this->current_tab) ? 'class="active"' : ''; ?>><a href="<?php echo $this->spam_checker->getPageScriptName(); ?>?page=ct_check_<?php echo $this->spam_checker->getPageSlug(); ?>_total"><?php esc_html_e( 'Previous scan results', 'cleantalk' ) ?></a></li>
108
- <li <?php echo (3 == $this->current_tab) ? 'class="active"' : ''; ?>><a href="<?php echo $this->spam_checker->getPageScriptName(); ?>?page=ct_check_<?php echo $this->spam_checker->getPageSlug(); ?>_logs"><?php esc_html_e( 'Scan logs', 'cleantalk' ) ?></a></li>
109
  </ul>
110
  <div id="ct_check_content">
111
  <?php
@@ -116,7 +116,7 @@ class ClassCleantalkFindSpamPage
116
 
117
  $option = 'per_page';
118
  $args = array(
119
- 'label' => esc_html__( 'Show per page', 'cleantalk' ),
120
  'default' => 10,
121
  'option' => 'spam_per_page',
122
  );
86
  if( 1 == $this->spam_checker->getApbct()->moderate_ip ){
87
  echo '<h3>'
88
  .sprintf(
89
+ __('Antispam hosting tariff does not allow you to use this feature. To do so, you need to enter an Access Key in the %splugin settings%s.', 'cleantalk-spam-protect'),
90
  '<a href="' . ( is_network_admin() ? 'settings.php?page=cleantalk' : 'options-general.php?page=cleantalk' ).'">',
91
  '</a>'
92
  )
98
  ?>
99
  <div class="wrap">
100
  <h2><img src="<?php echo $this->spam_checker->getApbct()->logo__small__colored; ?>" alt="CleanTalk logo" /> <?php echo $this->spam_checker->getApbct()->plugin_name; ?></h2>
101
+ <a style="color: gray; margin-left: 23px;" href="<?php echo $this->spam_checker->getApbct()->settings_link; ?>"><?php _e('Plugin Settings', 'cleantalk-spam-protect'); ?></a>
102
  <br />
103
  <h3><?php echo $this->spam_checker->getPageTitle(); ?></h3>
104
  <div id="ct_check_tabs">
105
  <ul>
106
+ <li <?php echo (1 == $this->current_tab) ? 'class="active"' : ''; ?>><a href="<?php echo $this->spam_checker->getPageScriptName(); ?>?page=ct_check_<?php echo $this->spam_checker->getPageSlug(); ?>"><?php esc_html_e( 'Scan and new results', 'cleantalk-spam-protect') ?></a></li>
107
+ <li <?php echo (2 == $this->current_tab) ? 'class="active"' : ''; ?>><a href="<?php echo $this->spam_checker->getPageScriptName(); ?>?page=ct_check_<?php echo $this->spam_checker->getPageSlug(); ?>_total"><?php esc_html_e( 'Previous scan results', 'cleantalk-spam-protect') ?></a></li>
108
+ <li <?php echo (3 == $this->current_tab) ? 'class="active"' : ''; ?>><a href="<?php echo $this->spam_checker->getPageScriptName(); ?>?page=ct_check_<?php echo $this->spam_checker->getPageSlug(); ?>_logs"><?php esc_html_e( 'Scan logs', 'cleantalk-spam-protect') ?></a></li>
109
  </ul>
110
  <div id="ct_check_content">
111
  <?php
116
 
117
  $option = 'per_page';
118
  $args = array(
119
+ 'label' => esc_html__( 'Show per page', 'cleantalk-spam-protect'),
120
  'default' => 10,
121
  'option' => 'spam_per_page',
122
  );
inc/find-spam/ClassCleantalkFindSpamUsersChecker.php CHANGED
@@ -8,7 +8,7 @@ class ClassCleantalkFindSpamUsersChecker extends ClassCleantalkFindSpamChecker
8
 
9
  parent::__construct();
10
 
11
- $this->page_title = esc_html__( 'Check users for spam', 'cleantalk' );
12
  $this->page_script_name = 'users.php';
13
  $this->page_slug = 'users';
14
 
@@ -23,13 +23,13 @@ class ClassCleantalkFindSpamUsersChecker extends ClassCleantalkFindSpamChecker
23
  'ct_prev_accurate' => !empty($prev_check['accurate']) ? true : false,
24
  'ct_prev_from' => !empty($prev_check['from']) ? $prev_check['from'] : false,
25
  'ct_prev_till' => !empty($prev_check['till']) ? $prev_check['till'] : false,
26
- 'ct_timeout' => __('Failed from timeout. Going to check users again.', 'cleantalk'),
27
- 'ct_timeout_delete' => __('Failed from timeout. Going to run a new attempt to delete spam users.', 'cleantalk'),
28
- 'ct_confirm_deletion_all' => __('Delete all spam users?', 'cleantalk'),
29
- 'ct_iusers' => __('users.', 'cleantalk'),
30
  'ct_csv_filename' => "user_check_by_".$current_user->user_login,
31
- 'ct_status_string' => __("Checked %s, found %s spam users and %s bad users (without IP or email)", 'cleantalk'),
32
- 'ct_status_string_warning' => "<p>".__("Please do backup of WordPress database before delete any accounts!", 'cleantalk')."</p>"
33
  ));
34
 
35
  wp_enqueue_style( 'cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/css/cleantalk-spam-check.min.css', array(), APBCT_VERSION, 'all' );
@@ -371,17 +371,17 @@ class ClassCleantalkFindSpamUsersChecker extends ClassCleantalkFindSpamChecker
371
 
372
  if( ! $direct_call ) {
373
  $return['message'] .= sprintf (
374
- esc_html__('Checked %s, found %s spam users and %s bad users (without IP or email)', 'cleantalk'),
375
  $cnt_checked,
376
  $cnt_spam,
377
  $cnt_bad
378
  );
379
  } else {
380
  if( isset( $return['checked'] ) && 0 == $return['checked'] ) {
381
- $return['message'] = esc_html__( 'Never checked yet or no new spam.', 'cleantalk' );
382
  } else {
383
  $return['message'] .= sprintf (
384
- __("Last check %s: checked %s users, found %s spam users and %s bad users (without IP or email).", 'cleantalk'),
385
  self::lastCheckDate(),
386
  $cnt_checked,
387
  $cnt_spam,
@@ -392,7 +392,7 @@ class ClassCleantalkFindSpamUsersChecker extends ClassCleantalkFindSpamChecker
392
 
393
  $backup_notice = '&nbsp;';
394
  if ($cnt_spam > 0) {
395
- $backup_notice = __("Please do backup of WordPress database before delete any accounts!", 'cleantalk');
396
  }
397
  $return['message'] .= "<p>$backup_notice</p>";
398
 
@@ -613,14 +613,14 @@ class ClassCleantalkFindSpamUsersChecker extends ClassCleantalkFindSpamChecker
613
  $is_checked = date( 'M d Y', strtotime( $is_checked ) );
614
  $is_spam = get_user_meta( $user_id, 'ct_marked_as_spam', true );
615
  if( ! empty( $is_spam ) ) {
616
- $text = sprintf( esc_html__( 'SPAM. Checked %s.', 'cleantalk' ), $is_checked );
617
  $value = '<span id="apbct_checked_spam">' . $text . '</span>';
618
  } else {
619
- $text = sprintf( esc_html__( 'Not spam. Checked %s.', 'cleantalk' ), $is_checked );
620
  $value = '<span id="apbct_checked_not_spam">' . $text . '</span>';
621
  }
622
  } else {
623
- $value = '<span id="apbct_not_checked">' . esc_html__( 'Not checked yet. Anti-Spam by CleanTalk.', 'cleantalk' ) . '</span>';
624
  }
625
 
626
  }
8
 
9
  parent::__construct();
10
 
11
+ $this->page_title = esc_html__( 'Check users for spam', 'cleantalk-spam-protect');
12
  $this->page_script_name = 'users.php';
13
  $this->page_slug = 'users';
14
 
23
  'ct_prev_accurate' => !empty($prev_check['accurate']) ? true : false,
24
  'ct_prev_from' => !empty($prev_check['from']) ? $prev_check['from'] : false,
25
  'ct_prev_till' => !empty($prev_check['till']) ? $prev_check['till'] : false,
26
+ 'ct_timeout' => __('Failed from timeout. Going to check users again.', 'cleantalk-spam-protect'),
27
+ 'ct_timeout_delete' => __('Failed from timeout. Going to run a new attempt to delete spam users.', 'cleantalk-spam-protect'),
28
+ 'ct_confirm_deletion_all' => __('Delete all spam users?', 'cleantalk-spam-protect'),
29
+ 'ct_iusers' => __('users.', 'cleantalk-spam-protect'),
30
  'ct_csv_filename' => "user_check_by_".$current_user->user_login,
31
+ 'ct_status_string' => __("Checked %s, found %s spam users and %s bad users (without IP or email)", 'cleantalk-spam-protect'),
32
+ 'ct_status_string_warning' => "<p>".__("Please do backup of WordPress database before delete any accounts!", 'cleantalk-spam-protect')."</p>"
33
  ));
34
 
35
  wp_enqueue_style( 'cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/css/cleantalk-spam-check.min.css', array(), APBCT_VERSION, 'all' );
371
 
372
  if( ! $direct_call ) {
373
  $return['message'] .= sprintf (
374
+ esc_html__('Checked %s, found %s spam users and %s bad users (without IP or email)', 'cleantalk-spam-protect'),
375
  $cnt_checked,
376
  $cnt_spam,
377
  $cnt_bad
378
  );
379
  } else {
380
  if( isset( $return['checked'] ) && 0 == $return['checked'] ) {
381
+ $return['message'] = esc_html__( 'Never checked yet or no new spam.', 'cleantalk-spam-protect');
382
  } else {
383
  $return['message'] .= sprintf (
384
+ __("Last check %s: checked %s users, found %s spam users and %s bad users (without IP or email).", 'cleantalk-spam-protect'),
385
  self::lastCheckDate(),
386
  $cnt_checked,
387
  $cnt_spam,
392
 
393
  $backup_notice = '&nbsp;';
394
  if ($cnt_spam > 0) {
395
+ $backup_notice = __("Please do backup of WordPress database before delete any accounts!", 'cleantalk-spam-protect');
396
  }
397
  $return['message'] .= "<p>$backup_notice</p>";
398
 
613
  $is_checked = date( 'M d Y', strtotime( $is_checked ) );
614
  $is_spam = get_user_meta( $user_id, 'ct_marked_as_spam', true );
615
  if( ! empty( $is_spam ) ) {
616
+ $text = sprintf( esc_html__( 'SPAM. Checked %s.', 'cleantalk-spam-protect'), $is_checked );
617
  $value = '<span id="apbct_checked_spam">' . $text . '</span>';
618
  } else {
619
+ $text = sprintf( esc_html__( 'Not spam. Checked %s.', 'cleantalk-spam-protect'), $is_checked );
620
  $value = '<span id="apbct_checked_not_spam">' . $text . '</span>';
621
  }
622
  } else {
623
+ $value = '<span id="apbct_not_checked">' . esc_html__( 'Not checked yet. Anti-Spam by CleanTalk.', 'cleantalk-spam-protect') . '</span>';
624
  }
625
 
626
  }
inc/find-spam/ClassCleantalkUsersListTable.php CHANGED
@@ -28,12 +28,12 @@ class ABPCTUsersListTable extends ABPCT_List_Table
28
  function get_columns(){
29
  return array(
30
  'cb' => '<input type="checkbox" />',
31
- 'ct_username' => esc_html__( 'Username', 'cleantalk' ),
32
- 'ct_name' => esc_html__( 'Name', 'cleantalk' ),
33
- 'ct_email' => esc_html__( 'E-mail', 'cleantalk' ),
34
- 'ct_signed_up' => esc_html__( 'Signed up', 'cleantalk' ),
35
- 'ct_role' => esc_html__( 'Role', 'cleantalk' ),
36
- 'ct_posts' => esc_html__( 'Posts', 'cleantalk' ),
37
  );
38
  }
39
 
@@ -61,7 +61,7 @@ class ABPCTUsersListTable extends ABPCT_List_Table
61
  ."</a>"
62
  : '');
63
  } else {
64
- $column_content .= esc_html__( 'No email', 'cleantalk' );
65
  }
66
  $column_content .= '<br/>';
67
 
@@ -78,9 +78,9 @@ class ABPCTUsersListTable extends ABPCT_List_Table
78
  ."</a>"
79
  : '');
80
  }else
81
- $column_content .= esc_html__( 'No IP adress', 'cleantalk' );
82
  }else
83
- $column_content .= esc_html__( 'No IP adress', 'cleantalk' );
84
 
85
  $actions = array(
86
  'delete' => sprintf( '<a href="?page=%s&action=%s&spam=%s">Delete</a>', $_REQUEST['page'],'delete', $user_obj->ID ),
@@ -142,7 +142,7 @@ class ABPCTUsersListTable extends ABPCT_List_Table
142
  }
143
 
144
  function no_items() {
145
- esc_html_e( 'No spam found.', 'cleantalk' );
146
  }
147
 
148
  //********************************************//
28
  function get_columns(){
29
  return array(
30
  'cb' => '<input type="checkbox" />',
31
+ 'ct_username' => esc_html__( 'Username', 'cleantalk-spam-protect'),
32
+ 'ct_name' => esc_html__( 'Name', 'cleantalk-spam-protect'),
33
+ 'ct_email' => esc_html__( 'E-mail', 'cleantalk-spam-protect'),
34
+ 'ct_signed_up' => esc_html__( 'Signed up', 'cleantalk-spam-protect'),
35
+ 'ct_role' => esc_html__( 'Role', 'cleantalk-spam-protect'),
36
+ 'ct_posts' => esc_html__( 'Posts', 'cleantalk-spam-protect'),
37
  );
38
  }
39
 
61
  ."</a>"
62
  : '');
63
  } else {
64
+ $column_content .= esc_html__( 'No email', 'cleantalk-spam-protect');
65
  }
66
  $column_content .= '<br/>';
67
 
78
  ."</a>"
79
  : '');
80
  }else
81
+ $column_content .= esc_html__( 'No IP adress', 'cleantalk-spam-protect');
82
  }else
83
+ $column_content .= esc_html__( 'No IP adress', 'cleantalk-spam-protect');
84
 
85
  $actions = array(
86
  'delete' => sprintf( '<a href="?page=%s&action=%s&spam=%s">Delete</a>', $_REQUEST['page'],'delete', $user_obj->ID ),
142
  }
143
 
144
  function no_items() {
145
+ esc_html_e( 'No spam found.', 'cleantalk-spam-protect');
146
  }
147
 
148
  //********************************************//
inc/find-spam/ClassCleantalkUsersListTableLogs.php CHANGED
@@ -8,10 +8,10 @@ class ABPCTUsersListTableLogs extends ABPCTUsersListTable
8
  function get_columns(){
9
  return array(
10
  'cb' => '<input type="checkbox" />',
11
- 'ct_start' => esc_html__( 'Start time', 'cleantalk' ),
12
- 'ct_checked' => esc_html__( 'Checked', 'cleantalk' ),
13
- 'ct_spam' => esc_html__( 'Found spam', 'cleantalk' ),
14
- 'ct_bad' => esc_html__( 'Found bad', 'cleantalk' ),
15
  );
16
  }
17
 
@@ -57,7 +57,7 @@ class ABPCTUsersListTableLogs extends ABPCTUsersListTable
57
  }
58
 
59
  function no_items() {
60
- esc_html_e( 'No logs found.', 'cleantalk' );
61
  }
62
 
63
  }
8
  function get_columns(){
9
  return array(
10
  'cb' => '<input type="checkbox" />',
11
+ 'ct_start' => esc_html__( 'Start time', 'cleantalk-spam-protect'),
12
+ 'ct_checked' => esc_html__( 'Checked', 'cleantalk-spam-protect'),
13
+ 'ct_spam' => esc_html__( 'Found spam', 'cleantalk-spam-protect'),
14
+ 'ct_bad' => esc_html__( 'Found bad', 'cleantalk-spam-protect'),
15
  );
16
  }
17
 
57
  }
58
 
59
  function no_items() {
60
+ esc_html_e( 'No logs found.', 'cleantalk-spam-protect');
61
  }
62
 
63
  }
inc/find-spam/ClassCleantalkUsersListTableSpam.php CHANGED
@@ -54,8 +54,8 @@ class ABPCTUsersListTableSpam extends ABPCTUsersListTable
54
  if( ! $this->has_items() ) return;
55
  ?>
56
  <div class="alignleft actions bulkactions">
57
- <button type="button" id="ct_delete_all_users" class="button action ct_delete_all_users"><?php esc_html_e('Delete all users from list', 'cleantalk'); ?></button>
58
- <button type="button" id="ct_get_csv_file" class="button action ct_get_csv_file"><?php esc_html_e( 'Download results in CSV', 'cleantalk' ) ?></button>
59
  <span class="spinner"></span>
60
  </div>
61
  <?php
54
  if( ! $this->has_items() ) return;
55
  ?>
56
  <div class="alignleft actions bulkactions">
57
+ <button type="button" id="ct_delete_all_users" class="button action ct_delete_all_users"><?php esc_html_e('Delete all users from list', 'cleantalk-spam-protect'); ?></button>
58
+ <button type="button" id="ct_get_csv_file" class="button action ct_get_csv_file"><?php esc_html_e( 'Download results in CSV', 'cleantalk-spam-protect') ?></button>
59
  <span class="spinner"></span>
60
  </div>
61
  <?php
lib/CleantalkSFW.php CHANGED
@@ -68,12 +68,12 @@ class CleantalkSFW extends Cleantalk\Antispam\SFW
68
 
69
  // Translation
70
  $request_uri = apbct_get_server_variable( 'REQUEST_URI' );
71
- $sfw_die_page = str_replace('{SFW_DIE_NOTICE_IP}', __('SpamFireWall is activated for your IP ', 'cleantalk'), $sfw_die_page);
72
- $sfw_die_page = str_replace('{SFW_DIE_MAKE_SURE_JS_ENABLED}', __('To continue working with web site, please make sure that you have enabled JavaScript.', 'cleantalk'), $sfw_die_page);
73
- $sfw_die_page = str_replace('{SFW_DIE_CLICK_TO_PASS}', __('Please click the link below to pass the protection,', 'cleantalk'), $sfw_die_page);
74
- $sfw_die_page = str_replace('{SFW_DIE_YOU_WILL_BE_REDIRECTED}', sprintf(__('Or you will be automatically redirected to the requested page after %d seconds.', 'cleantalk'), 3), $sfw_die_page);
75
- $sfw_die_page = str_replace('{CLEANTALK_TITLE}', __('Antispam by CleanTalk', 'cleantalk'), $sfw_die_page);
76
- $sfw_die_page = str_replace('{TEST_TITLE}', ($this->test ? __('This is the testing page for SpamFireWall', 'cleantalk') : ''), $sfw_die_page);
77
 
78
  if($this->test){
79
  $sfw_die_page = str_replace('{REAL_IP__HEADER}', 'Real IP:', $sfw_die_page);
68
 
69
  // Translation
70
  $request_uri = apbct_get_server_variable( 'REQUEST_URI' );
71
+ $sfw_die_page = str_replace('{SFW_DIE_NOTICE_IP}', __('SpamFireWall is activated for your IP ', 'cleantalk-spam-protect'), $sfw_die_page);
72
+ $sfw_die_page = str_replace('{SFW_DIE_MAKE_SURE_JS_ENABLED}', __('To continue working with web site, please make sure that you have enabled JavaScript.', 'cleantalk-spam-protect'), $sfw_die_page);
73
+ $sfw_die_page = str_replace('{SFW_DIE_CLICK_TO_PASS}', __('Please click the link below to pass the protection,', 'cleantalk-spam-protect'), $sfw_die_page);
74
+ $sfw_die_page = str_replace('{SFW_DIE_YOU_WILL_BE_REDIRECTED}', sprintf(__('Or you will be automatically redirected to the requested page after %d seconds.', 'cleantalk-spam-protect'), 3), $sfw_die_page);
75
+ $sfw_die_page = str_replace('{CLEANTALK_TITLE}', __('Antispam by CleanTalk', 'cleantalk-spam-protect'), $sfw_die_page);
76
+ $sfw_die_page = str_replace('{TEST_TITLE}', ($this->test ? __('This is the testing page for SpamFireWall', 'cleantalk-spam-protect') : ''), $sfw_die_page);
77
 
78
  if($this->test){
79
  $sfw_die_page = str_replace('{REAL_IP__HEADER}', 'Real IP:', $sfw_die_page);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: spam, antispam, woocommerce, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
  Requires PHP: 5.4
7
- Stable tag: 5.141
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
@@ -574,6 +574,9 @@ If your website has forms that send data to external sources, you can enable opt
574
 
575
  == Changelog ==
576
 
 
 
 
577
  = 5.141 Jul 06 2020 =
578
  * Fix: WP Fusion web hooks skipped.
579
  * Upd: Readme old changelogs replaced.
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
  Requires PHP: 5.4
7
+ Stable tag: 5.141.1
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
574
 
575
  == Changelog ==
576
 
577
+ = 5.141.1 Jul 06 2020 =
578
+ * Fix: Add timeout for first SFW activation.
579
+
580
  = 5.141 Jul 06 2020 =
581
  * Fix: WP Fusion web hooks skipped.
582
  * Upd: Readme old changelogs replaced.
templates/translate_banner.php CHANGED
@@ -3,11 +3,11 @@ $ct_translate_banner_template = '
3
  <div class="ct_settings_banner" id="ct_translate_plugin">
4
  <div class="ct_rate_block">'
5
  .'<p>'
6
- .__('Help others use the plugin in your language.', 'cleantalk')
7
- .__('We ask you to help with the translation of the plugin in your language. Please take a few minutes to make the plugin more comfortable.', 'cleantalk')
8
  .'</p>
9
  <div>
10
- <a href="https://translate.wordpress.org/locale/%s/default/wp-plugins/cleantalk-spam-protect" target="_blank">'.__('TRANSLATE', 'cleantalk').'</a>
11
  </div>
12
  </div>
13
  </div>';
3
  <div class="ct_settings_banner" id="ct_translate_plugin">
4
  <div class="ct_rate_block">'
5
  .'<p>'
6
+ .__('Help others use the plugin in your language.', 'cleantalk-spam-protect')
7
+ .__('We ask you to help with the translation of the plugin in your language. Please take a few minutes to make the plugin more comfortable.', 'cleantalk-spam-protect')
8
  .'</p>
9
  <div>
10
+ <a href="https://translate.wordpress.org/locale/%s/default/wp-plugins/cleantalk-spam-protect" target="_blank">'.__('TRANSLATE', 'cleantalk-spam-protect').'</a>
11
  </div>
12
  </div>
13
  </div>';