Skip to:
Content
Pages
Categories
Search
Top
Bottom

using wp_filter_kses filter for bbpress posts


  • tharsheblows
    Participant

    @tharsheblows

    Hi – I’d like the same tags allowed in my WordPress comments – <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> – to be allowed in my bbPress posts. In particular, I’d like people to be unable to link to images in their posts. I think the allowed tags in WordPress comments are determined by the wp_filter_kses so was trying to use that.

    I’ve tried many many different things and have the img tinymce (which I’ve enabled) button disabled and the html editor disappeared, so the only way to get an image is to type in <img src="whatever" /> to the visual editor, but I’d still like it to just not be possible.

    I thought this would work but it hasn’t (I’ve also tried making a custom filter function which, of course, didn’t work, so I think it’s something here):

    remove_filter( 'bp_get_the_topic_post_content', 'bp_forums_filter_kses', 1 );
    add_filter( 'bp_get_the_topic_post_content', 'wp_filter_kses', 1 );
    

    Anyone know? Or just stripping the img tags somehow would be great.

    I have bbPress 2.3.2 installed and WordPress 3.5.1. Thanks. The site’s not live so I don’t have a link, apols.
    (have edited so I can tick “follow up replies via email”)

  • You must be logged in to reply to this topic.
Skip to toolbar