Opened 21 years ago
Closed 19 years ago
#1283 closed enhancement (wontfix)
Show caught spam comments
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | low | |
| Severity: | normal | Version: | 1.5 |
| Component: | Administration | Keywords: | |
| Focuses: | Cc: |
Description
Having a number in the stats section of the dashboard that says XX,XXX spam comments caught would be cool, as people seem to love that sort of thing.
Change History (6)
#4
@
20 years ago
He wants it on the dashboard; why would it need to be a plugin hook? If you want to use it across multiple plugins or more than once in a plugin you could define it in my-hacks.php (ugly!) and put:
function list_caught_spam() {
echo $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_approved = 'spam'");
}
then just put <?php list_caught_spam(); ?> wherever you want it.
Note: See
TracTickets for help on using
tickets.
Would be trivial to add, I have something like that built into Spam Nuker.
$caught_spam = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_approved = 'spam'");