Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Profanity Filter! Any suggestions?

@geistschatten

Participant

So I got it to work when I put this after line 287:

add_filter('bp_get_activity_action', 'pccf_filter');
add_filter('bp_get_activity_content_body', 'pccf_filter');
add_filter('bp_get_the_topic_title', 'pccf_filter');
add_filter('bp_get_the_topic_post_content', 'pccf_filter');
add_filter('bp_activity_comment_content', 'pccf_filter');

I’m not really one for PHP though, so I’m not sure if that works entirely fine. I was able to filter the comments with that code too.

Basically you’re adding it to the plugin filters so that it thinks it should also filter through the comments and activity.

For further reference, line 284 should start like this and then end where it says “//bbPress specific filtering…” (make sure the apostrophes are showing up right, if you copy and paste code sometimes they get messed up but look the same, that’s why the comments weren’t happening before):

	if ( isset( $tmp['chk_post_content'] ) ) {
		if ( $tmp['chk_post_content'] == '1' ) {
			add_filter( 'the_content', 'pccf_filter' );
			add_filter( 'get_the_excerpt', 'pccf_filter' );
add_filter('bp_get_activity_action', 'pccf_filter');
add_filter('bp_get_activity_content_body', 'pccf_filter');
add_filter('bp_get_the_topic_title', 'pccf_filter');
add_filter('bp_get_the_topic_post_content', 'pccf_filter');
add_filter('bp_activity_comment_content', 'pccf_filter');
		}
Skip to toolbar