Skip to:

this filter doesn't work?

  • Adam


    I found that I had to add these to the kses.php file in wordpress include, which you should NEVER do in order for them to show up. can some one tell me why this code isnt working and adding these tags to the available tags usable for non admin based users?

    I have tried with the add_filter above and or bellow, like you see it now, the function.

    I have this in my themes function.php file. Not in the bbpress theme function file because I am using my current wordpress theme as the theme for the bbpress theme (if that makes sense)


    function extraTags($tags)
    $tags['a'] = array(
    'href' => array(),
    'title' => array(),
    'class' => array()

    $tags['div'] = array(
    'class' => array()

    $tags['img'] = array(
    'src' => array(),
    'width' => array(),
    'height' => array(),
    'alt' => array(),
    'title' => array()

    $tags['ol'] = array();
    $tags['ul'] = array();
    $tags['li'] = array();
    $tags['pre'] = array(
    'class' => array()

    $tags['h1'] = array();
    $tags['h2'] = array();

    return $tags;

    //Add a new filter.
    add_filter('bbp_allowed_tags', 'extraTags');

Viewing 2 replies - 1 through 2 (of 2 total)
  • From bbp-common-template.php:

    * Display all of the allowed tags in HTML format with attributes.
    * This is useful for displaying in the post area, which elements and
    * attributes are supported. As well as any plugins which want to display it.

    The filter you are hooking into doesn’t do anything but show the user what tags are available.

    Check out



    Oh…….I SEE….(i am)so dumb >_> thanks. (and close)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar