<?php
/*
Plugin Name: Add allowed tags for bbPress
Description: Add HTML elements to be allowed in bbPress comments (in addition to the bbPress defaults)
Author URI: http://samm.dreamhosters.com/bbpress/plugins/
Version: 0.1
Tested up to: 0.81
*/

add_filter( 'bb_allowed_tags', 'add_my_allowed_tags' );

/*	Default allowed tags:
	@ formatting-functions.php#function bb_allowed_tags()
	$tags = array(
		'a'           => array(
							'href' => array(),
							'title' => array(),
							'rel' => array()),
		'blockquote'  => array('cite' => array()),
		'br'          => array(),
		'code'        => array(),
		'pre'         => array(),
		'em'          => array(),
		'strong'      => array(),
		'ul'          => array(),
		'ol'          => array(),
		'li'          => array()
	);
*/

function add_my_allowed_tags($tags) {
	$my_tags = array(
		/*
		'img' => array(
			'alt' => array(),
			'src' => array()
			),
		*/
		'cite' => array(),
		'h3' => array(),
		'h4' => array()
		);
	$tags = array_merge( $tags, $my_tags );
	// $tags = array_multisort($tags);
	return $tags;
}

?>