Version Description
October 16 2017 = * Improved compatibility with themes. Changed core functions prefix. * Fixed issue with WooCommerce checkout. * Spam protection improved. * Minor fixes.
Download this release
Release Info
Developer | Safronik |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.78 |
Comparing to | |
See all releases |
Code changes from version 5.77 to 5.78
- cleantalk.php +59 -64
- inc/cleantalk-admin.php +10 -10
- inc/cleantalk-common.php +1 -1
- inc/cleantalk-public.php +7 -5
- readme.txt +26 -4
cleantalk.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
|
6 |
-
Version: 5.
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
-
$cleantalk_plugin_version='5.
|
12 |
-
$ct_agent_version = 'wordpress-
|
13 |
$cleantalk_executed=false;
|
14 |
|
15 |
define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
|
@@ -45,7 +45,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
45 |
//Delete cookie for admin trial notice
|
46 |
add_action('wp_logout', 'ct_wp_logout');
|
47 |
|
48 |
-
add_action('template_redirect','apbct_cookie',
|
49 |
|
50 |
// Early checks
|
51 |
// Facebook
|
@@ -187,15 +187,15 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
187 |
|
188 |
// Activation/deactivation functions must be in main plugin file.
|
189 |
// http://codex.wordpress.org/Function_Reference/register_activation_hook
|
190 |
-
register_activation_hook( __FILE__, '
|
191 |
-
register_deactivation_hook( __FILE__, '
|
192 |
|
193 |
// Redirect admin to plugin settings.
|
194 |
if(!defined('WP_ALLOW_MULTISITE') || defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE == false)
|
195 |
-
add_action('admin_init', '
|
196 |
|
197 |
// After plugin loaded - to load locale as described in manual
|
198 |
-
add_action('plugins_loaded', '
|
199 |
|
200 |
if( !empty($ct_options['use_ajax']) &&
|
201 |
stripos($_SERVER['REQUEST_URI'],'.xml')===false &&
|
@@ -219,7 +219,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
219 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');
|
220 |
|
221 |
if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)){
|
222 |
-
add_action('admin_init', '
|
223 |
add_action('admin_menu', 'ct_admin_add_page');
|
224 |
if(is_network_admin())
|
225 |
add_action('network_admin_menu', 'ct_admin_add_page');
|
@@ -285,7 +285,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
285 |
}
|
286 |
}
|
287 |
|
288 |
-
add_action('admin_enqueue_scripts', '
|
289 |
|
290 |
// Sends feedback to the cloud about comments
|
291 |
// add_action('wp_set_comment_status', 'ct_comment_send_feedback', 10, 2);
|
@@ -296,10 +296,10 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
296 |
|
297 |
if($pagenow=='plugins.php' || (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'],'plugins.php') !== false)){
|
298 |
|
299 |
-
add_filter('plugin_action_links_'.plugin_basename(__FILE__), '
|
300 |
-
add_filter('network_admin_plugin_action_links_'.plugin_basename(__FILE__), '
|
301 |
|
302 |
-
add_filter('plugin_row_meta', '
|
303 |
}
|
304 |
add_action('updated_option', 'ct_update_option'); // param - option name, i.e. 'cleantalk_settings'
|
305 |
|
@@ -311,7 +311,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
311 |
add_action('wp_enqueue_scripts', 'ct_enqueue_scripts_public');
|
312 |
|
313 |
// Init action.
|
314 |
-
add_action('plugins_loaded', '
|
315 |
|
316 |
// Comments
|
317 |
add_filter('preprocess_comment', 'ct_preprocess_comment', 1, 1); // param - comment data array
|
@@ -346,68 +346,63 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
346 |
/**
|
347 |
* On activation, set a time, frequency and name of an action hook to be scheduled.
|
348 |
*/
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
);
|
360 |
-
|
361 |
-
$wpdb->query("CREATE TABLE IF NOT EXISTS `".$wpdb->base_prefix."cleantalk_sfw_logs` (
|
362 |
-
`ip` VARCHAR(15) NOT NULL,
|
363 |
-
`all_entries` INT NOT NULL,
|
364 |
-
`blocked_entries` INT NOT NULL,
|
365 |
-
`entries_timestamp` INT NOT NULL,
|
366 |
-
PRIMARY KEY (`ip`))
|
367 |
-
ENGINE = MYISAM;"
|
368 |
-
);
|
369 |
-
|
370 |
-
// Cron tasks
|
371 |
-
CleantalkCron::addTask('check_account_status', 'ct_account_status_check', 3600, time()+1800); // Checks account status
|
372 |
-
CleantalkCron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time()+3500); // Formerly ct_hourly_event_hook()
|
373 |
-
CleantalkCron::addTask('send_feedback', 'ct_send_feedback', 3600, time()+3500); // Formerly ct_hourly_event_hook()
|
374 |
-
CleantalkCron::addTask('sfw_update', 'ct_sfw_update', 86400, time()+43200);// SFW update
|
375 |
-
CleantalkCron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time()+1800); // SFW send logs
|
376 |
-
CleantalkCron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time()+3500); // Get data for dashboard widget
|
377 |
-
// CleantalkCron::addTask('send_daily_request', 'ct_send_daily_request', 86400); // Daily sends request to servers
|
378 |
-
CleantalkCron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time()+3500); // Send connection report to welcome@cleantalk.org
|
379 |
-
|
380 |
-
// Additional options
|
381 |
-
add_option('ct_plugin_do_activation_redirect', true);
|
382 |
-
add_option('ct_installing', true);
|
383 |
|
384 |
-
|
385 |
-
|
386 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
}
|
388 |
|
389 |
/**
|
390 |
* On deactivation, clear schedule.
|
391 |
*/
|
392 |
-
|
393 |
-
function ct_deactivation() {
|
394 |
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
}
|
405 |
}
|
406 |
|
407 |
/**
|
408 |
* Redirects admin to plugin settings after activation.
|
409 |
*/
|
410 |
-
function
|
411 |
{
|
412 |
if (get_option('ct_plugin_do_activation_redirect', false) && !isset($_GET['activate-multi'])){
|
413 |
delete_option('ct_plugin_do_activation_redirect');
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
|
6 |
+
Version: 5.78
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
+
$cleantalk_plugin_version='5.78';
|
12 |
+
$ct_agent_version = 'wordpress-578';
|
13 |
$cleantalk_executed=false;
|
14 |
|
15 |
define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
|
45 |
//Delete cookie for admin trial notice
|
46 |
add_action('wp_logout', 'ct_wp_logout');
|
47 |
|
48 |
+
add_action('template_redirect','apbct_cookie', 2);
|
49 |
|
50 |
// Early checks
|
51 |
// Facebook
|
187 |
|
188 |
// Activation/deactivation functions must be in main plugin file.
|
189 |
// http://codex.wordpress.org/Function_Reference/register_activation_hook
|
190 |
+
register_activation_hook( __FILE__, 'apbct_activation' );
|
191 |
+
register_deactivation_hook( __FILE__, 'apbct_deactivation' );
|
192 |
|
193 |
// Redirect admin to plugin settings.
|
194 |
if(!defined('WP_ALLOW_MULTISITE') || defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE == false)
|
195 |
+
add_action('admin_init', 'apbct_plugin_redirect');
|
196 |
|
197 |
// After plugin loaded - to load locale as described in manual
|
198 |
+
add_action('plugins_loaded', 'apbct_plugin_loaded' );
|
199 |
|
200 |
if( !empty($ct_options['use_ajax']) &&
|
201 |
stripos($_SERVER['REQUEST_URI'],'.xml')===false &&
|
219 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');
|
220 |
|
221 |
if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)){
|
222 |
+
add_action('admin_init', 'apbct_admin_init', 1);
|
223 |
add_action('admin_menu', 'ct_admin_add_page');
|
224 |
if(is_network_admin())
|
225 |
add_action('network_admin_menu', 'ct_admin_add_page');
|
285 |
}
|
286 |
}
|
287 |
|
288 |
+
add_action('admin_enqueue_scripts', 'apbct_enqueue_scripts');
|
289 |
|
290 |
// Sends feedback to the cloud about comments
|
291 |
// add_action('wp_set_comment_status', 'ct_comment_send_feedback', 10, 2);
|
296 |
|
297 |
if($pagenow=='plugins.php' || (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'],'plugins.php') !== false)){
|
298 |
|
299 |
+
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'apbct_plugin_action_links', 10, 2);
|
300 |
+
add_filter('network_admin_plugin_action_links_'.plugin_basename(__FILE__), 'apbct_plugin_action_links', 10, 2);
|
301 |
|
302 |
+
add_filter('plugin_row_meta', 'apbct_register_plugin_links', 10, 2);
|
303 |
}
|
304 |
add_action('updated_option', 'ct_update_option'); // param - option name, i.e. 'cleantalk_settings'
|
305 |
|
311 |
add_action('wp_enqueue_scripts', 'ct_enqueue_scripts_public');
|
312 |
|
313 |
// Init action.
|
314 |
+
add_action('plugins_loaded', 'apbct_init', 1);
|
315 |
|
316 |
// Comments
|
317 |
add_filter('preprocess_comment', 'ct_preprocess_comment', 1, 1); // param - comment data array
|
346 |
/**
|
347 |
* On activation, set a time, frequency and name of an action hook to be scheduled.
|
348 |
*/
|
349 |
+
function apbct_activation() {
|
350 |
+
|
351 |
+
global $wpdb;
|
352 |
+
|
353 |
+
$wpdb->query("CREATE TABLE IF NOT EXISTS `".$wpdb->base_prefix."cleantalk_sfw` (
|
354 |
+
`network` int(11) unsigned NOT NULL,
|
355 |
+
`mask` int(11) unsigned NOT NULL,
|
356 |
+
INDEX ( `network` , `mask` )
|
357 |
+
) ENGINE = MYISAM ;"
|
358 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
|
360 |
+
$wpdb->query("CREATE TABLE IF NOT EXISTS `".$wpdb->base_prefix."cleantalk_sfw_logs` (
|
361 |
+
`ip` VARCHAR(15) NOT NULL,
|
362 |
+
`all_entries` INT NOT NULL,
|
363 |
+
`blocked_entries` INT NOT NULL,
|
364 |
+
`entries_timestamp` INT NOT NULL,
|
365 |
+
PRIMARY KEY (`ip`))
|
366 |
+
ENGINE = MYISAM;"
|
367 |
+
);
|
368 |
+
|
369 |
+
// Cron tasks
|
370 |
+
CleantalkCron::addTask('check_account_status', 'ct_account_status_check', 3600, time()+1800); // Checks account status
|
371 |
+
CleantalkCron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time()+3500); // Formerly ct_hourly_event_hook()
|
372 |
+
CleantalkCron::addTask('send_feedback', 'ct_send_feedback', 3600, time()+3500); // Formerly ct_hourly_event_hook()
|
373 |
+
CleantalkCron::addTask('sfw_update', 'ct_sfw_update', 86400, time()+43200);// SFW update
|
374 |
+
CleantalkCron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time()+1800); // SFW send logs
|
375 |
+
CleantalkCron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time()+3500); // Get data for dashboard widget
|
376 |
+
// CleantalkCron::addTask('send_daily_request', 'ct_send_daily_request', 86400); // Daily sends request to servers
|
377 |
+
CleantalkCron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time()+3500); // Send connection report to welcome@cleantalk.org
|
378 |
+
|
379 |
+
// Additional options
|
380 |
+
add_option('ct_plugin_do_activation_redirect', true);
|
381 |
+
add_option('ct_installing', true);
|
382 |
+
|
383 |
+
// Updating SFW
|
384 |
+
ct_sfw_update();
|
385 |
}
|
386 |
|
387 |
/**
|
388 |
* On deactivation, clear schedule.
|
389 |
*/
|
390 |
+
function apbct_deactivation() {
|
|
|
391 |
|
392 |
+
global $wpdb;
|
393 |
+
|
394 |
+
// Deleting SFW tables
|
395 |
+
$wpdb->query("DROP TABLE IF EXISTS `".$wpdb->base_prefix."cleantalk_sfw`;");
|
396 |
+
$wpdb->query("DROP TABLE IF EXISTS `".$wpdb->base_prefix."cleantalk_sfw_logs`;");
|
397 |
+
|
398 |
+
// Deleting cron entries
|
399 |
+
delete_option('cleantalk_cron');
|
|
|
|
|
400 |
}
|
401 |
|
402 |
/**
|
403 |
* Redirects admin to plugin settings after activation.
|
404 |
*/
|
405 |
+
function apbct_plugin_redirect()
|
406 |
{
|
407 |
if (get_option('ct_plugin_do_activation_redirect', false) && !isset($_GET['activate-multi'])){
|
408 |
delete_option('ct_plugin_do_activation_redirect');
|
inc/cleantalk-admin.php
CHANGED
@@ -195,7 +195,7 @@ add_action( 'wp_ajax_ajax_get_timezone', 'ct_ajax_get_timezone' );
|
|
195 |
* Admin action 'admin_enqueue_scripts' - Enqueue admin script of reloading admin page after needed AJAX events
|
196 |
* @param string $hook URL of hooked page
|
197 |
*/
|
198 |
-
function
|
199 |
|
200 |
global $cleantalk_plugin_version, $ct_data, $ct_options;
|
201 |
|
@@ -314,9 +314,9 @@ function ct_admin_add_page() {
|
|
314 |
global $ct_plugin_name;
|
315 |
|
316 |
if(is_network_admin())
|
317 |
-
add_submenu_page("settings.php", __('CleanTalk settings', 'cleantalk'), $ct_plugin_name, 'manage_options', 'cleantalk', '
|
318 |
else
|
319 |
-
add_options_page(__('CleanTalk settings', 'cleantalk'), $ct_plugin_name, 'manage_options', 'cleantalk', '
|
320 |
|
321 |
}
|
322 |
|
@@ -391,7 +391,7 @@ function ct_account_status_check(){
|
|
391 |
/**
|
392 |
* Admin action 'admin_init' - Add the admin settings and such
|
393 |
*/
|
394 |
-
function
|
395 |
|
396 |
global $ct_server_timeout, $show_ct_notice_autokey, $ct_notice_autokey_label, $ct_notice_autokey_value, $show_ct_notice_renew, $ct_notice_renew_label, $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $renew_notice_showtime, $trial_notice_showtime, $ct_plugin_name, $ct_options, $ct_data, $ct_user_token_label, $cleantalk_plugin_version, $notice_check_timeout, $ct_agent_version;
|
397 |
|
@@ -1562,7 +1562,7 @@ function ct_settings_validate($input) {
|
|
1562 |
/**
|
1563 |
* Admin callback function - Displays plugin options page
|
1564 |
*/
|
1565 |
-
function
|
1566 |
?>
|
1567 |
<style type="text/css">
|
1568 |
.cleantalk_manual_link {padding: 10px; background: #3399FF; color: #fff; border:0 none;
|
@@ -1721,7 +1721,7 @@ function cleantalk_admin_notice_message(){
|
|
1721 |
|
1722 |
if($self_owned_key && $is_admin && $value == 1){
|
1723 |
|
1724 |
-
//Unable to get key automatically (if
|
1725 |
if ($show_notice && $show_ct_notice_autokey){
|
1726 |
echo '<div class="error">
|
1727 |
<h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value).
|
@@ -1740,7 +1740,7 @@ function cleantalk_admin_notice_message(){
|
|
1740 |
$show_notice = false;
|
1741 |
}
|
1742 |
|
1743 |
-
//"Trial period ends" notice from
|
1744 |
if ($show_notice && $show_ct_notice_trial == 1) {
|
1745 |
echo '<div class="error">
|
1746 |
<h3>' . sprintf(__("%s trial period ends, please upgrade to %s!", 'cleantalk'),
|
@@ -1751,7 +1751,7 @@ function cleantalk_admin_notice_message(){
|
|
1751 |
$show_notice = false;
|
1752 |
}
|
1753 |
|
1754 |
-
//Renew notice from
|
1755 |
if ($show_notice && $show_ct_notice_renew == 1) {
|
1756 |
$renew_link = "<a href=\"http://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>";
|
1757 |
$button_html = sprintf($renew_link, '<input type="button" class="button button-primary" value="'.__('RENEW ANTI-SPAM', 'cleantalk').'" />');
|
@@ -1916,7 +1916,7 @@ function ct_delete_user($user_id, $reassign = null){
|
|
1916 |
* Manage links in plugins list
|
1917 |
* @return array
|
1918 |
*/
|
1919 |
-
function
|
1920 |
|
1921 |
$settings_link = is_network_admin()
|
1922 |
? '<a href="settings.php?page=cleantalk">' . __( 'Settings' ) . '</a>'
|
@@ -1930,7 +1930,7 @@ function ct_plugin_action_links($links, $file) {
|
|
1930 |
* Manage links and plugins page
|
1931 |
* @return array
|
1932 |
*/
|
1933 |
-
function
|
1934 |
global $ct_plugin_basename;
|
1935 |
//Return if it's not our plugin
|
1936 |
if ($file != $ct_plugin_basename )
|
195 |
* Admin action 'admin_enqueue_scripts' - Enqueue admin script of reloading admin page after needed AJAX events
|
196 |
* @param string $hook URL of hooked page
|
197 |
*/
|
198 |
+
function apbct_enqueue_scripts($hook) {
|
199 |
|
200 |
global $cleantalk_plugin_version, $ct_data, $ct_options;
|
201 |
|
314 |
global $ct_plugin_name;
|
315 |
|
316 |
if(is_network_admin())
|
317 |
+
add_submenu_page("settings.php", __('CleanTalk settings', 'cleantalk'), $ct_plugin_name, 'manage_options', 'cleantalk', 'apbct_settings_page');
|
318 |
else
|
319 |
+
add_options_page(__('CleanTalk settings', 'cleantalk'), $ct_plugin_name, 'manage_options', 'cleantalk', 'apbct_settings_page');
|
320 |
|
321 |
}
|
322 |
|
391 |
/**
|
392 |
* Admin action 'admin_init' - Add the admin settings and such
|
393 |
*/
|
394 |
+
function apbct_admin_init(){
|
395 |
|
396 |
global $ct_server_timeout, $show_ct_notice_autokey, $ct_notice_autokey_label, $ct_notice_autokey_value, $show_ct_notice_renew, $ct_notice_renew_label, $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $renew_notice_showtime, $trial_notice_showtime, $ct_plugin_name, $ct_options, $ct_data, $ct_user_token_label, $cleantalk_plugin_version, $notice_check_timeout, $ct_agent_version;
|
397 |
|
1562 |
/**
|
1563 |
* Admin callback function - Displays plugin options page
|
1564 |
*/
|
1565 |
+
function apbct_settings_page() {
|
1566 |
?>
|
1567 |
<style type="text/css">
|
1568 |
.cleantalk_manual_link {padding: 10px; background: #3399FF; color: #fff; border:0 none;
|
1721 |
|
1722 |
if($self_owned_key && $is_admin && $value == 1){
|
1723 |
|
1724 |
+
//Unable to get key automatically (if apbct_admin_init().getAutoKey() returns error)
|
1725 |
if ($show_notice && $show_ct_notice_autokey){
|
1726 |
echo '<div class="error">
|
1727 |
<h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value).
|
1740 |
$show_notice = false;
|
1741 |
}
|
1742 |
|
1743 |
+
//"Trial period ends" notice from apbct_admin_init().noticePaidTill()
|
1744 |
if ($show_notice && $show_ct_notice_trial == 1) {
|
1745 |
echo '<div class="error">
|
1746 |
<h3>' . sprintf(__("%s trial period ends, please upgrade to %s!", 'cleantalk'),
|
1751 |
$show_notice = false;
|
1752 |
}
|
1753 |
|
1754 |
+
//Renew notice from apbct_admin_init().noticePaidTill()
|
1755 |
if ($show_notice && $show_ct_notice_renew == 1) {
|
1756 |
$renew_link = "<a href=\"http://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>";
|
1757 |
$button_html = sprintf($renew_link, '<input type="button" class="button button-primary" value="'.__('RENEW ANTI-SPAM', 'cleantalk').'" />');
|
1916 |
* Manage links in plugins list
|
1917 |
* @return array
|
1918 |
*/
|
1919 |
+
function apbct_plugin_action_links($links, $file) {
|
1920 |
|
1921 |
$settings_link = is_network_admin()
|
1922 |
? '<a href="settings.php?page=cleantalk">' . __( 'Settings' ) . '</a>'
|
1930 |
* Manage links and plugins page
|
1931 |
* @return array
|
1932 |
*/
|
1933 |
+
function apbct_register_plugin_links($links, $file) {
|
1934 |
global $ct_plugin_basename;
|
1935 |
//Return if it's not our plugin
|
1936 |
if ($file != $ct_plugin_basename )
|
inc/cleantalk-common.php
CHANGED
@@ -103,7 +103,7 @@ $ct_page_timer_setuped = false;
|
|
103 |
/**
|
104 |
* Public action 'plugins_loaded' - Loads locale, see http://codex.wordpress.org/Function_Reference/load_plugin_textdomain
|
105 |
*/
|
106 |
-
function
|
107 |
$dir=plugin_basename( dirname( __FILE__ ) ) . '/../i18n';
|
108 |
$loaded=load_plugin_textdomain('cleantalk', false, $dir);
|
109 |
}
|
103 |
/**
|
104 |
* Public action 'plugins_loaded' - Loads locale, see http://codex.wordpress.org/Function_Reference/load_plugin_textdomain
|
105 |
*/
|
106 |
+
function apbct_plugin_loaded() {
|
107 |
$dir=plugin_basename( dirname( __FILE__ ) ) . '/../i18n';
|
108 |
$loaded=load_plugin_textdomain('cleantalk', false, $dir);
|
109 |
}
|
inc/cleantalk-public.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Init functions
|
5 |
* @return mixed[] Array of options
|
6 |
*/
|
7 |
-
function
|
8 |
global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label, $ct_formtime_label, $ct_direct_post, $ct_options, $ct_data, $ct_check_post_result, $test_external_forms, $cleantalk_executed, $wpdb, $ct_agent_version;
|
9 |
|
10 |
$ct_options = ct_get_options();
|
@@ -2493,8 +2493,9 @@ function ct_contact_form_validate() {
|
|
2493 |
// Skip the test if it's WooCommerce and the checkout test unset
|
2494 |
if(
|
2495 |
(
|
2496 |
-
strpos($_SERVER['REQUEST_URI'],'wc-ajax=checkout') !==false ||
|
2497 |
-
strpos($
|
|
|
2498 |
) &&
|
2499 |
$ct_options['wc_checkout_test'] == 0
|
2500 |
){
|
@@ -2560,6 +2561,7 @@ function ct_contact_form_validate() {
|
|
2560 |
cleantalk_debug("CtBaseCallBefore", "1");
|
2561 |
|
2562 |
$ct_base_call_result = ct_base_call(array(
|
|
|
2563 |
'message' => $message,
|
2564 |
'example' => null,
|
2565 |
'sender_email' => $sender_email,
|
@@ -2567,8 +2569,8 @@ function ct_contact_form_validate() {
|
|
2567 |
'post_info' => $post_info,
|
2568 |
'sender_info' => get_sender_info(),
|
2569 |
'checkjs' => $checkjs
|
2570 |
-
));
|
2571 |
-
|
2572 |
//@header("CtBaseCall: Executed");
|
2573 |
cleantalk_debug("CtBaseCall", "Executed");
|
2574 |
|
4 |
* Init functions
|
5 |
* @return mixed[] Array of options
|
6 |
*/
|
7 |
+
function apbct_init() {
|
8 |
global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label, $ct_formtime_label, $ct_direct_post, $ct_options, $ct_data, $ct_check_post_result, $test_external_forms, $cleantalk_executed, $wpdb, $ct_agent_version;
|
9 |
|
10 |
$ct_options = ct_get_options();
|
2493 |
// Skip the test if it's WooCommerce and the checkout test unset
|
2494 |
if(
|
2495 |
(
|
2496 |
+
strpos($_SERVER['REQUEST_URI'], 'wc-ajax=checkout') !==false ||
|
2497 |
+
strpos($_SERVER['REQUEST_URI'], 'wc-ajax=update_order_review') !== false ||
|
2498 |
+
(isset($_POST['_wp_http_referer']) && strpos($_SERVER['REQUEST_URI'], 'wc-ajax=update_order_review') !== false)
|
2499 |
) &&
|
2500 |
$ct_options['wc_checkout_test'] == 0
|
2501 |
){
|
2561 |
cleantalk_debug("CtBaseCallBefore", "1");
|
2562 |
|
2563 |
$ct_base_call_result = ct_base_call(array(
|
2564 |
+
'submit_time' => apbct_get_submit_time(),
|
2565 |
'message' => $message,
|
2566 |
'example' => null,
|
2567 |
'sender_email' => $sender_email,
|
2569 |
'post_info' => $post_info,
|
2570 |
'sender_info' => get_sender_info(),
|
2571 |
'checkjs' => $checkjs
|
2572 |
+
), true);
|
2573 |
+
|
2574 |
//@header("CtBaseCall: Executed");
|
2575 |
cleantalk_debug("CtBaseCall", "Executed");
|
2576 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: znaeff, shagimuratov, sartemd174
|
3 |
Tags: antispam, protection, contact form, comments, spam
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 4.8
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
|
@@ -381,9 +381,19 @@ or
|
|
381 |
= Can I add exclusions for some pages of my site? =
|
382 |
Yes, you can. Add this string in your wp-config.php file before defining database constants:
|
383 |
|
384 |
-
$cleantalk_url_exclusions =
|
385 |
|
386 |
-
Now, all pages containing strings 'url1', 'url2', or 'url3' will be excluded from anti-spam checking. Remember, that this option will not be applied in registration and comment checking — they are always protected from spam.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
|
388 |
= Can I not send my personal data to CleanTalk servers? =
|
389 |
Yes, you can exclude your data. Add this string in your wp-config.php file before defining database constants:
|
@@ -506,6 +516,12 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
|
|
506 |
1. The plugin deletes/removes the existing spam comments and users accounts.
|
507 |
|
508 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
= 5.77 October 2 2017 =
|
510 |
* Connection report's system.
|
511 |
* Integration for CouponXXL Theme.
|
@@ -1443,6 +1459,12 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
|
|
1443 |
* First version
|
1444 |
|
1445 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
1446 |
= 5.77 October 2 2017 =
|
1447 |
* Connection report's system.
|
1448 |
* Integration for CouponXXL Theme.
|
2 |
Contributors: znaeff, shagimuratov, sartemd174
|
3 |
Tags: antispam, protection, contact form, comments, spam
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.8.2
|
6 |
+
Stable tag: 5.78
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
|
381 |
= Can I add exclusions for some pages of my site? =
|
382 |
Yes, you can. Add this string in your wp-config.php file before defining database constants:
|
383 |
|
384 |
+
$cleantalk_url_exclusions = array('url1', 'url2', 'url3');
|
385 |
|
386 |
+
Now, all pages containing strings 'url1', 'url2', or 'url3' will be excluded from anti-spam checking. Remember, that this option will not be applied in registration and comment checking — they are always protected from spam. This is similar to regular expression /.*url1.*/ or wildcard like *url1*.
|
387 |
+
|
388 |
+
For example: You need to except these URLs.
|
389 |
+
|
390 |
+
example.com/some/thing
|
391 |
+
example.com/some/one
|
392 |
+
example.com/some/body
|
393 |
+
|
394 |
+
You need to type this:
|
395 |
+
|
396 |
+
$cleantalk_url_exclusions = array('some');
|
397 |
|
398 |
= Can I not send my personal data to CleanTalk servers? =
|
399 |
Yes, you can exclude your data. Add this string in your wp-config.php file before defining database constants:
|
516 |
1. The plugin deletes/removes the existing spam comments and users accounts.
|
517 |
|
518 |
== Changelog ==
|
519 |
+
= 5.78 October 16 2017 =
|
520 |
+
* Improved compatibility with themes. Changed core functions prefix.
|
521 |
+
* Fixed issue with WooCommerce checkout.
|
522 |
+
* Spam protection improved.
|
523 |
+
* Minor fixes.
|
524 |
+
|
525 |
= 5.77 October 2 2017 =
|
526 |
* Connection report's system.
|
527 |
* Integration for CouponXXL Theme.
|
1459 |
* First version
|
1460 |
|
1461 |
== Upgrade Notice ==
|
1462 |
+
= 5.78 October 16 2017 =
|
1463 |
+
* Improved compatibility with themes. Changed core functions prefix.
|
1464 |
+
* Fixed issue with WooCommerce checkout.
|
1465 |
+
* Spam protection improved.
|
1466 |
+
* Minor fixes.
|
1467 |
+
|
1468 |
= 5.77 October 2 2017 =
|
1469 |
* Connection report's system.
|
1470 |
* Integration for CouponXXL Theme.
|