Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.172

Version Description

Feb 17 2022 =

Updating system modified, settings long descriptions added and minor issues fixed.

  • Fix: Fixed Fusion Builder Avada Form integration
  • Fix: Fixed CF7 visible fields
  • New. Updating system modified.
  • Fix: Fixed apbct_store__urls()
  • Fix. Updating system. Source url template fixed.
  • Fix. Updating system. Redundant errors handling removed.
  • New. Integration. WS-Forms integration implemented.
  • Fix. Settings. Long description mark fixed.
  • Upd. Settings. Set cookies setting long description added.
  • Upd. Settings. Hide website field setting long description added.
  • Upd. Settings. Anti-Crawler setting long description added.
  • Fix. Settings. Long description mark for checkboxes fixed.
  • Upd. Settings. Anti-Flood setting long description added.
  • Upd. Settings. CleanTalk Pixel setting long description added.
  • Mod: Replaced the is_super_admin() function with its own apbct_is_super_admin(
  • Fix. Settings. Settings hints fixed.
  • Upd. Ajax. Nonce lifetime constant added.
  • Fix. Integration. Elementor pro forms integration fixed #2.
  • Fix: Formidable Forms - fixed spam protection without JS
  • Fix. Settings. Hints links contain UTM marks.
Download this release

Release Info

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

Code changes from version 5.171.2 to 5.172

cleantalk.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Anti-Spam by CleanTalk
5
  Plugin URI: https://cleantalk.org
6
  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.
7
- Version: 5.171.2
8
  Author: СleanTalk <welcome@cleantalk.org>
9
  Author URI: https://cleantalk.org
10
  Text Domain: cleantalk-spam-protect
@@ -32,6 +32,7 @@ use Cleantalk\ApbctWP\Variables\Cookie;
32
  use Cleantalk\Common\DNS;
33
  use Cleantalk\Common\Firewall;
34
  use Cleantalk\Common\Schema;
 
35
  use Cleantalk\Variables\Request;
36
  use Cleantalk\Variables\Server;
37
 
@@ -353,10 +354,6 @@ add_action('wp_ajax_nopriv_seed_cspv5_contactform_callback', 'apbct_form__seedpr
353
  add_action('wp_ajax_nopriv_dt_send_mail', 'apbct_form__the7_contact_form', 1);
354
  add_action('wp_ajax_dt_send_mail', 'apbct_form__the7_contact_form', 1);
355
 
356
- // Elementor Pro page builder forms
357
- add_action('wp_ajax_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam');
358
- add_action('wp_ajax_nopriv_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam');
359
-
360
  // Custom register form (ticket_id=13668)
361
  add_action('website_neotrends_signup_fields_check', function ($username, $fields) {
362
  $ip = Helper::ipGet('real', false);
@@ -1880,6 +1877,61 @@ function apbct_rc__update()
1880
  {
1881
  global $wp_version;
1882
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1883
  //Upgrade params
1884
  $plugin = 'cleantalk-spam-protect/cleantalk.php';
1885
  $plugin_slug = 'cleantalk-spam-protect';
@@ -1916,64 +1968,56 @@ function apbct_rc__update()
1916
 
1917
  apbct_maintenance_mode__disable();
1918
 
1919
- $result = activate_plugins($plugin, '', $activate_for_network);
1920
-
1921
- // Changing response UP_TO_DATE to OK
1922
- if ( $upgrader->apbct_result === 'UP_TO_DATE' ) {
1923
- $upgrader->apbct_result = 'OK';
1924
- }
1925
 
1926
  if ( $upgrader->apbct_result === 'OK' ) {
1927
- if ( is_wp_error($result) ) {
1928
- die(
1929
- 'FAIL ' . json_encode(
1930
- array(
1931
- 'error' => 'COULD_NOT_ACTIVATE',
1932
- 'wp_error' => $result->get_error_message()
1933
- )
1934
- )
1935
- );
1936
- }
1937
 
1938
- $httpResponseCode = Helper::httpRequest(get_option('home'), array(), 'get_code');
 
 
 
 
1939
 
1940
- if ( strpos($httpResponseCode, '200') === false ) {
1941
- apbct_maintenance_mode__enable(30);
1942
 
 
1943
  // Rollback
1944
- if ( version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0 ) {
1945
- $rollback = new CleantalkUpgrader(
1946
- new CleantalkUpgraderSkin(compact('title', 'nonce', 'url', 'plugin_slug', 'prev_version'))
1947
- );
1948
- } else {
1949
- $rollback = new CleantalkUpgrader(
1950
- new CleantalkUpgraderSkinDeprecated(compact('title', 'nonce', 'url', 'plugin_slug', 'prev_version'))
1951
  );
1952
- }
1953
  $rollback->rollback($plugin);
1954
 
1955
  apbct_maintenance_mode__disable();
1956
 
1957
- // @todo add execution time
1958
-
1959
- $response = array(
1960
- 'error' => 'BAD_HTTP_CODE',
1961
- 'http_code' => $httpResponseCode,
1962
- 'output' => substr(file_get_contents(get_option('home')), 0, 900),
1963
- 'rollback_result' => $rollback->apbct_result,
 
 
 
 
1964
  );
1965
-
1966
- die('FAIL ' . json_encode($response));
1967
  }
1968
 
1969
- $plugin_data = get_plugin_data(__FILE__);
1970
- $apbct_agent = 'wordpress-' . str_replace('.', '', $plugin_data['Version']);
1971
- ct_send_feedback('0:' . $apbct_agent);
1972
-
1973
- die('OK ' . json_encode(array('agent' => $apbct_agent)));
1974
  }
1975
 
1976
- die('FAIL ' . json_encode(array('error' => $upgrader->apbct_result)));
1977
  }
1978
 
1979
  /**
@@ -2093,6 +2137,38 @@ function apbct_maintenance_mode__disable()
2093
  }
2094
  }
2095
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2096
  /**
2097
  * Getting brief data
2098
  *
@@ -2161,6 +2237,14 @@ function apbct_store__urls()
2161
  {
2162
  global $apbct;
2163
 
 
 
 
 
 
 
 
 
2164
  if ( $apbct->settings['misc__store_urls'] && empty($apbct->flags__url_stored) && ! headers_sent() ) {
2165
  // URLs HISTORY
2166
  // Get current url
@@ -2518,7 +2602,7 @@ function apbct_is_user_enable($user = null)
2518
 
2519
  $user = $user !== null ? $user : $current_user;
2520
 
2521
- return ! (apbct_is_user_role_in(array('administrator', 'editor', 'author'), $user) || is_super_admin());
2522
  }
2523
 
2524
  /**
4
  Plugin Name: Anti-Spam by CleanTalk
5
  Plugin URI: https://cleantalk.org
6
  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.
7
+ Version: 5.172
8
  Author: СleanTalk <welcome@cleantalk.org>
9
  Author URI: https://cleantalk.org
10
  Text Domain: cleantalk-spam-protect
32
  use Cleantalk\Common\DNS;
33
  use Cleantalk\Common\Firewall;
34
  use Cleantalk\Common\Schema;
35
+ use Cleantalk\Variables\Get;
36
  use Cleantalk\Variables\Request;
37
  use Cleantalk\Variables\Server;
38
 
354
  add_action('wp_ajax_nopriv_dt_send_mail', 'apbct_form__the7_contact_form', 1);
355
  add_action('wp_ajax_dt_send_mail', 'apbct_form__the7_contact_form', 1);
356
 
 
 
 
 
357
  // Custom register form (ticket_id=13668)
358
  add_action('website_neotrends_signup_fields_check', function ($username, $fields) {
359
  $ip = Helper::ipGet('real', false);
1877
  {
1878
  global $wp_version;
1879
 
1880
+ // Check download_source if set
1881
+ if ( Get::get('download_source') ) {
1882
+ switch ( Get::get('download_source') ) {
1883
+ case 'cleantalk':
1884
+ $download_url = 'https://download.cleantalk.org/antispam/wordpress/cleantalk-spam-protect._VERSION_.zip';
1885
+ break;
1886
+ case 'wordpress':
1887
+ $download_url = 'https://downloads.wordpress.org/plugin/cleantalk-spam-protect._VERSION_.zip';
1888
+ break;
1889
+ case 'github':
1890
+ $download_url = 'https://github.com/CleanTalk/wordpress-antispam/releases/download/_VERSION_/cleantalk-spam-protect._VERSION_.zip';
1891
+ break;
1892
+ default:
1893
+ apbct_update__outputResult('CHECK_INPUT', false, array('error' => 'download_source is wrong'));
1894
+ break;
1895
+ }
1896
+ }
1897
+
1898
+ // Check download_version if set
1899
+ if ( Get::get('download_version') ) {
1900
+ if ( ! preg_match('@^\d+\.\d+(\.\d+)?$@', Get::get('download_version')) ) {
1901
+ apbct_update__outputResult(
1902
+ 'CHECK_INPUT',
1903
+ false,
1904
+ array('error' => 'Download version (' . Get::get('download_version') . ') is wrong')
1905
+ );
1906
+ }
1907
+ $download_version = Get::get('download_version');
1908
+ }
1909
+
1910
+ if ( isset($download_url, $download_version) ) {
1911
+ $download_url = str_replace('_VERSION_', $download_version, $download_url);
1912
+
1913
+ if ( Helper::httpRequestGetResponseCode($download_url) !== 200 ) {
1914
+ apbct_update__outputResult(
1915
+ 'CHECK_SOURCE',
1916
+ false,
1917
+ array('error' => 'Package is unavailable', 'package' => $download_url)
1918
+ );
1919
+ }
1920
+
1921
+ add_filter(
1922
+ 'site_transient_update_plugins',
1923
+ function ($value, $_transient) use ($download_url) {
1924
+ $value->response['cleantalk-spam-protect/cleantalk.php'] = (object)array(
1925
+ 'package' => $download_url,
1926
+ );
1927
+
1928
+ return $value;
1929
+ },
1930
+ 1000,
1931
+ 2
1932
+ );
1933
+ }
1934
+
1935
  //Upgrade params
1936
  $plugin = 'cleantalk-spam-protect/cleantalk.php';
1937
  $plugin_slug = 'cleantalk-spam-protect';
1968
 
1969
  apbct_maintenance_mode__disable();
1970
 
1971
+ apbct_update__outputResult(
1972
+ 'UPDATE',
1973
+ $upgrader->apbct_result
1974
+ );
 
 
1975
 
1976
  if ( $upgrader->apbct_result === 'OK' ) {
1977
+ $result = activate_plugins($plugin);
 
 
 
 
 
 
 
 
 
1978
 
1979
+ apbct_update__outputResult(
1980
+ 'PLUGIN_ACTIVATING',
1981
+ is_wp_error($result) || $result === false ? 'FAIL' : 'OK',
1982
+ array('wp_error' => is_wp_error($result) ? $result->get_error_message() : '')
1983
+ );
1984
 
1985
+ $httpResponseCode = Helper::httpRequestGetResponseCode(get_option('home'));
 
1986
 
1987
+ if ( $httpResponseCode != 200 ) {
1988
  // Rollback
1989
+ apbct_maintenance_mode__enable(30);
1990
+
1991
+ $rollback = version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0
1992
+ ? new CleantalkUpgrader(new CleantalkUpgraderSkin(compact('title', 'nonce', 'url', 'plugin')))
1993
+ : new CleantalkUpgrader(
1994
+ new CleantalkUpgraderSkinDeprecated(compact('title', 'nonce', 'url', 'plugin'))
 
1995
  );
 
1996
  $rollback->rollback($plugin);
1997
 
1998
  apbct_maintenance_mode__disable();
1999
 
2000
+ apbct_update__outputResult(
2001
+ 'CHECK_RESPONSE',
2002
+ 'FAIL',
2003
+ array(
2004
+ 'error' => 'BAD_HTTP_CODE',
2005
+ 'http_code' => $httpResponseCode,
2006
+ 'output' => htmlspecialchars(
2007
+ substr(Helper::httpRequestGetContent(get_option('home')), 0, 900)
2008
+ ),
2009
+ 'rollback_result' => $rollback->apbct_result,
2010
+ )
2011
  );
 
 
2012
  }
2013
 
2014
+ apbct_update__outputResult(
2015
+ 'CHECK_RESPONSE',
2016
+ 'OK'
2017
+ );
 
2018
  }
2019
 
2020
+ die('FUNCTION IS COMPLETE. OK.');
2021
  }
2022
 
2023
  /**
2137
  }
2138
  }
2139
 
2140
+ /**
2141
+ * @param $stage
2142
+ * @param $result
2143
+ * @param array $response
2144
+ *
2145
+ * @return void
2146
+ */
2147
+ function apbct_update__outputResult($stage, $result, $response = array())
2148
+ {
2149
+ $response['stage'] = $stage;
2150
+ $response['error'] = isset($response['error']) ? $response['error'] : '';
2151
+
2152
+ if ( $result === true ) {
2153
+ $result = 'OK';
2154
+ }
2155
+ if ( $result === false ) {
2156
+ $result = 'FAIL';
2157
+ }
2158
+
2159
+ $response['error'] = $response['error'] ?: '';
2160
+ $response['error'] = $result !== 'OK' && empty($response['error']) ? $result : $response['error'];
2161
+ $response['agent'] = APBCT_AGENT;
2162
+
2163
+ echo $result . ' ' . json_encode($response);
2164
+
2165
+ if ( $result === 'FAIL' ) {
2166
+ die();
2167
+ }
2168
+
2169
+ echo '<br>';
2170
+ }
2171
+
2172
  /**
2173
  * Getting brief data
2174
  *
2237
  {
2238
  global $apbct;
2239
 
2240
+ if (
2241
+ $apbct->data['cookies_type'] === 'none' || // Do not set cookies if option is disabled (for Varnish cache).
2242
+ ! empty($apbct->flags__cookies_setuped) || // Cookies already set
2243
+ ! empty($apbct->headers_sent) // Headers sent
2244
+ ) {
2245
+ return false;
2246
+ }
2247
+
2248
  if ( $apbct->settings['misc__store_urls'] && empty($apbct->flags__url_stored) && ! headers_sent() ) {
2249
  // URLs HISTORY
2250
  // Get current url
2602
 
2603
  $user = $user !== null ? $user : $current_user;
2604
 
2605
+ return ! (apbct_is_user_role_in(array('administrator', 'editor', 'author'), $user) || apbct_is_super_admin());
2606
  }
2607
 
2608
  /**
css/cleantalk-admin-settings-page.min.css CHANGED
@@ -1 +1 @@
1
- .apbct_settings-field_content,.cleantalk_link-auto,.cleantalk_link-manual,.ct-warning-test-failed,.ct_rate_block,.ct_settings_banner,i.animate-spin{display:inline-block}#apbctTopWarning{margin-bottom:5px}#apbctTopWarning h3{margin:10px 0 5px}#apbctTopWarning h4{margin:10px}#apbctTopWarning h4 span{margin-top:5px}.apbct_settings-subtitle{position:relative;top:-15px;margin:0}.apbct_settings-field_wrapper{margin:15px 0}.apbct_settings-field_wrapper--sub{margin-left:30px!important}.apbct_settings__label{margin-right:10px;font-size:17px;vertical-align:text-bottom}.apbct_settings-field_content--radio,.apbct_settings-field_wrapper>.apbct_settings-field_description{width:70%}.apbct_settings-field_title--radio{display:inline-block;margin:0;width:210px;padding-right:10px;font-size:14px;vertical-align:top}.apbct_input_text{min-width:255px;width:400px}.apbct_settings-field--api_key{font-size:14pt}.apbct_settings-long_description---show:hover{color:#aaa;cursor:pointer}.apbct_setting_textarea{min-width:300px}.cleantalk_link{text-decoration:none;font-size:13px;line-height:26px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cleantalk_link-auto{background:#ccc;border-color:#999;-webkit-box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);color:#000;height:28px;-webkit-border-radius:2px;border-radius:2px}.cleantalk_link-auto:hover{color:#fff}.cleantalk_link-manual{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;-webkit-border-radius:3px;border-radius:3px;text-align:center}.cleantalk_link-manual:hover{color:#000}.cleantalk_link[disabled=disabled]{background:#5d9db5;color:#000}.apbct_status_icon{vertical-align:text-bottom;margin:0 5px 0 8px}a.ct_support_link{color:#666;margin-right:.5em;font-size:10pt;font-weight:400}.ct-warning-test-failed{position:relative;padding:5px;margin:4px;border:3px solid rgba(240,50,50,1);border-radius:5px;background-color:rgba(255,200,200,1)}.ct_settings_banner{text-align:right;width:100%;margin:1em 0;vertical-align:top}#cleantalk-modal-content,.ct_rate_block{text-align:center}#ct_translate_plugin{margin-left:0}.ct_rate_block{width:370px;margin-right:3em;padding:.8em .8em 15px;border:1px dashed #666}#ct_translate_plugin .apbct_button_rate{margin-bottom:10px}.apbct_long_desc{position:absolute;background:#5a5a5a;min-width:80px;min-height:80px;max-width:500px;padding:10px;color:#fff;z-index:10}i.animate-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;font-size:25px;line-height:20px;color:rgba(120,200,230,1);margin:25px}@keyframes spin{to{transform:rotate(359deg)}}.apbct_long_desc__cancel{position:absolute;top:5px;right:5px;color:rgba(255,255,255,.5)}.apbct_long_desc__cancel:hover{color:#fff}.apbct_long_desc__angle{position:absolute;top:5px;left:-17px;width:10px;height:10px;background:#5a5a5a;-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);-webkit-transform-origin:100% 100%;-ms-transform-origin:100% 100%;transform-origin:100% 100%}.apbct_long_desc__title{color:rgba(120,200,230,1);margin:0}.--hide{display:none}.apbct_preloader_button{height:15px;margin-left:5px;vertical-align:text-top;display:none}#cleantalk-modal-content>*{display:block;width:100%}button.ct_support_link{border:none;background:0 0;color:#666;text-decoration:underline;cursor:pointer}.apbct-btn-as-link{padding:0;margin:0;vertical-align:baseline;color:gray;border:0;border-bottom:1px solid;cursor:pointer}#apbct-account-email[contenteditable=true]{padding:6px;background-color:#fff;border:1px solid #ccc}button[value=save_changes]:disabled{color:#2271b1;border-color:#2271b1;background:#f6f7f7}#apbct_settings__advanced_settings{position:relative}#apbct_settings__advanced_settings_inner{width:70%}#apbct_hidden_section_nav{position:absolute;top:0;right:20px}#apbct_settings__after_advanced_settings{margin-bottom:20px}#apbct_settings__button_section{position:fixed;z-index:9999;width:100%;padding-bottom:40px}
1
+ .apbct_settings-field_content,.apbct_settings-field_title--radio,.cleantalk_link-auto,.cleantalk_link-manual,.ct-warning-test-failed,.ct_rate_block,.ct_settings_banner,i.animate-spin{display:inline-block}#apbctTopWarning{margin-bottom:5px}#apbctTopWarning h3{margin:10px 0 5px}#apbctTopWarning h4{margin:10px}#apbctTopWarning h4 span{margin-top:5px}.apbct_settings-subtitle{position:relative;top:-15px;margin:0}.apbct_settings-field_wrapper{margin:15px 0}.apbct_settings-field_wrapper--sub{margin-left:30px!important}.apbct_settings__label{margin-right:10px;font-size:17px;vertical-align:text-bottom}.apbct_settings-field_content--radio,.apbct_settings-field_wrapper>.apbct_settings-field_description{width:70%}.apbct_settings-field_title--radio{margin:0;width:210px;padding-right:10px;font-size:14px;vertical-align:top}.apbct_input_text{min-width:255px;width:400px}.apbct_settings-field--api_key{font-size:14pt}.apbct_settings-long_description---show:hover{color:#aaa;cursor:pointer}.apbct_setting_textarea{min-width:300px}.cleantalk_link{text-decoration:none;font-size:13px;line-height:26px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cleantalk_link-auto{background:#ccc;border-color:#999;-webkit-box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);color:#000;height:28px;-webkit-border-radius:2px;border-radius:2px}.cleantalk_link-auto:hover{color:#fff}.cleantalk_link-manual{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;-webkit-border-radius:3px;border-radius:3px;text-align:center}.cleantalk_link-manual:hover{color:#000}.cleantalk_link[disabled=disabled]{background:#5d9db5;color:#000}.apbct_status_icon{vertical-align:text-bottom;margin:0 5px 0 8px}a.ct_support_link{color:#666;margin-right:.5em;font-size:10pt;font-weight:400}.ct-warning-test-failed{position:relative;padding:5px;margin:4px;border:3px solid rgba(240,50,50,1);border-radius:5px;background-color:rgba(255,200,200,1)}.ct_settings_banner{text-align:right;width:100%;margin:1em 0;vertical-align:top}#cleantalk-modal-content,.ct_rate_block{text-align:center}#ct_translate_plugin{margin-left:0}.ct_rate_block{width:370px;margin-right:3em;padding:.8em .8em 15px;border:1px dashed #666}#ct_translate_plugin .apbct_button_rate{margin-bottom:10px}.apbct_long_desc{position:absolute;background:#5a5a5a;min-width:80px;min-height:80px;max-width:500px;padding:10px;color:#fff;z-index:10}.apbct_long_desc a,i.animate-spin{color:rgba(120,200,230,1)}i.animate-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;font-size:25px;line-height:20px;margin:25px}@keyframes spin{to{transform:rotate(359deg)}}.apbct_long_desc__cancel{position:absolute;top:5px;right:5px;color:rgba(255,255,255,.5)}.apbct_long_desc__cancel:hover{color:#fff}.apbct_long_desc__angle{position:absolute;top:5px;left:-17px;width:10px;height:10px;background:#5a5a5a;-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);-webkit-transform-origin:100% 100%;-ms-transform-origin:100% 100%;transform-origin:100% 100%}.apbct_long_desc__title{color:rgba(120,200,230,1);margin:0}.--hide{display:none}.apbct_preloader_button{height:15px;margin-left:5px;vertical-align:text-top;display:none}#cleantalk-modal-content>*{display:block;width:100%}button.ct_support_link{border:none;background:0 0;color:#666;text-decoration:underline;cursor:pointer}.apbct-btn-as-link{padding:0;margin:0;vertical-align:baseline;color:gray;border:0;border-bottom:1px solid;cursor:pointer}#apbct-account-email[contenteditable=true]{padding:6px;background-color:#fff;border:1px solid #ccc}button[value=save_changes]:disabled{color:#2271b1;border-color:#2271b1;background:#f6f7f7}#apbct_settings__advanced_settings{position:relative}#apbct_settings__advanced_settings_inner{width:70%}#apbct_hidden_section_nav{position:absolute;top:0;right:20px}#apbct_settings__after_advanced_settings{margin-bottom:20px}#apbct_settings__button_section{position:fixed;z-index:9999;width:100%;padding-bottom:40px}
css/cleantalk-public-admin.min.css CHANGED
@@ -1 +1 @@
1
- .ct_hidden{display:none}.ct_comment_info a,.ct_comment_info img,p.ct_comment_info_title{display:inline-block}.ct_comment_info{position:relative;font-size:11px;line-height:12px;margin-bottom:15px}.ct_comment_titles{border-bottom:1px solid gray!important;background:inherit;margin-bottom:15px}p.ct_comment_logo_title{float:right;display:inline-block}.ct_comment_logo_img{height:12px;vertical-align:text-top;box-shadow:transparent 0 0 0!important}.ct_this_is{padding:2px 3px;cursor:pointer;white-space:nowrap;color:#000!important;background:rgba(230,230,230,1);border:1px solid #777;border-radius:4px}p.ct_feedback_wrap{display:none;position:absolute;top:37px;left:0;width:100%;height:27px;margin:0;padding:6px;border-radius:3px;background:#fff}.ct_feedback_result{display:none;text-decoration:underline}.ct_feedback_result_spam{color:red}.ct_feedback_result_not_spam{color:green}.ct_feedback_msg a{color:green!important;text-decoration:underline}.ct_feedback_success{color:green}.ct_feedback_error{color:red}.ct_feedback_no_hash{color:#00f}
1
+ .ct_hidden{display:none}.ct_comment_info a,.ct_comment_info img,p.ct_comment_info_title,p.ct_comment_logo_title{display:inline-block}.ct_comment_info{position:relative;font-size:11px;line-height:12px;margin-bottom:15px}.ct_comment_titles{border-bottom:1px solid gray!important;background:inherit;margin-bottom:15px}p.ct_comment_logo_title{float:right}.ct_comment_logo_img{height:12px;vertical-align:text-top;box-shadow:transparent 0 0 0!important}.ct_this_is{padding:2px 3px;cursor:pointer;white-space:nowrap;color:#000!important;background:rgba(230,230,230,1);border:1px solid #777;border-radius:4px}p.ct_feedback_wrap{display:none;position:absolute;top:37px;left:0;width:100%;height:27px;margin:0;padding:6px;border-radius:3px;background:#fff}.ct_feedback_result{display:none;text-decoration:underline}.ct_feedback_result_spam{color:red}.ct_feedback_result_not_spam{color:green}.ct_feedback_msg a{color:green!important;text-decoration:underline}.ct_feedback_success{color:green}.ct_feedback_error{color:red}.ct_feedback_no_hash{color:#00f}
inc/cleantalk-ajax.php CHANGED
@@ -128,6 +128,15 @@ if ( class_exists('LFB_Core') ) {
128
  $_cleantalk_hooked_actions[] = 'send_email';
129
  }
130
 
 
 
 
 
 
 
 
 
 
131
  /**
132
  * AjaxLogin plugin handler
133
  *
@@ -250,6 +259,8 @@ function ct_mc4wp_ajax_hook(array $errors)
250
  * @return array|bool|string|null
251
  *
252
  * @throws Exception
 
 
253
  */
254
  function ct_ajax_hook($message_obj = null)
255
  {
@@ -518,6 +529,23 @@ function ct_ajax_hook($message_obj = null)
518
  $ct_post_temp = $_POST['data'];
519
  }
520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  /**
522
  * Filter for POST
523
  */
128
  $_cleantalk_hooked_actions[] = 'send_email';
129
  }
130
 
131
+ /* Fusion Builder Avada Forms integration */
132
+ add_action('wp_ajax_nopriv_fusion_form_submit_form_to_database_email', 'ct_ajax_hook', 1);
133
+ $_cleantalk_hooked_actions[] = 'fusion_form_submit_form_to_database_email';
134
+
135
+ // Elementor Pro page builder forms
136
+ add_action('wp_ajax_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam');
137
+ add_action('wp_ajax_nopriv_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam');
138
+ $_cleantalk_hooked_actions[] = 'elementor_pro_forms_send_form';
139
+
140
  /**
141
  * AjaxLogin plugin handler
142
  *
259
  * @return array|bool|string|null
260
  *
261
  * @throws Exception
262
+ *
263
+ * @psalm-suppress ComplexFunction
264
  */
265
  function ct_ajax_hook($message_obj = null)
266
  {
529
  $ct_post_temp = $_POST['data'];
530
  }
531
 
532
+ // Fusion Builder Avada Form integration
533
+ if (Post::hasString('action', 'fusion_form_submit_form_to_database_email')) {
534
+ if (Post::get('formData')) {
535
+ $form_data = Post::get('formData');
536
+ $form_data = explode('&', $form_data);
537
+
538
+ for ($index = 0; $index < count($form_data); $index++) {
539
+ if (stripos($form_data[$index], 'apbct_visible_fields') === 0) {
540
+ unset($form_data[$index]);
541
+ }
542
+ }
543
+
544
+ $form_data = implode('&', $form_data);
545
+ $_POST['formData'] = $form_data;
546
+ }
547
+ }
548
+
549
  /**
550
  * Filter for POST
551
  */
inc/cleantalk-pluggable.php CHANGED
@@ -112,6 +112,37 @@ function apbct_wp_validate_auth_cookie($cookie = '', $scheme = '')
112
  }
113
  }
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  /**
116
  * Gets REST url
117
  *
@@ -720,7 +751,7 @@ function apbct_is_skip_request($ajax = false)
720
  }
721
  // Elementor pro forms has a direct integration
722
  if (
723
- apbct_is_plugin_active('security-malware-firewall/security-malware-firewall.php') &&
724
  Post::get('action') === 'elementor_pro_forms_send_form' &&
725
  Post::get('post_id') !== '' &&
726
  Post::get('form_id') !== '' &&
@@ -852,6 +883,14 @@ function apbct_is_skip_request($ajax = false)
852
  ) {
853
  return 'GridBuilder service actions';
854
  }
 
 
 
 
 
 
 
 
855
  }
856
 
857
  return false;
112
  }
113
  }
114
 
115
+ /**
116
+ * Checks if the user is a super admin
117
+ *
118
+ * @return boolean
119
+ */
120
+ function apbct_is_super_admin($user_id = false)
121
+ {
122
+ if (! $user_id) {
123
+ $user = apbct_wp_get_current_user();
124
+ } else {
125
+ $user = get_userdata($user_id);
126
+ }
127
+
128
+ if (! $user || ! $user->exists()) {
129
+ return false;
130
+ }
131
+
132
+ if (is_multisite()) {
133
+ $super_admins = get_super_admins();
134
+ if (is_array($super_admins) && in_array($user->user_login, $super_admins, true)) {
135
+ return true;
136
+ }
137
+ } else {
138
+ if ($user->has_cap('delete_users')) {
139
+ return true;
140
+ }
141
+ }
142
+
143
+ return false;
144
+ }
145
+
146
  /**
147
  * Gets REST url
148
  *
751
  }
752
  // Elementor pro forms has a direct integration
753
  if (
754
+ apbct_is_plugin_active('elementor-pro/elementor-pro.php') &&
755
  Post::get('action') === 'elementor_pro_forms_send_form' &&
756
  Post::get('post_id') !== '' &&
757
  Post::get('form_id') !== '' &&
883
  ) {
884
  return 'GridBuilder service actions';
885
  }
886
+ // WSForms - this is the direct integration and service requests skip
887
+ if (
888
+ apbct_is_plugin_active('ws-form-pro/ws-form.php') &&
889
+ ( ( Post::get('wsf_form_id') !== '' && Post::get('wsf_post_id') !== '' ) ||
890
+ (int) Post::get('wsffid') > 0 )
891
+ ) {
892
+ return 'WSForms skip';
893
+ }
894
  }
895
 
896
  return false;
inc/cleantalk-public-integrations.php CHANGED
@@ -789,7 +789,7 @@ function apbct_form__formidable__testSpam($errors, $_form)
789
  die();
790
  }
791
 
792
- $errors['ct_error'] = '<br /><b>' . $ct_result->comment . '</b><br /><br />';
793
  }
794
 
795
  return $errors;
@@ -1864,7 +1864,7 @@ function apbct_form__contactForm7__testSpam($spam, $_submission = null)
1864
  if (
1865
  $apbct->settings['forms__contact_forms_test'] == 0 ||
1866
  ($spam === false && defined('WPCF7_VERSION') && WPCF7_VERSION < '3.0.0') ||
1867
- ($spam === true && defined('WPCF7_VERSION') && WPCF7_VERSION >= '3.0.0') ||
1868
  ($apbct->settings['data__protect_logged_in'] != 1 && apbct_is_user_logged_in()) || // Skip processing for logged in users.
1869
  apbct_exclusions_check__url() ||
1870
  apbct_exclusions_check__ip() ||
@@ -3221,3 +3221,48 @@ function apbct_form__uwp_validate($result, $_type, $data)
3221
 
3222
  return $result;
3223
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  die();
790
  }
791
 
792
+ ct_die(null, null);
793
  }
794
 
795
  return $errors;
1864
  if (
1865
  $apbct->settings['forms__contact_forms_test'] == 0 ||
1866
  ($spam === false && defined('WPCF7_VERSION') && WPCF7_VERSION < '3.0.0') ||
1867
+ ($spam === true && defined('WPCF7_VERSION') && WPCF7_VERSION >= '3.0.0' && ! Post::get('apbct_visible_fields')) ||
1868
  ($apbct->settings['data__protect_logged_in'] != 1 && apbct_is_user_logged_in()) || // Skip processing for logged in users.
1869
  apbct_exclusions_check__url() ||
1870
  apbct_exclusions_check__ip() ||
3221
 
3222
  return $result;
3223
  }
3224
+
3225
+ /**
3226
+ * WS-Forms integration
3227
+ */
3228
+ add_filter('wsf_submit_field_validate', function ($error_validation_action_field, $field_id, $_field_value, $section_repeatable_index, $_post_mode, $_form_submit_class) {
3229
+
3230
+ global $cleantalk_executed;
3231
+
3232
+ if ( $cleantalk_executed ) {
3233
+ return $error_validation_action_field;
3234
+ }
3235
+
3236
+ /**
3237
+ * Filter for POST
3238
+ */
3239
+ $input_array = apply_filters('apbct__filter_post', $_POST);
3240
+ $data = ct_gfa($input_array);
3241
+
3242
+ $sender_email = ($data['email'] ? : '');
3243
+ $sender_nickname = ($data['nickname'] ? : '');
3244
+ $message = ($data['message'] ? : array());
3245
+
3246
+ $base_call_result = apbct_base_call(
3247
+ array(
3248
+ 'message' => $message,
3249
+ 'sender_email' => $sender_email,
3250
+ 'sender_nickname' => $sender_nickname,
3251
+ 'post_info' => array( 'comment_type' => 'WS_forms' ),
3252
+ 'sender_info' => array('sender_email' => urlencode($sender_email)),
3253
+ )
3254
+ );
3255
+
3256
+ if ( $base_call_result['ct_result']->allow == 0 ) {
3257
+ return array(
3258
+ 'action' => 'field_invalid_feedback',
3259
+ 'field_id' => $field_id,
3260
+ 'section_repeatable_index' => $section_repeatable_index,
3261
+ 'message' => $base_call_result['ct_result']->comment
3262
+ );
3263
+ }
3264
+
3265
+ $cleantalk_executed = true;
3266
+
3267
+ return $error_validation_action_field;
3268
+ }, 10, 6);
inc/cleantalk-settings.php CHANGED
@@ -361,6 +361,7 @@ function apbct_settings__set_fileds()
361
  'This option hides the "Website" field on the comment form.',
362
  'cleantalk-spam-protect'
363
  ),
 
364
  'display' => ! $apbct->white_label,
365
  ),
366
  ),
@@ -446,6 +447,7 @@ function apbct_settings__set_fileds()
446
  'cleantalk-spam-protect'
447
  )
448
  . '</b>',
 
449
  'input_type' => 'radio',
450
  'options' => array(
451
  array('val' => 1, 'label' => __('On', 'cleantalk-spam-protect'), 'childrens_enable' => 0,),
@@ -503,6 +505,7 @@ function apbct_settings__set_fileds()
503
  '"Auto" use JavaScript option if cache solutions are found.',
504
  'cleantalk-spam-protect'
505
  ),
 
506
  'options' => array(
507
  array('val' => 1, 'label' => __('Via direct output', 'cleantalk-spam-protect'),),
508
  array('val' => 2, 'label' => __('Via JavaScript', 'cleantalk-spam-protect'),),
@@ -652,6 +655,7 @@ function apbct_settings__set_fileds()
652
  'Anti-Crawler includes blocking bots by the User-Agent. Use Personal lists in the Dashboard to filter specific User-Agents.',
653
  'cleantalk-spam-protect'
654
  ),
 
655
  ),
656
  'sfw__anti_flood' => array(
657
  'type' => 'checkbox',
@@ -663,6 +667,7 @@ function apbct_settings__set_fileds()
663
  'Shows the SpamFireWall page for bots trying to crawl your site. Look at the page limit setting below.',
664
  'cleantalk-spam-protect'
665
  ),
 
666
  ),
667
  'sfw__anti_flood__view_limit' => array(
668
  'type' => 'text',
@@ -1847,6 +1852,11 @@ function apbct_settings__field__draw($params = array())
1847
  switch ( $params['type'] ) {
1848
  // Checkbox type
1849
  case 'checkbox':
 
 
 
 
 
1850
  echo '<input
1851
  type="checkbox"
1852
  name="cleantalk_settings[' . $params['name'] . ']"
@@ -1864,10 +1874,8 @@ function apbct_settings__field__draw($params = array())
1864
  . ' />'
1865
  . '<label for="apbct_setting_' . $params['name'] . '" class="apbct_setting-field_title--' . $params['type'] . '">'
1866
  . $params['title']
1867
- . '</label>';
1868
- echo isset($params['long_description'])
1869
- ? '<i setting="' . $params['name'] . '" class="apbct_settings-long_description---show apbct-icon-help-circled"></i>'
1870
- : '';
1871
  echo '<div class="apbct_settings-field_description">'
1872
  . $params['description']
1873
  . '</div>';
@@ -1875,14 +1883,15 @@ function apbct_settings__field__draw($params = array())
1875
 
1876
  // Radio type
1877
  case 'radio':
 
 
 
 
 
 
1878
  // Title
1879
  echo isset($params['title'])
1880
- ? '<h4 class="apbct_settings-field_title apbct_settings-field_title--' . $params['type'] . '">' . $params['title'] . '</h4>'
1881
- : '';
1882
-
1883
- // Popup description
1884
- echo isset($params['long_description'])
1885
- ? '<i setting="' . $params['name'] . '" class="apbct_settings-long_description---show apbct-icon-help-circled"></i>'
1886
  : '';
1887
 
1888
  echo '<div class="apbct_settings-field_content apbct_settings-field_content--' . $params['type'] . '">';
@@ -1917,8 +1926,13 @@ function apbct_settings__field__draw($params = array())
1917
 
1918
  // Dropdown list type
1919
  case 'select':
 
 
 
 
 
1920
  echo isset($params['title'])
1921
- ? '<h4 class="apbct_settings-field_title apbct_settings-field_title--' . $params['type'] . '">' . $params['title'] . '</h4>'
1922
  : '';
1923
  echo '<select'
1924
  . ' id="apbct_setting_' . $params['name'] . '"'
@@ -1948,9 +1962,6 @@ function apbct_settings__field__draw($params = array())
1948
  }
1949
 
1950
  echo '</select>';
1951
- echo isset($params['long_description'])
1952
- ? '<i setting="' . $params['name'] . '" class="apbct_settings-long_description---show apbct-icon-help-circled"></i>'
1953
- : '';
1954
  echo isset($params['description'])
1955
  ? '<div class="apbct_settings-field_description">' . $params['description'] . '</div>'
1956
  : '';
@@ -2585,8 +2596,48 @@ function apbct_settings__get__long_description()
2585
  'cleantalk-spam-protect'
2586
  )
2587
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2588
  );
2589
 
 
 
 
 
 
2590
  die(json_encode($descriptions[$setting_id]));
2591
  }
2592
 
361
  'This option hides the "Website" field on the comment form.',
362
  'cleantalk-spam-protect'
363
  ),
364
+ 'long_description' => true,
365
  'display' => ! $apbct->white_label,
366
  ),
367
  ),
447
  'cleantalk-spam-protect'
448
  )
449
  . '</b>',
450
+ 'long_description' => true,
451
  'input_type' => 'radio',
452
  'options' => array(
453
  array('val' => 1, 'label' => __('On', 'cleantalk-spam-protect'), 'childrens_enable' => 0,),
505
  '"Auto" use JavaScript option if cache solutions are found.',
506
  'cleantalk-spam-protect'
507
  ),
508
+ 'long_description' => true,
509
  'options' => array(
510
  array('val' => 1, 'label' => __('Via direct output', 'cleantalk-spam-protect'),),
511
  array('val' => 2, 'label' => __('Via JavaScript', 'cleantalk-spam-protect'),),
655
  'Anti-Crawler includes blocking bots by the User-Agent. Use Personal lists in the Dashboard to filter specific User-Agents.',
656
  'cleantalk-spam-protect'
657
  ),
658
+ 'long_description' => true,
659
  ),
660
  'sfw__anti_flood' => array(
661
  'type' => 'checkbox',
667
  'Shows the SpamFireWall page for bots trying to crawl your site. Look at the page limit setting below.',
668
  'cleantalk-spam-protect'
669
  ),
670
+ 'long_description' => true,
671
  ),
672
  'sfw__anti_flood__view_limit' => array(
673
  'type' => 'text',
1852
  switch ( $params['type'] ) {
1853
  // Checkbox type
1854
  case 'checkbox':
1855
+ // Popup description
1856
+ $popup = '';
1857
+ if ( isset($params['long_description']) ) {
1858
+ $popup = '<i setting="' . $params['name'] . '" class="apbct_settings-long_description---show apbct-icon-help-circled"></i>';
1859
+ }
1860
  echo '<input
1861
  type="checkbox"
1862
  name="cleantalk_settings[' . $params['name'] . ']"
1874
  . ' />'
1875
  . '<label for="apbct_setting_' . $params['name'] . '" class="apbct_setting-field_title--' . $params['type'] . '">'
1876
  . $params['title']
1877
+ . '</label>'
1878
+ . $popup;
 
 
1879
  echo '<div class="apbct_settings-field_description">'
1880
  . $params['description']
1881
  . '</div>';
1883
 
1884
  // Radio type
1885
  case 'radio':
1886
+ // Popup description
1887
+ $popup = '';
1888
+ if ( isset($params['long_description']) ) {
1889
+ $popup = '<i setting="' . $params['name'] . '" class="apbct_settings-long_description---show apbct-icon-help-circled"></i>';
1890
+ }
1891
+
1892
  // Title
1893
  echo isset($params['title'])
1894
+ ? '<h4 class="apbct_settings-field_title apbct_settings-field_title--' . $params['type'] . '">' . $params['title'] . $popup . '</h4>'
 
 
 
 
 
1895
  : '';
1896
 
1897
  echo '<div class="apbct_settings-field_content apbct_settings-field_content--' . $params['type'] . '">';
1926
 
1927
  // Dropdown list type
1928
  case 'select':
1929
+ // Popup description
1930
+ $popup = '';
1931
+ if ( isset($params['long_description']) ) {
1932
+ $popup = '<i setting="' . $params['name'] . '" class="apbct_settings-long_description---show apbct-icon-help-circled"></i>';
1933
+ }
1934
  echo isset($params['title'])
1935
+ ? '<h4 class="apbct_settings-field_title apbct_settings-field_title--' . $params['type'] . '">' . $params['title'] . $popup . '</h4>'
1936
  : '';
1937
  echo '<select'
1938
  . ' id="apbct_setting_' . $params['name'] . '"'
1962
  }
1963
 
1964
  echo '</select>';
 
 
 
1965
  echo isset($params['description'])
1966
  ? '<div class="apbct_settings-field_description">' . $params['description'] . '</div>'
1967
  : '';
2596
  'cleantalk-spam-protect'
2597
  )
2598
  ),
2599
+ 'data__set_cookies' => array(
2600
+ 'title' => __('Cookies setting', 'cleantalk-spam-protect'),
2601
+ 'desc' => sprintf(
2602
+ __('It determines what methods of using the HTTP cookies the Anti-Spam plugin for WordPress should switch to. It is necessary for the plugin to work properly. All CleanTalk cookies contain technical data. Data of the current website visitor is encrypted with the MD5 algorithm and being deleted when the browser session ends. %s', 'cleantalk-spam-protect'),
2603
+ '<a href="https://cleantalk.org/help/set-cookies-option{utm_mark}" target="_blank">' . __('Learn more about suboptions', 'cleantalk-spam-protect') . '</a>'
2604
+ )
2605
+ ),
2606
+ 'comments__hide_website_field' => array(
2607
+ 'title' => __('Hide the "Website" field', 'cleantalk-spam-protect'),
2608
+ 'desc' => sprintf(
2609
+ __('This «Website» field is frequently used by spammers to place spam links in it. CleanTalk helps you protect your WordPress website comments by hiding this field off. %s', 'cleantalk-spam-protect'),
2610
+ '<a href="https://cleantalk.org/help/how-to-hide-website-field-in-wordpress-comments{utm_mark}" target="_blank">' . __('Learn more.', 'cleantalk-spam-protect') . '</a>'
2611
+ )
2612
+ ),
2613
+ 'sfw__anti_crawler' => array(
2614
+ 'title' => __('Anti-Crawler', 'cleantalk-spam-protect'),
2615
+ 'desc' => sprintf(
2616
+ __('CleanTalk Anti-Crawler — this option is meant to block all types of bots visiting website pages that can search vulnerabilities on a website, attempt to hack a site, collect personal data, price parsing or content and images, generate 404 error pages, or aggressive website scanning bots. %s', 'cleantalk-spam-protect'),
2617
+ '<a href="https://cleantalk.org/help/anti-flood-and-anti-crawler{utm_mark}#anticrawl" target="_blank">' . __('Learn more.', 'cleantalk-spam-protect') . '</a>'
2618
+ )
2619
+ ),
2620
+ 'sfw__anti_flood' => array(
2621
+ 'title' => __('Anti-Flood', 'cleantalk-spam-protect'),
2622
+ 'desc' => sprintf(
2623
+ __('CleanTalk Anti-Flood — this option is meant to block aggressive bots. You can set the maximum number of website pages your visitors can click on within 1 minute. If any IP exceeds the set number it will get the CleanTalk blocking screen for 30 seconds. It\'s impossible for the IP to open any website pages while the 30-second timer takes place. %s', 'cleantalk-spam-protect'),
2624
+ '<a href="https://cleantalk.org/help/anti-flood-and-anti-crawler{utm_mark}#antiflood" target="_blank">' . __('Learn more.', 'cleantalk-spam-protect') . '</a>'
2625
+ )
2626
+ ),
2627
+ 'data__pixel' => array(
2628
+ 'title' => __('CleanTalk Pixel', 'cleantalk-spam-protect'),
2629
+ 'desc' => sprintf(
2630
+ __('It is an «invisible» 1×1px image that the Anti-Spam plugin integrates to your WordPress website. And when someone visits your website the Pixel is triggered and reports this visit and some other data including true IP address. %s', 'cleantalk-spam-protect'),
2631
+ '<a href="https://blog.cleantalk.org/introducing-cleantalk-pixel{utm_mark}" target="_blank">' . __('Learn more.', 'cleantalk-spam-protect') . '</a>'
2632
+ )
2633
+ ),
2634
  );
2635
 
2636
+ if ( ! empty($setting_id) ) {
2637
+ $utm = '?utm_source=apbct_hint_' . $setting_id . '&utm_medium=WordPress&utm_campaign=ABPCT_Settings';
2638
+ $descriptions[$setting_id]['desc'] = str_replace('{utm_mark}', $utm, $descriptions[$setting_id]['desc']);
2639
+ }
2640
+
2641
  die(json_encode($descriptions[$setting_id]));
2642
  }
2643
 
lib/Cleantalk/ApbctWP/Ajax.php CHANGED
@@ -173,7 +173,12 @@ class Ajax
173
  */
174
  private function wpNonceTick()
175
  {
176
- $nonce_life = apply_filters('nonce_life', DAY_IN_SECONDS);
 
 
 
 
 
177
 
178
  return ceil(time() / ($nonce_life / 2));
179
  }
173
  */
174
  private function wpNonceTick()
175
  {
176
+ if ( defined('CLEANTALK_NONCE_LIFETIME') && is_int(CLEANTALK_NONCE_LIFETIME) ) {
177
+ $nonce_lifetime = CLEANTALK_NONCE_LIFETIME;
178
+ } else {
179
+ $nonce_lifetime = DAY_IN_SECONDS;
180
+ }
181
+ $nonce_life = apply_filters('nonce_life', $nonce_lifetime);
182
 
183
  return ceil(time() / ($nonce_life / 2));
184
  }
lib/Cleantalk/ApbctWP/State.php CHANGED
@@ -96,7 +96,7 @@ class State extends \Cleantalk\Common\State
96
 
97
  // Exclusions
98
  // Send to the cloud some excepted requests
99
- 'exclusions__log_excluded_requests' => 1,
100
  'exclusions__urls' => '',
101
  'exclusions__urls__use_regexp' => 0,
102
  'exclusions__fields' => '',
96
 
97
  // Exclusions
98
  // Send to the cloud some excepted requests
99
+ 'exclusions__log_excluded_requests' => 0,
100
  'exclusions__urls' => '',
101
  'exclusions__urls__use_regexp' => 0,
102
  'exclusions__fields' => '',
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: spam, antispam, anti-spam, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 5.9
6
  Requires PHP: 5.6
7
- Stable tag: 5.171.2
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
@@ -594,6 +594,29 @@ If your website has forms that send data to external sources, you can enable opt
594
 
595
  == Changelog ==
596
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  = 5.171.2 Feb 09 2022 =
598
  #### Minor issue fixed.
599
  * Fix. Comments/Users checker. Date ranges validation fixed.
4
  Requires at least: 3.0
5
  Tested up to: 5.9
6
  Requires PHP: 5.6
7
+ Stable tag: 5.172
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
594
 
595
  == Changelog ==
596
 
597
+ = 5.172 Feb 17 2022 =
598
+ #### Updating system modified, settings long descriptions added and minor issues fixed.
599
+ * Fix: Fixed Fusion Builder Avada Form integration
600
+ * Fix: Fixed CF7 visible fields
601
+ * New. Updating system modified.
602
+ * Fix: Fixed apbct_store__urls()
603
+ * Fix. Updating system. Source url template fixed.
604
+ * Fix. Updating system. Redundant errors handling removed.
605
+ * New. Integration. WS-Forms integration implemented.
606
+ * Fix. Settings. Long description mark fixed.
607
+ * Upd. Settings. Set cookies setting long description added.
608
+ * Upd. Settings. Hide website field setting long description added.
609
+ * Upd. Settings. Anti-Crawler setting long description added.
610
+ * Fix. Settings. Long description mark for checkboxes fixed.
611
+ * Upd. Settings. Anti-Flood setting long description added.
612
+ * Upd. Settings. CleanTalk Pixel setting long description added.
613
+ * Mod: Replaced the is_super_admin() function with its own apbct_is_super_admin(
614
+ * Fix. Settings. Settings hints fixed.
615
+ * Upd. Ajax. Nonce lifetime constant added.
616
+ * Fix. Integration. Elementor pro forms integration fixed #2.
617
+ * Fix: Formidable Forms - fixed spam protection without JS
618
+ * Fix. Settings. Hints links contain UTM marks.
619
+
620
  = 5.171.2 Feb 09 2022 =
621
  #### Minor issue fixed.
622
  * Fix. Comments/Users checker. Date ranges validation fixed.