From 7f55fa0e7589fec2159c2e5fa68fde0f0211b7ae Mon Sep 17 00:00:00 2001 From: Glomberg Date: Thu, 9 Jan 2025 20:49:17 +0300 Subject: [PATCH] Fix. Comment checker. Hints descriptions updated. --- lib/Cleantalk/ApbctWP/FindSpam/Checker.php | 6 +++--- .../ApbctWP/FindSpam/CommentsChecker.php | 15 +++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/Cleantalk/ApbctWP/FindSpam/Checker.php b/lib/Cleantalk/ApbctWP/FindSpam/Checker.php index 87fe62fd0..62a1f6148 100644 --- a/lib/Cleantalk/ApbctWP/FindSpam/Checker.php +++ b/lib/Cleantalk/ApbctWP/FindSpam/Checker.php @@ -214,10 +214,10 @@ protected function getFooter() IP - >=3 spam
E-mail - >=5 spam

- Total count of comments - the number of active comments with the status 'comment', + * Total count of comments - the number of active comments with the status 'comment', 'approve', 'disapprove', without statuses 'spam', 'trash', and only on existing pages.
- Number of checked comments - all comments with all statuses except spam and - trash, such as review, trackback, ping, and comments from deleted pages. Therefore, this + ** Number of checked comments - all comments with all statuses except 'spam', + 'trash' and 'order_note', such as review, trackback, ping, and comments. The comments on deleted pages have also been taken. Therefore, this number may be more than the total number of comments.

diff --git a/lib/Cleantalk/ApbctWP/FindSpam/CommentsChecker.php b/lib/Cleantalk/ApbctWP/FindSpam/CommentsChecker.php index 7ad35b6d8..297363b22 100644 --- a/lib/Cleantalk/ApbctWP/FindSpam/CommentsChecker.php +++ b/lib/Cleantalk/ApbctWP/FindSpam/CommentsChecker.php @@ -211,7 +211,10 @@ public static function getCountText() $res = wp_count_comments(); if ( $res->all ) { - $text = sprintf(esc_html__('Total count of comments: %s.', 'cleantalk-spam-protect'), $res->all); + $unicode_star = '*'; + $text = sprintf( + esc_html__('Total count of comments: %s.', 'cleantalk-spam-protect'), + $res->all . $unicode_star); } else { $text = esc_html__('No comments found.', 'cleantalk-spam-protect'); } @@ -319,7 +322,7 @@ public static function ctAjaxInfo($direct_call = false) "Checked %s comments total (excluding admins), found %s spam comments and %s non-checkable comments (no IP and email found).", 'cleantalk-spam-protect' ), - TT::toString($cnt_checked) . $unicode_star, + TT::toString($cnt_checked) . $unicode_star . $unicode_star, $cnt_spam, $cnt_bad ); @@ -334,7 +337,7 @@ public static function ctAjaxInfo($direct_call = false) 'cleantalk-spam-protect' ), self::lastCheckDate(), - TT::toString($cnt_checked) . $unicode_star, + TT::toString($cnt_checked) . $unicode_star . $unicode_star, $cnt_spam, $cnt_bad ); @@ -356,12 +359,8 @@ public static function ctAjaxInfo($direct_call = false) "Results are based on the decision of our spam checking system and do not give a complete guarantee that these comments are spam.", 'cleantalk-spam-protect' ); - $count_hint = $unicode_star . __( - "Comments that are not in spam or trash folders and are not posted by admins.", - 'cleantalk-spam-protect' - ); } - $return['message'] .= "

$backup_notice

$spam_system_notice

$count_hint

"; + $return['message'] .= "

$backup_notice

$spam_system_notice

"; if ( $direct_call ) { return $return['message'];