Make WordPress Core

Opened 19 years ago

Closed 18 years ago

#1283 closed enhancement (wontfix)

Show caught spam comments

Reported by: matt's profile matt Owned by:
Milestone: Priority: low
Severity: normal Version: 1.5
Component: Administration Keywords:
Focuses: Cc:


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)

#1 @matt
19 years ago

  • Patch set to No

#2 @chrisjdavis
19 years ago

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'");

#3 @masquerade
19 years ago

It'd be much better if this was a more general feature, such as a plugin hook.

#4 @mark
19 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.

#5 @granat
18 years ago

  • Severity changed from minor to enhancement

#6 @Nazgul
18 years ago

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version set to 1.5

This sounds like plugin territory to me.

If new hooks are needed in the core for this functionality, new tickets for those hooks should be created.

Note: See TracTickets for help on using tickets.