Participant can't use custom html tag
-
Hi,
I have a forum and i would like use wowhead for item link.
I can’t find a plugin for that and i decided to code one. But when i post with the keymaster all is okay, but when it’s au simple user they can’t use the html tag.How allowed participant to use this html tag <item>item id</item>
this is my code
function add_tags(){
add_filter( 'bb_allowed_tags', 'wow_item_allowed_tags',9);
add_filter( 'bbp_get_reply_content', 'wow_item',9);
add_filter( 'bbp_get_topic_content', 'wow_item',9);
}
function wow_item( $text ) {
$text = preg_replace('|(<item>)(.*?)(</item>)|', '$2', $text);
return $text;
}
function wow_item_allowed_tags() {
return array(
'item' => array(),
'a' => array(
'href' => array(),
'title' => array(),
'class' => array(),
'rel' => array()
)
);
}
add_action( 'after_setup_theme', 'add_tags' );
Thank you for your responses 🙂
- You must be logged in to reply to this topic.