I will note this as a possible feature request. Having a unique blacklist might be a good idea, there might be a way to hook into WordPress’s blacklist function and specify words only for bbPress, but I do not know at the moment, sorry.
Looking at the code it seems there is no way to hook into that option in a easy way. One should hook into get_options for the moderation_key option but find a way to determine he is in the bbpress contect and not in the comment moderation context. If needed I can write the patch to bbpress for that, it’s one line of code!
Stefano.
Any contributions are welcome 🙂
Ok, where could I send a patch? Should I create an SVN patch or just give a description on where to add the code?
Thank you, Stefano.
Either way I guess.
You are free to go ahead and create a trac ticket for the suggested hook with the patch file attached to it.
Or I guess you can explain to me what to add and where it should be, and then I can create the ticket from the information you gave me.
If you need any additional help with creating a trac ticket, I can help you out.
I’ve just created a ticket, hopefully in the correct way…
https://bbpress.trac.wordpress.org/ticket/2861
Stefano.
the patch might not be created right. I don’t think you create the patch from the plugin version but maybe the latest alpha version or the latest version you can download from the trunk using SVN.
You can download/download using SVN using the url from here.
Download
Are you sure how you inserted the filter will not cause any issues?
I am specifically talking about how $blacklist =
both of these.
$blacklist = trim( get_option( 'moderation_keys' ) );
$blacklist = apply_filters('bbp_moderation_keys', $blacklist);
Here are a bunch of helpful guides that I am just going to drop here.
Working With Patches
Installing Via SVN
Hi, I’m unsing that patch in a couple of sites, and it seems to work. Where do you think there is a problem? In my blogs I’ve just added a filter which replaces the moderation key used by bbpress (the variable $blacklist in the code which initially contains the moderation keys of WordPress).
Bye, Stefano.