Skip to:
Content

bbPress.org

Opened 9 years ago

Closed 9 years ago

#2861 closed enhancement (fixed)

Filtering of moderation and blacklist keys

Reported by: satollo's profile satollo Owned by: netweb's profile netweb
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.8
Component: API - Moderation Keywords: has-patch
Cc:

Description

The proposed patch adds a filter to the blacklist and moderation keys used by bbpress which are the ones used by WordPress to check comments.

That filter lets external plugins to add/change the keys.

Attachments (7)

moderation.patch (962 bytes) - added by satollo 9 years ago.
Patch to the includes/common/functions.php
moderation-2.patch (1005 bytes) - added by satollo 9 years ago.
The correct patch file, sorry.
2861.2.patch (3.8 KB) - added by thebrandonallen 9 years ago.
2861.3.patch (4.5 KB) - added by netweb 9 years ago.
2861.4.patch (4.7 KB) - added by thebrandonallen 9 years ago.
2861.diff (4.7 KB) - added by netweb 9 years ago.
2861.2.diff (4.7 KB) - added by netweb 9 years ago.

Download all attachments as: .zip

Change History (11)

@satollo
9 years ago

Patch to the includes/common/functions.php

@satollo
9 years ago

The correct patch file, sorry.

#1 follow-up: @thebrandonallen
9 years ago

  • Component changed from Component - Replies to API - Moderation
  • Keywords needs-testing removed
  • Milestone changed from Awaiting Review to 2.6

New patch adds appropriate filters and PHPDoc. Also cleans up bbp_check_for_moderation to bring it in line with bbp_check_for_blacklist which bails early on and empty blacklist keys.

#2 in reply to: ↑ 1 @netweb
9 years ago

Replying to thebrandonallen:

New patch adds appropriate filters and PHPDoc. Also cleans up bbp_check_for_moderation to bring it in line with bbp_check_for_blacklist which bails early on and empty blacklist keys.

It also bailed before the "Max Links" check, 2861.3.patch puts this before the moderation words bail check

@netweb
9 years ago

#3 @thebrandonallen
9 years ago

Yep. Missed that. New patch alters the changeset reference for the moderation filter back to rXXXX instead of the r6049, that slipped in on 2861.3.patch.

@netweb
9 years ago

@netweb
9 years ago

#4 @netweb
9 years ago

  • Owner set to netweb
  • Resolution set to fixed
  • Status changed from new to closed

In 6050:

Moderation: Add new bbp_moderation_keys and bbp_blacklist_keys filters

This changeset allows external plugins to filter the list of moderation and blacklist keyword terms, IP, URLs, words, etc.

Also cleans up bbp_check_for_moderation() to bails early if there are no moderation keys inline with bbp_check_for_blacklist()

Props thebrandonallen, satollo.
Fixes #2861.

Note: See TracTickets for help on using tickets.