Skip to:
Content

bbPress.org

Opened 10 months ago

Last modified 6 months ago

#3395 assigned enhancement

Akismet spam cleanup functionality

Reported by: stephdau Owned by: johnjamesjacoby
Milestone: 2.7 Priority: high
Severity: normal Version:
Component: Extend - Akismet Keywords: has-patch needs-testing
Cc:

Description

This was first proposed on Slack here.

In the WP AK plugin, we have a scheduled function Akismet::delete_old_comments_meta() to delete old akismet_as_submitted meta records, because they are pretty large, and not useful at all after a while.

Since then, @johnjamesjacoby suggested:

We could go as far as moving it out of post meta and into a custom post type with a post_parent relationship to the topic/reply. That would allow for some longer data retention, without the surplus of metadata keys.

I'm attaching a patch with what I had started before JJJ add his comment, since I have it, but leaving any fancier concept to the bbPress team to bounce around.

Note that my patch does not actually have the scheduling of said cleanup, as I wasn't sure where it would be best to trigger that in bbPress. See:

/**
 * The above will need to be scheduled with something like:
 * if ( ! wp_next_scheduled( 'akismet_scheduled_delete' ) ) {
 * 	wp_schedule_event( time(), 'daily', 'akismet_scheduled_delete' );
 * }
 */

Also note that the patch in wholly untasted, since I didn't get to keep going. :)

Attachments (1)

3395.diff (5.9 KB) - added by stephdau 10 months ago.

Download all attachments as: .zip

Change History (4)

@stephdau
10 months ago

#1 @stephdau
10 months ago

Another note: I will be off on a sabbatical in Sept/Oct/Nov, so I'll tag my fellow Akismet devs on this ticket, so they can keep up with it, and your team.

Ping @cfinke and @procifer. Tag! ;p

Last edited 10 months ago by stephdau (previous) (diff)

#2 @johnjamesjacoby
6 months ago

  • Keywords has-patch needs-testing added
  • Milestone changed from Awaiting Review to 2.7
  • Owner set to johnjamesjacoby
  • Priority changed from normal to high
  • Status changed from new to assigned

Patch looks really good to me. Let's milestone this for 2.7, and I'll be sure to test this thoroughly then. 🙏

#3 @stephdau
6 months ago

Thanks!

Note: See TracTickets for help on using tickets.