Skip to content

Commit

Permalink
Fix. Comment checker. Hints descriptions updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glomberg committed Jan 9, 2025
1 parent 2a48cd0 commit 7f55fa0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions lib/Cleantalk/ApbctWP/FindSpam/Checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ protected function getFooter()
IP - >=3 spam<br/>
E-mail - >=5 spam</br>
<br/>
<strong>Total count of comments - </strong>the number of active comments with the status 'comment',
<strong>&#42; Total count of comments - </strong>the number of active comments with the status 'comment',
'approve', 'disapprove', without statuses 'spam', 'trash', and only on existing pages.<br/>
<strong>Number of checked comments - </strong>all comments with all statuses except spam and
trash, such as review, trackback, ping, and comments from deleted pages. Therefore, this
<strong>&#42;&#42; Number of checked comments - </strong>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.<br/>
</p>
</div>
Expand Down
15 changes: 7 additions & 8 deletions lib/Cleantalk/ApbctWP/FindSpam/CommentsChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '&#42;';
$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');
}
Expand Down Expand Up @@ -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
);
Expand All @@ -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
);
Expand All @@ -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'] .= "<p>$backup_notice</p><p>$spam_system_notice</p><p>$count_hint</p>";
$return['message'] .= "<p>$backup_notice</p><p>$spam_system_notice</p>";

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

0 comments on commit 7f55fa0

Please sign in to comment.