Skip to:
Content
Pages
Categories
Search
Top
Bottom

tags allowed in bbpress


  • mouffles
    Participant

    @mouffles

    I use a plugin to display pictures in lightbox (plugin name litebox).

    I have modified bbpress post tool bar, to include the class tag to the url.
    I also find the way to allow class tag for images and link in bbpress but i have to modify core files : \bbpress\includes\common\formatting.php

    i already googled a way to override this function in my theme function.php

    and what i did is :

    
    function my_filter_bbpress_allowed_tags() {
    	return array(
     
    		// Links
    		'a' => array(
    			'class'    => true,
    			'href'     => array(),
    			'title'    => array(),
    			'rel'      => array()
    		),
    
    		// Quotes
    		'blockquote'   => array(
    			'cite'     => array()
    		),
    
    		// Code
    		'code'         => array(),
    		'pre'          => array(),
    
    		// Formatting
    		'em'           => array(),
    		'strong'       => array(),
    		'del'          => array(
    			'datetime' => true,
    		),
    
    		// Lists
    		'ul'           => array(),
    		'ol'           => array(
    			'start'    => true,
    		),
    		'li'           => array(),
    
    		// Images
    		'img'          => array(
    			'class'    => true,
    			'src'      => true,
    			'border'   => true,
    			'alt'      => true,
    			'height'   => true,
    			'width'    => true,
    		)
    	);
    }
    add_filter( 'bbp_kses_allowed_tags', 'my_filter_bbpress_allowed_tags' );
    

    But today i updated to bbpress 2.5 and i saw that it didin’t work :/
    What is the correct function to allow this without hacking the bbpress core ?
    Could you in the future add a class tag allowed for link and images ?

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